/* Discord V2 — 1:1 Dark Theme */

/* ── Font Face ────────────────────────────────────── */
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 400; src: url("fonts/gg-sans-400.woff2") format("woff2"); }
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 500; src: url("fonts/gg-sans-500.woff2") format("woff2"); }
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 600; src: url("fonts/gg-sans-600.woff2") format("woff2"); }
@font-face { font-family: "gg sans"; font-style: normal; font-weight: 700; src: url("fonts/gg-sans-700.woff2") format("woff2"); }

/* ── Design Tokens ────────────────────────────────── */
.discord-v2 {
  /* Backgrounds */
  --dc-bg-app-frame:    #25262a;  /* neutral-78 */
  --dc-bg-guild-bar:    #1b1c1f;  /* neutral-85 */
  --dc-bg-sidebar:      #2c2d32;  /* neutral-73 */
  --dc-bg-chat:         #36373e;  /* neutral-66 */
  --dc-bg-surface-high: #393a41;  /* neutral-64 */
  --dc-bg-surface-higher:#3c3d45; /* neutral-62 */
  --dc-bg-surface-highest:#3f4048;/* neutral-60 */
  --dc-bg-input:        #393a41;  /* neutral-64 */
  --dc-bg-user-panel:   #25262a;  /* neutral-78 */
  --dc-bg-overlay-subtle: rgba(148,149,159, 0.08);
  --dc-bg-overlay-normal: rgba(148,149,159, 0.16);
  --dc-bg-overlay-strong: rgba(148,149,159, 0.24);

  /* Brand */
  --dc-blurple:         #5865f2;
  --dc-blurple-hover:   #4752c4;
  --dc-blurple-light:   #94a8ff;
  --dc-green:           #3d9e60;
  --dc-red:             #da3e44;
  --dc-yellow:          #ffcb6e;

  /* Text */
  --dc-text-default:    #f3f3f4;  /* neutral-4  */
  --dc-text-subtle:     #c5c6ca;  /* neutral-16 */
  --dc-text-muted:      #abacb2;  /* neutral-23 */
  --dc-text-faint:      #9d9ea5;  /* neutral-27 */
  --dc-text-interactive: #81828a; /* neutral-35 */
  --dc-text-interactive-hover: #dcdcdf; /* neutral-10 */
  --dc-text-interactive-active: #ffffff;
  --dc-text-link:       #76aff6;

  /* Status */
  --dc-status-online:   #3d9e60;
  --dc-status-idle:     #ffcb6e;
  --dc-status-dnd:      #dc4247;
  --dc-status-offline:  #9d9ea5;

  /* Border */
  --dc-border-subtle:   rgba(148,149,159, 0.12);
  --dc-border-strong:   rgba(148,149,159, 0.44);

  /* Typography */
  --dc-font: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --dc-font-code: "Consolas", "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;

  /* Dimensions */
  --dc-guild-bar-width:   72px;
  --dc-sidebar-width:     240px;
  --dc-member-list-width: 240px;
  --dc-chat-header-height: 48px;
  --dc-user-panel-height:  52px;
  --dc-avatar-size:       40px;
  --dc-avatar-sm:         32px;
  --dc-avatar-xs:         24px;
  --dc-server-icon-size:  48px;

  /* Radius */
  --dc-radius-sm: 4px;
  --dc-radius-md: 8px;
  --dc-radius-lg: 16px;
  --dc-radius-full: 50%;

  font-family: var(--dc-font);
  font-size: 16px;
  color: var(--dc-text-default);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
}

/* ── Root Layout ──────────────────────────────────── */
.discord-v2 {
  display: flex;
  width: 100%;
  height: 100%;
  background: var(--dc-bg-app-frame);
  overflow: hidden;
  position: relative;
}

