/* ─── Discord page — light theme, same system as events / teams ─── */

body.page-discord {
  --muted: #6a7587;
  --dc-text: #101a2e;
  --dc-muted: #5c6f87;
  --dc-subtle: #8499af;
  --dc-line: rgba(16, 26, 46, 0.07);
  --dc-card-bg: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.76)),
                radial-gradient(circle at 8% 0%, rgba(27,177,242,0.05), transparent 44%);
  background:
    radial-gradient(circle at 6% 8%, rgba(27, 177, 242, 0.14), transparent 40%),
    radial-gradient(circle at 94% 10%, rgba(255, 7, 108, 0.11), transparent 42%),
    radial-gradient(circle at 68% 82%, rgba(27, 177, 242, 0.07), transparent 46%),
    linear-gradient(180deg, #f8fafe 0%, #f2f6fc 46%, #eef3fa 100%);
  color: var(--dc-text);
}

body.page-discord::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 26, 46, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 26, 46, 0.022) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.45;
}

/* ─── Header ─── */
.page-discord .site-header {
  background:
    linear-gradient(180deg, rgba(249,252,255,0.94), rgba(248,251,255,0.8)),
    radial-gradient(circle at 10% 0%, rgba(27,177,242,0.08), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(255,7,108,0.07), transparent 40%);
  border-bottom: 1px solid rgba(16, 26, 46, 0.05);
  box-shadow: 0 10px 28px rgba(16,26,46,0.035), 0 1px 0 rgba(255,255,255,0.78) inset;
}
.page-discord .site-header::after {
  background: linear-gradient(90deg, rgba(27,177,242,0.24), rgba(255,7,108,0.18), transparent);
}
.page-discord .brand { color: var(--dc-text); }
.page-discord .brand-mark {
  filter: drop-shadow(0 0 14px rgba(27,177,242,0.16)) drop-shadow(0 6px 14px rgba(255,7,108,0.1));
}
.page-discord .nav-link { color: #576a81; }
.page-discord .nav-link::before {
  background: linear-gradient(90deg, rgba(27,177,242,0.95), rgba(255,7,108,0.78));
}
.page-discord .nav-link:hover { color: #16263a; }
.page-discord .nav-link.is-active { color: #0f1d31; }

/* ─── Footer ─── */
.page-discord .site-footer {
  border-top: 1px solid rgba(16, 26, 46, 0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.54)),
    radial-gradient(circle at 8% 20%, rgba(27,177,242,0.08), transparent 44%);
  backdrop-filter: blur(10px);
}
.page-discord .footer-kicker { color: #16263a; }
.page-discord .footer-note,
.page-discord .footer-copy,
.page-discord .footer-col-title { color: #62748b; }
.page-discord .footer-list a { color: #31465d; }
.page-discord .footer-list a:hover {
  color: #14253a;
  border-bottom-color: rgba(27,177,242,0.28);
}

/* ─── Main layout ─── */
.page-discord .main-content {
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.dc-page {
  max-width: min(100%, 1140px);
  margin-inline: auto;
}

/* ─── Topbar ─── */
.dc-topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.4rem;
  border-radius: 22px;
  background: var(--dc-card-bg);
  border: 1px solid rgba(16, 26, 46, 0.07);
  box-shadow: 0 12px 32px rgba(16,26,46,0.05), 0 1px 0 rgba(255,255,255,0.8) inset;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.dc-topbar-left {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.dc-topbar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d94aa;
  margin: 0;
}

.dc-topbar-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #0d1a2d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Stats strip in topbar ─── */
.dc-stats-strip {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.dc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0 1.1rem;
}

.dc-stat strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0d1a2d;
}

.dc-stat span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dc-subtle);
}

.dc-stat-sep {
  width: 1px;
  height: 2rem;
  background: rgba(16, 26, 46, 0.08);
  flex-shrink: 0;
}

/* ─── Topbar right: live pill + join button ─── */
.dc-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

.dc-live-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(34, 160, 107, 0.07);
  border: 1px solid rgba(34, 160, 107, 0.18);
  white-space: nowrap;
}

.dc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a06b;
  flex-shrink: 0;
  animation: dc-pulse 2.4s ease-in-out infinite;
}

@keyframes dc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

[data-live-status] {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1b7c54;
}

.dc-live-sep {
  color: rgba(16, 26, 46, 0.2);
  font-size: 0.82rem;
}

.dc-live-time {
  font-size: 0.78rem;
  color: var(--dc-subtle);
}

/* ─── Buttons ─── */
.page-discord .button {
  box-shadow: 0 6px 18px rgba(16, 26, 46, 0.08);
}
.page-discord .button.primary { color: #061117; }
.page-discord .button.ghost {
  color: #15253b;
  border-left-color: rgba(16, 26, 46, 0.15);
  border-bottom-color: rgba(16, 26, 46, 0.15);
  background: rgba(255, 255, 255, 0.72);
}
.page-discord .button.ghost:hover {
  border-left-color: rgba(27, 177, 242, 0.35);
  border-bottom-color: rgba(27, 177, 242, 0.35);
  background: rgba(27, 177, 242, 0.05);
}

/* ─── Main two-column layout ─── */
.dc-layout {
  display: grid;
  grid-template-columns: 1fr 288px;
  gap: 1rem;
  align-items: start;
}

/* ─── Members column ─── */
.dc-main {
  background: var(--dc-card-bg);
  border: 1px solid rgba(16, 26, 46, 0.07);
  box-shadow: 0 16px 40px rgba(16,26,46,0.055), 0 1px 0 rgba(255,255,255,0.8) inset;
  border-radius: 22px;
  padding: 1.3rem 1.4rem;
}

.dc-main-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(16, 26, 46, 0.06);
}

.dc-main-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #0d1a2d;
}