/* ── Guild Bar (far-left server strip) ────────────── */
.dc-guild-bar {
  width: var(--dc-guild-bar-width);
  min-width: var(--dc-guild-bar-width);
  background: var(--dc-bg-guild-bar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.dc-guild-bar::-webkit-scrollbar { display: none; }

.dc-guild-item {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  cursor: pointer;
}
.dc-guild-item .dc-guild-icon {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-radius 0.15s ease, background-color 0.15s ease;
  background: var(--dc-bg-surface-highest);
  color: var(--dc-text-interactive);
  font-size: 18px;
  font-weight: 500;
}
.dc-guild-item .dc-guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dc-guild-item:hover .dc-guild-icon,
.dc-guild-item.dc-active .dc-guild-icon {
  border-radius: 16px;
}
.dc-guild-item.dc-active .dc-guild-icon {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-guild-item:hover .dc-guild-icon:not(.dc-guild-item.dc-active .dc-guild-icon) {
  background: var(--dc-blurple);
  color: #fff;
}

/* Selection pill */
.dc-guild-pill {
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  background: var(--dc-text-default);
  border-radius: 0 4px 4px 0;
  transition: height 0.15s ease;
  height: 0;
}
.dc-guild-item:hover .dc-guild-pill { height: 20px; }
.dc-guild-item.dc-active .dc-guild-pill { height: 40px; }
.dc-guild-item.dc-unread .dc-guild-pill { height: 8px; }

/* Notification badge */
.dc-guild-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--dc-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--dc-bg-guild-bar);
  line-height: 1;
}
.dc-guild-badge:empty { display: none; }

.dc-guild-separator {
  width: 32px;
  height: 2px;
  background: var(--dc-border-subtle);
  border-radius: 1px;
  margin: 4px 0 12px;
}

/* DM home icon */
.dc-guild-item.dc-guild-home .dc-guild-icon {
  background: var(--dc-bg-surface-highest);
  color: var(--dc-text-default);
}
.dc-guild-item.dc-guild-home:hover .dc-guild-icon,
.dc-guild-item.dc-guild-home.dc-active .dc-guild-icon {
  background: var(--dc-green);
  color: #fff;
}

/* Folder */
.dc-guild-folder {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--dc-bg-surface-high);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  padding: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-radius 0.15s ease;
}
.dc-guild-folder:hover { border-radius: 16px; }
.dc-guild-folder-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--dc-bg-surface-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 600;
  color: var(--dc-text-muted);
  overflow: hidden;
}
.dc-guild-folder-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Add / Discover buttons */
.dc-guild-action {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dc-bg-surface-highest);
  color: var(--dc-green);
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-radius 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.dc-guild-action:hover {
  border-radius: 16px;
  background: var(--dc-green);
  color: #fff;
}
.dc-guild-action svg { width: 24px; height: 24px; }

/* ── Sidebar Panel (channels + user panel) ────────── */
.dc-sidebar-panel {
  width: var(--dc-sidebar-width);
  min-width: var(--dc-sidebar-width);
  background: var(--dc-bg-sidebar);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px 0 0 0;
}

/* Server header */
.dc-server-header {
  height: var(--dc-chat-header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--dc-border-subtle);
  flex-shrink: 0;
  transition: background 0.15s;
}
.dc-server-header:hover {
  background: var(--dc-bg-overlay-subtle);
}
.dc-server-header-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-default);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dc-server-header-name .dc-verified-badge {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.dc-server-header-chevron {
  width: 18px;
  height: 18px;
  color: var(--dc-text-muted);
  flex-shrink: 0;
  margin-left: 4px;
}

/* Channel list */
.dc-channel-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-bg-surface-high) transparent;
}
.dc-channel-list::-webkit-scrollbar { width: 8px; }
.dc-channel-list::-webkit-scrollbar-track { background: transparent; }
.dc-channel-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-high); border-radius: 4px; }

/* Category */
.dc-category {
  padding-top: 16px;
}
.dc-category-header {
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  cursor: pointer;
  height: 24px;
  user-select: none;
}
.dc-category-arrow {
  width: 12px;
  height: 12px;
  color: var(--dc-text-muted);
  margin-right: 2px;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.dc-category.dc-collapsed .dc-category-arrow {
  transform: rotate(-90deg);
}
.dc-category-name {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--dc-text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-category-header:hover .dc-category-name {
  color: var(--dc-text-subtle);
}
.dc-category-add {
  width: 18px;
  height: 18px;
  color: var(--dc-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.dc-category-header:hover .dc-category-add { opacity: 1; }
.dc-category-channels {
  padding-top: 2px;
}
.dc-category.dc-collapsed .dc-category-channels {
  display: none;
}

/* Channel item */
.dc-channel-item {
  display: flex;
  align-items: center;
  padding: 1px 8px;
  cursor: pointer;
}
.dc-channel-item-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--dc-radius-sm);
  transition: background 0.1s;
  gap: 6px;
}
.dc-channel-item:hover .dc-channel-item-inner {
  background: var(--dc-bg-overlay-subtle);
}
.dc-channel-item.dc-selected .dc-channel-item-inner {
  background: var(--dc-bg-overlay-normal);
}
.dc-channel-item-icon {
  width: 20px;
  height: 20px;
  color: var(--dc-text-interactive);
  flex-shrink: 0;
}
.dc-channel-item.dc-selected .dc-channel-item-icon,
.dc-channel-item:hover .dc-channel-item-icon {
  color: var(--dc-text-subtle);
}
.dc-channel-item-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--dc-text-interactive);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  line-height: 20px;
}
.dc-channel-item.dc-selected .dc-channel-item-name {
  color: var(--dc-text-default);
}
.dc-channel-item:hover .dc-channel-item-name {
  color: var(--dc-text-subtle);
}
.dc-channel-item.dc-unread .dc-channel-item-name {
  color: var(--dc-text-default);
  font-weight: 600;
}
/* Thread item (indented under parent channel) */
.dc-thread-item {
  display: flex;
  align-items: center;
  padding: 1px 8px 1px 24px;
  cursor: pointer;
}
.dc-thread-item-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 8px;
  border-radius: var(--dc-radius-sm);
  transition: background 0.1s;
  gap: 6px;
}
.dc-thread-item:hover .dc-thread-item-inner {
  background: var(--dc-bg-overlay-subtle);
}
.dc-thread-item.dc-selected .dc-thread-item-inner {
  background: var(--dc-bg-overlay-normal);
}
.dc-thread-item .dc-channel-item-icon {
  width: 18px;
  height: 18px;
}
.dc-thread-item .dc-channel-item-name {
  font-size: 15px;
  color: var(--dc-text-interactive);
}
.dc-thread-item.dc-selected .dc-channel-item-name {
  color: var(--dc-text-default);
}
.dc-thread-item:hover .dc-channel-item-name {
  color: var(--dc-text-subtle);
}

/* Unread dot */
.dc-channel-item.dc-unread::before {
  content: '';
  position: absolute;
  left: 0;
  width: 4px;
  height: 8px;
  background: var(--dc-text-default);
  border-radius: 0 4px 4px 0;
}
.dc-channel-item-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  flex-shrink: 0;
}
.dc-channel-item:hover .dc-channel-item-actions { opacity: 1; }
.dc-channel-item-actions svg {
  width: 16px;
  height: 16px;
  color: var(--dc-text-muted);
  cursor: pointer;
}
.dc-channel-item-actions svg:hover { color: var(--dc-text-subtle); }

/* Utility links (Browse Channels, Members, Boosts) */
.dc-sidebar-utility {
  padding: 2px 8px;
}
.dc-sidebar-utility-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--dc-radius-sm);
  cursor: pointer;
  color: var(--dc-text-interactive);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.1s, color 0.1s;
}
.dc-sidebar-utility-item:hover {
  background: var(--dc-bg-overlay-subtle);
  color: var(--dc-text-subtle);
}
.dc-sidebar-utility-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── User Panel ───────────────────────────────────── */
.dc-user-panel {
  height: var(--dc-user-panel-height);
  background: var(--dc-bg-user-panel);
  display: flex;
  align-items: center;
  padding: 0 8px;
  flex-shrink: 0;
}
.dc-user-panel-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border-radius: var(--dc-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.dc-user-panel-info:hover {
  background: var(--dc-bg-overlay-subtle);
}
.dc-user-panel-avatar {
  position: relative;
  width: var(--dc-avatar-sm);
  height: var(--dc-avatar-sm);
  flex-shrink: 0;
}
.dc-user-panel-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--dc-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.dc-user-panel-avatar-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.dc-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid var(--dc-bg-user-panel);
  box-sizing: content-box;
}
.dc-status-dot.dc-online  { background: var(--dc-status-online); }
.dc-status-dot.dc-idle    { background: var(--dc-status-idle); }
.dc-status-dot.dc-dnd     { background: var(--dc-status-dnd); }
.dc-status-dot.dc-offline { background: var(--dc-status-offline); }