.dc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  height: 1.55rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: rgba(27, 177, 242, 0.1);
  border: 1px solid rgba(27, 177, 242, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  color: #0d7dc0;
}

/* ─── Member grid: compact avatar tiles ─── */
.dc-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.55rem;
}

/* ─── Member tile ─── */
.dc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.38rem;
  padding: 0.75rem 0.4rem 0.65rem;
  border-radius: 14px;
  background: rgba(247, 251, 255, 0.7);
  border: 1px solid rgba(16, 26, 46, 0.055);
  cursor: default;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.dc-tile:hover {
  background: rgba(27, 177, 242, 0.05);
  border-color: rgba(27, 177, 242, 0.18);
  transform: translateY(-2px);
}

/* Avatar with status dot */
.dc-tile-av {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  flex-shrink: 0;
}

.dc-tile-av img,
.dc-tile-av span {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.dc-tile-av span {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(27,177,242,0.2), rgba(255,7,108,0.14));
  color: #1a2d48;
  font-weight: 800;
  font-size: 1rem;
}

/* Status dot on avatar */
.dc-tile-av::after {
  content: "";
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #f3f7fc;
  z-index: 1;
}

.dc-tile--online .dc-tile-av::after  { background: #22a06b; }
.dc-tile--idle .dc-tile-av::after    { background: #f0b429; }
.dc-tile--dnd .dc-tile-av::after     { background: #d63a60; }
.dc-tile--offline .dc-tile-av::after { background: #b8c5d3; }

.dc-tile-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #253a55;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
}

/* ─── Sidebar ─── */
.dc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ─── Cards (sidebar blocks) ─── */
.dc-card {
  background: var(--dc-card-bg);
  border: 1px solid rgba(16, 26, 46, 0.07);
  box-shadow: 0 12px 28px rgba(16,26,46,0.05), 0 1px 0 rgba(255,255,255,0.8) inset;
  border-radius: 20px;
  padding: 1rem 1.1rem 1.05rem;
}

.dc-card-title {
  margin: 0 0 0.8rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7d94aa;
}

/* ─── Voice rows ─── */
.dc-voice-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dc-vrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(247, 251, 255, 0.8);
  border: 1px solid rgba(16, 26, 46, 0.05);
  transition: background 0.15s, border-color 0.15s;
}

.dc-vrow:hover {
  background: rgba(27, 177, 242, 0.04);
  border-color: rgba(27, 177, 242, 0.14);
}

.dc-vrow-left {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.dc-vrow-name {
  font-size: 0.87rem;
  font-weight: 600;
  color: #0d1a2d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-vrow-who {
  font-size: 0.77rem;
  color: var(--dc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-vrow-count {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1bb1f2;
  flex-shrink: 0;
}

/* ─── Status rows ─── */
.dc-status-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dc-srow {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.dc-srow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dc-srow-top span {
  font-size: 0.83rem;
  color: var(--dc-muted);
}

.dc-srow-top strong {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0d1a2d;
}

.dc-srow-bar {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(16, 26, 46, 0.06);
}

.dc-srow-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.dc-srow--online .dc-srow-bar span { background: linear-gradient(90deg, #22a06b, #1bb1f2); }
.dc-srow--idle .dc-srow-bar span   { background: linear-gradient(90deg, #e8a114, #f5c155); }
.dc-srow--dnd .dc-srow-bar span    { background: linear-gradient(90deg, #d63a60, #ff076c); }
.dc-srow--offline .dc-srow-bar span{ background: linear-gradient(90deg, #b0bed0, #cdd5e0); }

/* ─── Activity rows ─── */
.dc-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dc-arow { display: flex; flex-direction: column; gap: 0.36rem; }

.dc-arow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dc-arow-top span {
  font-size: 0.83rem;
  color: var(--dc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-arow-top strong {
  font-size: 0.83rem;
  font-weight: 700;
  color: #0d1a2d;
  flex-shrink: 0;
}

.dc-arow-bar {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(16, 26, 46, 0.06);
}

.dc-arow-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(27,177,242,0.85), rgba(255,7,108,0.7));
}

/* ─── Empty states ─── */
.dc-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--dc-subtle);
  text-align: center;
  padding: 0.5rem 0;
}

/* ─── Join strip ─── */
.dc-join-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.4rem 1.6rem;
  border-radius: 22px;
  background: var(--dc-card-bg);
  border: 1px solid rgba(16, 26, 46, 0.07);
  box-shadow: 0 12px 32px rgba(16,26,46,0.055), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.dc-join-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #0d1a2d;
}

.dc-join-sub {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--dc-muted);
  max-width: 52ch;
}

/* ─── Responsive ─── */
@media (max-width: 1020px) {
  .dc-layout {
    grid-template-columns: 1fr 256px;
  }
}

@media (max-width: 860px) {
  .page-discord .main-content { padding-top: 1rem; }

  .dc-layout {
    grid-template-columns: 1fr;
  }

  .dc-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-topbar {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .dc-stats-strip {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(16, 26, 46, 0.06);
  }

  .dc-topbar-right {
    margin-left: 0;
  }

  .dc-join-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .dc-sidebar {
    grid-template-columns: 1fr;
  }

  .dc-member-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.45rem;
  }

  .dc-topbar, .dc-main, .dc-card, .dc-join-strip {
    border-radius: 18px;
  }
}

/* ─── Privacy toggle ─── */
.dc-privacy-toggle {
  position: fixed;
  bottom: 1.4rem;
  left: 1.4rem;
  z-index: 90;
}

.dc-privacy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem 0.5rem 0.55rem;
  border: 1px solid rgba(16, 26, 46, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(16, 26, 46, 0.1);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  color: #3e4f68;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.dc-privacy-btn:hover {
  box-shadow: 0 6px 20px rgba(16, 26, 46, 0.14);
  border-color: rgba(16, 26, 46, 0.16);
}

.dc-privacy-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #c8d5e3;
  flex-shrink: 0;
  transition: background 0.2s;
}

.dc-privacy-btn[aria-pressed="true"] .dc-privacy-track {
  background: #1bb1f2;
}

.dc-privacy-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-privacy-btn[aria-pressed="true"] .dc-privacy-thumb {
  transform: translateX(14px);
}

.dc-privacy-label {
  white-space: nowrap;
}