.dc-user-panel-text {
  min-width: 0;
  flex: 1;
}
.dc-user-panel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dc-text-default);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 18px;
}
.dc-user-panel-status {
  font-size: 12px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 13px;
}
.dc-user-panel-buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.dc-user-panel-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dc-radius-sm);
  cursor: pointer;
  color: var(--dc-text-interactive);
  transition: background 0.15s, color 0.15s;
}
.dc-user-panel-btn:hover {
  background: var(--dc-bg-overlay-normal);
  color: var(--dc-text-subtle);
}
.dc-user-panel-btn svg { width: 20px; height: 20px; }

/* ── Main Area ────────────────────────────────────── */
.dc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--dc-bg-chat);
}

/* ── Chat Header ──────────────────────────────────── */
.dc-chat-header {
  height: var(--dc-chat-header-height);
  min-height: var(--dc-chat-header-height);
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  box-shadow: 0 1px 0 var(--dc-border-subtle);
  flex-shrink: 0;
}
.dc-chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.dc-chat-header-icon {
  width: 24px;
  height: 24px;
  color: var(--dc-text-muted);
  flex-shrink: 0;
}
.dc-chat-header-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-default);
  white-space: nowrap;
}
.dc-chat-header-divider {
  width: 1px;
  height: 24px;
  background: var(--dc-border-strong);
  margin: 0 8px;
  flex-shrink: 0;
}
.dc-chat-header-topic {
  font-size: 14px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.dc-chat-header-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  margin-left: auto;
}
.dc-toolbar-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  padding: 4px;
  margin: 0 2px;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s;
}
.dc-toolbar-btn:hover {
  color: var(--dc-text-subtle);
}
.dc-toolbar-btn svg { width: 24px; height: 24px; }

.dc-toolbar-search {
  display: flex;
  align-items: center;
  background: var(--dc-bg-surface-high);
  border-radius: var(--dc-radius-sm);
  padding: 0 6px;
  height: 24px;
  margin: 0 2px;
  cursor: text;
}
.dc-toolbar-search-text {
  font-size: 14px;
  color: var(--dc-text-muted);
  padding: 0 4px;
  white-space: nowrap;
}
.dc-toolbar-search svg {
  width: 16px;
  height: 16px;
  color: var(--dc-text-muted);
}

/* ── Chat Content Area ────────────────────────────── */
.dc-chat-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.dc-message-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ── Message List ─────────────────────────────────── */
.dc-message-list-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.dc-message-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-bg-surface-high) transparent;
}
.dc-message-list::-webkit-scrollbar { width: 8px; }
.dc-message-list::-webkit-scrollbar-track { background: transparent; }
.dc-message-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-high); border-radius: 4px; }

/* Date separator */
.dc-date-separator {
  display: flex;
  align-items: center;
  margin: 16px 0 8px;
}
.dc-date-separator-line {
  flex: 1;
  height: 1px;
  background: var(--dc-border-subtle);
}
.dc-date-separator-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--dc-text-muted);
  padding: 0 8px;
  white-space: nowrap;
}

/* Message */
.dc-message {
  display: flex;
  padding: 2px 0;
  position: relative;
  margin-top: 0;
}
.dc-message:hover {
  background: var(--dc-bg-overlay-subtle);
}
.dc-message.dc-message-group-start {
  margin-top: 16px;
}
.dc-message-avatar-col {
  width: 56px;
  min-width: 56px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}
.dc-message-avatar {
  width: var(--dc-avatar-size);
  height: var(--dc-avatar-size);
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.dc-message-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.dc-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Timestamp shown for non-group-start messages on hover */
.dc-message-compact-time {
  display: none;
  font-size: 11px;
  color: var(--dc-text-faint);
  width: 56px;
  min-width: 56px;
  text-align: center;
  padding-top: 4px;
  cursor: default;
}
.dc-message:not(.dc-message-group-start) .dc-message-compact-time {
  display: none;
}
.dc-message:not(.dc-message-group-start):hover .dc-message-compact-time {
  display: block;
}
.dc-message:not(.dc-message-group-start) .dc-message-avatar-col {
  display: flex;
}
.dc-message:not(.dc-message-group-start) .dc-message-avatar-col .dc-message-avatar {
  display: none;
}
.dc-message:not(.dc-message-group-start):hover .dc-message-avatar-col .dc-message-compact-time {
  display: block;
}

.dc-message-body {
  flex: 1;
  min-width: 0;
}
.dc-message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 22px;
}
.dc-message:not(.dc-message-group-start) .dc-message-header {
  display: none;
}
.dc-message-username {
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.dc-message-username:hover { text-decoration: underline; }
.dc-message-tag {
  background: var(--dc-blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 3px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  vertical-align: middle;
}
.dc-message-timestamp {
  font-size: 12px;
  color: var(--dc-text-faint);
  font-weight: 400;
}
.dc-message-content {
  font-size: 16px;
  line-height: 1.375;
  color: var(--dc-text-default);
  word-wrap: break-word;
  padding: 2px 0;
}
.dc-message-content a {
  color: var(--dc-text-link);
  text-decoration: none;
}
.dc-message-content a:hover { text-decoration: underline; }

/* Reactions */
.dc-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
}
.dc-reaction {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--dc-border-subtle);
  background: var(--dc-bg-overlay-subtle);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.dc-reaction:hover {
  border-color: var(--dc-border-strong);
  background: var(--dc-bg-overlay-normal);
}
.dc-reaction.dc-me {
  border-color: var(--dc-blurple);
  background: rgba(88, 101, 242, 0.15);
}
.dc-reaction-emoji { font-size: 16px; line-height: 1; }
.dc-reaction-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--dc-text-subtle);
}
.dc-reaction.dc-me .dc-reaction-count { color: var(--dc-blurple-light); }

/* Message hover action bar */
.dc-message-actions {
  position: absolute;
  top: -16px;
  right: 16px;
  display: none;
  background: var(--dc-bg-surface-high);
  border-radius: var(--dc-radius-sm);
  box-shadow: 0 0 0 1px var(--dc-border-subtle);
  overflow: hidden;
}
.dc-message:hover .dc-message-actions { display: flex; }
.dc-message-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  transition: background 0.1s, color 0.1s;
}
.dc-message-action-btn:hover {
  background: var(--dc-bg-overlay-normal);
  color: var(--dc-text-subtle);
}
.dc-message-action-btn svg { width: 20px; height: 20px; }

/* Typing indicator */
.dc-typing-indicator {
  height: 24px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--dc-text-muted);
  flex-shrink: 0;
}
.dc-typing-indicator:empty { height: 24px; }
.dc-typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}
.dc-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--dc-text-default);
  border-radius: 50%;
  animation: dc-typing-bounce 1.4s infinite ease-in-out both;
}
.dc-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.dc-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dc-typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Message Input ────────────────────────────────── */
.dc-message-input-wrapper {
  padding: 0 16px 16px;
  flex-shrink: 0;
}
.dc-message-input {
  display: flex;
  align-items: flex-end;
  background: var(--dc-bg-input);
  border-radius: var(--dc-radius-md);
  padding: 2px 4px;
}
.dc-input-attach {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  flex-shrink: 0;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s;
}
.dc-input-attach:hover { color: var(--dc-text-subtle); }
.dc-input-attach svg { width: 24px; height: 24px; }

.dc-input-textarea {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  position: relative;
}
.dc-input-textarea-el {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--dc-text-default);
  font-family: var(--dc-font);
  font-size: 16px;
  line-height: 22px;
  padding: 11px 0;
  max-height: 200px;
}
.dc-input-textarea-el::placeholder {
  color: var(--dc-text-interactive);
}
.dc-input-buttons {
  display: flex;
  align-items: center;
  padding: 10px 4px;
  gap: 2px;
  flex-shrink: 0;
}
.dc-input-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dc-text-interactive);
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s;
  flex-shrink: 0;
}
.dc-input-btn:hover { color: var(--dc-text-subtle); }
.dc-input-btn svg { width: 24px; height: 24px; }

/* ── Member List (right sidebar) ──────────────────── */
.dc-member-list {
  width: var(--dc-member-list-width);
  min-width: var(--dc-member-list-width);
  background: var(--dc-bg-sidebar);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--dc-bg-surface-high) transparent;
}
.dc-member-list::-webkit-scrollbar { width: 8px; }
.dc-member-list::-webkit-scrollbar-track { background: transparent; }
.dc-member-list::-webkit-scrollbar-thumb { background: var(--dc-bg-surface-high); border-radius: 4px; }
.dc-member-list.dc-hidden { display: none; }

.dc-member-group-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--dc-text-muted);
  padding: 16px 8px 4px;
  letter-spacing: 0.02em;
}
.dc-member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 0;
  cursor: pointer;
}
.dc-member-item-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: var(--dc-radius-sm);
  transition: background 0.1s;
}
.dc-member-item:hover .dc-member-item-inner {
  background: var(--dc-bg-overlay-subtle);
}
.dc-member-avatar {
  position: relative;
  width: var(--dc-avatar-sm);
  height: var(--dc-avatar-sm);
  flex-shrink: 0;
}
.dc-member-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}
.dc-member-avatar-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.dc-member-avatar .dc-status-dot {
  border-color: var(--dc-bg-sidebar);
  width: 8px;
  height: 8px;
}
.dc-member-info {
  min-width: 0;
  flex: 1;
}
.dc-member-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--dc-text-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 20px;
}
.dc-member-custom-status {
  font-size: 12px;
  color: var(--dc-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 16px;
}
.dc-member-item.dc-offline .dc-member-avatar-img {
  opacity: 0.4;
}
.dc-member-item.dc-offline .dc-member-name {
  color: var(--dc-text-interactive);
}

/* ── Modal Dialog ─────────────────────────────────── */
.dc-modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dc-modal-overlay.dc-modal-visible {
  opacity: 1;
}
.dc-modal-card {
  width: 440px;
  max-height: 80%;
  background: var(--dc-bg-surface-highest);
  border-radius: var(--dc-radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.dc-modal-visible .dc-modal-card {
  transform: scale(1);
}
.dc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}
.dc-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dc-text-default);
  margin: 0;
}
.dc-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dc-text-muted);
  border-radius: var(--dc-radius-sm);
  padding: 0;
  transition: color 0.15s;
}
.dc-modal-close:hover { color: var(--dc-text-default); }

.dc-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.dc-modal-field {
  margin-bottom: 16px;
}
.dc-modal-field:last-child { margin-bottom: 0; }
.dc-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dc-text-subtle);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.dc-modal-required {
  color: var(--dc-red);
}
.dc-modal-input,
.dc-modal-textarea {
  width: 100%;
  background: var(--dc-bg-guild-bar);
  border: none;
  border-radius: var(--dc-radius-sm);
  padding: 10px 12px;
  color: var(--dc-text-default);
  font-family: var(--dc-font);
  font-size: 16px;
  line-height: 1.375;
  outline: none;
  box-sizing: border-box;
  transition: box-shadow 0.15s;
}
.dc-modal-input::placeholder,
.dc-modal-textarea::placeholder {
  color: var(--dc-text-interactive);
}
.dc-modal-input:focus,
.dc-modal-textarea:focus {
  box-shadow: 0 0 0 2px var(--dc-blurple);
}
.dc-modal-textarea {
  resize: none;
  min-height: 100px;
}

.dc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  background: var(--dc-bg-surface-high);
  border-radius: 0 0 var(--dc-radius-md) var(--dc-radius-md);
}
.dc-modal-btn {
  padding: 8px 16px;
  border-radius: var(--dc-radius-sm);
  font-family: var(--dc-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
  line-height: 1;
}
.dc-modal-btn-cancel {
  background: transparent;
  color: var(--dc-text-default);
  padding: 8px 12px;
}
.dc-modal-btn-cancel:hover { text-decoration: underline; }
.dc-modal-btn-submit {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-modal-btn-submit:hover { background: var(--dc-blurple-hover); }

/* ── Bot message accent ───────────────────────────── */
.dc-message-bot-tag {
  background: var(--dc-blurple);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Slash command styling ────────────────────────── */
.dc-slash-command {
  background: var(--dc-bg-overlay-subtle);
  color: var(--dc-text-link);
  padding: 0 2px;
  border-radius: 3px;
  font-size: 16px;
}

/* ── Embed card ───────────────────────────────────── */
.dc-embed {
  margin-top: 4px;
  padding: 8px 16px 8px 12px;
  border-radius: var(--dc-radius-sm);
  background: var(--dc-bg-surface-high);
  border-left: 4px solid var(--dc-blurple);
  max-width: 520px;
}
.dc-embed-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dc-text-link);
  margin-bottom: 4px;
}
.dc-embed-field {
  margin-bottom: 4px;
}
.dc-embed-field-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dc-text-default);
}
.dc-embed-field-value {
  font-size: 14px;
  color: var(--dc-text-subtle);
}

/* ── Ephemeral Messages ───────────────────────────── */
.dc-message-ephemeral {
  background: rgba(88, 101, 242, 0.05);
  border-left: 2px solid var(--dc-blurple);
  margin-left: -2px;
}
.dc-message-ephemeral:hover {
  background: rgba(88, 101, 242, 0.08);
}
.dc-ephemeral-footer {
  font-size: 12px;
  color: var(--dc-text-muted);
  margin-top: 4px;
}
.dc-ephemeral-dismiss {
  color: var(--dc-text-link);
  cursor: pointer;
}
.dc-ephemeral-dismiss:hover {
  text-decoration: underline;
}

/* ── Loading spinner ──────────────────────────────── */
.dc-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dc-text-muted);
  font-size: 14px;
}
.dc-spinner-dots {
  display: inline-flex;
  gap: 4px;
}
.dc-spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dc-blurple);
  animation: dc-spinner-pulse 1.4s infinite ease-in-out both;
}
.dc-spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.dc-spinner-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dc-spinner-pulse {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── DM channel item (sidebar) ────────────────────── */
.dc-channel-dm-avatar {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-right: 8px;
  flex-shrink: 0;
}
.dc-channel-item-dm .dc-channel-item-inner {
  padding-left: 4px;
}

/* ── DM chat header ───────────────────────────────── */
.dc-chat-header-icon.dc-chat-header-dm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dc-chat-header-dm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* ── File attachment card (in messages) ───────────── */
.dc-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 14px 10px 12px;
  background: var(--dc-bg-surface-high);
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-md);
  max-width: 432px;
}
.dc-attachment-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dc-bg-surface-higher);
  border-radius: var(--dc-radius-sm);
  color: var(--dc-text-link);
}
.dc-attachment-icon svg { width: 22px; height: 22px; }
.dc-attachment-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dc-attachment-name {
  color: var(--dc-text-link);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-attachment-size {
  color: var(--dc-text-muted);
  font-size: 12px;
}

/* ── Bot action buttons (e.g. "Upload Files") ─────── */
.dc-action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--dc-radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  border: none;
  font-family: inherit;
}
.dc-action-btn-primary {
  background: var(--dc-blurple);
  color: #fff;
}
.dc-action-btn-secondary {
  background: var(--dc-bg-surface-higher);
  color: var(--dc-text-default);
}
.dc-action-btn svg { width: 18px; height: 18px; }

/* ── Role badge (in messages) ─────────────────────── */
.dc-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}
.dc-role-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
