/* FanTest Community — modern mini-forum */
:root {
  --bg: #070b14;
  --bg-soft: #0b1220;
  --panel: rgba(13, 21, 37, 0.82);
  --panel-solid: #0d1525;
  --panel-2: rgba(20, 31, 52, 0.72);
  --line: rgba(148, 163, 184, 0.13);
  --line-strong: rgba(148, 163, 184, 0.22);
  --text: #eef4ff;
  --muted: #8b9bb5;
  --muted-2: #677892;
  --accent: #7c96ff;
  --accent-2: #32d5ee;
  --accent-3: #a78bfa;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 70px rgba(2, 7, 18, 0.55);
  --shadow-soft: 0 12px 34px rgba(2, 7, 18, 0.28);
  --font: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(66, 84, 190, 0.24), transparent 65%),
    radial-gradient(900px 560px at 92% 4%, rgba(20, 158, 190, 0.14), transparent 62%),
    linear-gradient(180deg, #070b14 0%, #060a12 50%, #05080f 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 78%);
  z-index: -1;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
}
.ambient-a { width: 420px; height: 420px; background: rgba(94, 118, 255, 0.22); top: -140px; left: -100px; }
.ambient-b { width: 360px; height: 360px; background: rgba(34, 211, 238, 0.12); top: 320px; right: -140px; }
.ambient-c { width: 320px; height: 320px; background: rgba(167, 139, 250, 0.1); bottom: -100px; left: 40%; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
img, svg { display: block; }

.container {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}
.page { padding-bottom: 72px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ── Top bar ───────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(145deg, #6d8cff, #32d5ee);
  box-shadow: 0 8px 24px rgba(84, 118, 255, 0.38), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand-mark.small { width: 28px; height: 28px; font-size: 14px; border-radius: 9px; }
.brand-name {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-name small {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.main-nav a {
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: 0.18s ease;
}
.main-nav a:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.main-nav a.active { color: #dfe8ff; background: rgba(124, 150, 255, 0.12); }
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(13, 21, 37, 0.7);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 4px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 21, 37, 0.8);
}
.user-menu-name { font-size: 12.5px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #e8eeff;
  background: linear-gradient(145deg, rgba(109, 140, 255, 0.95), rgba(50, 213, 238, 0.75));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.avatar-lg { width: 48px; height: 48px; font-size: 19px; border-radius: 15px; }
.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.18s ease;
}
.icon-btn:hover { background: rgba(251, 113, 133, 0.15); color: var(--danger); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #6d8cff, #4f74f7 55%, #32b8e6);
  box-shadow: 0 10px 26px rgba(85, 116, 255, 0.3), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { box-shadow: 0 14px 32px rgba(85, 116, 255, 0.42); }
.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(148, 163, 184, 0.06);
  color: #d8e2f6;
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.35); }
.btn-sm { min-height: 34px; padding: 0 13px; border-radius: 10px; font-size: 12.5px; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #f43f5e, #dc2626); }
.w-full { width: 100%; }
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  font-size: inherit;
}
.linklike:hover { color: #a9bbff; text-decoration: underline; }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  padding-top: 64px;
  padding-bottom: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.8fr);
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 1px solid rgba(124, 150, 255, 0.26);
  border-radius: 999px;
  background: rgba(124, 150, 255, 0.08);
  color: #b8c7ff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(90deg, #8fa4ff 0%, #5ad9ef 55%, #b7a3ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy > p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.72;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 26px;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta strong { color: #c3cee5; font-weight: 700; }
.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; }
.dot-green { background: var(--success); box-shadow: 0 0 10px rgba(52, 211, 153, 0.65); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(22, 34, 58, 0.82), rgba(10, 17, 30, 0.72));
  box-shadow: var(--shadow-soft);
}
.stat-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -42px;
  bottom: -48px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 150, 255, 0.22), transparent 68%);
}
.stat-card.accent {
  border-color: rgba(50, 213, 238, 0.22);
  background: linear-gradient(155deg, rgba(15, 54, 72, 0.7), rgba(10, 20, 34, 0.74));
}
.stat-card strong {
  display: block;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 11px 0 7px;
}
.stat-card > span:last-child { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 150, 255, 0.22);
  border-radius: 9px;
  background: rgba(124, 150, 255, 0.1);
  color: #9fb1ff;
  font-size: 14px;
  font-weight: 800;
}

/* ── Layout and panels ─────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
}
.forum-column, .sidebar { min-width: 0; }
.sidebar { display: grid; gap: 18px; position: sticky; top: 92px; }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(16, 25, 43, 0.86), rgba(9, 15, 27, 0.82));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.panel-head.compact { align-items: center; }
.panel-head h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -0.025em; }
.panel-head.compact h2 { margin: 0; font-size: 15px; }
.panel-kicker {
  color: var(--accent-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.panel-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.forum-panel { padding: 24px; }
.forum-head { margin-bottom: 20px; }
.panel-tools { display: flex; align-items: center; gap: 10px; }
.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 11, 20, 0.55);
  color: var(--muted-2);
  transition: 0.18s ease;
}
.searchbox:focus-within { border-color: rgba(124, 150, 255, 0.5); box-shadow: 0 0 0 3px rgba(124, 150, 255, 0.1); }
.searchbox input {
  width: 158px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
}
.searchbox input::placeholder { color: var(--muted-2); }

.category-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}
.category-tab:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.category-tab.active {
  color: #e6edff;
  border-color: rgba(124, 150, 255, 0.28);
  background: rgba(124, 150, 255, 0.13);
}
.category-tab em { font-style: normal; color: var(--muted-2); font-size: 10.5px; }

/* ── Topic list ────────────────────────────────────────────────── */
.topic-list { display: grid; gap: 0; }
.topic-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 16px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.075);
  border-radius: 12px;
  transition: 0.18s ease;
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: transparent;
  border-left: 0; border-right: 0; border-top: 0;
  color: inherit;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: rgba(124, 150, 255, 0.055); padding-left: 12px; padding-right: 12px; }
.topic-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 150, 255, 0.18);
  border-radius: 13px;
  background: rgba(124, 150, 255, 0.09);
  color: #a8b8ff;
  flex-shrink: 0;
}
.topic-icon svg { width: 19px; height: 19px; }
.topic-icon.cat-news { color: #fbbf24; border-color: rgba(251, 191, 36, 0.18); background: rgba(251, 191, 36, 0.075); }
.topic-icon.cat-general { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.18); background: rgba(125, 211, 252, 0.075); }
.topic-icon.cat-support { color: #f472b6; border-color: rgba(244, 114, 182, 0.18); background: rgba(244, 114, 182, 0.075); }
.topic-icon.cat-showcase { color: #a78bfa; border-color: rgba(167, 139, 250, 0.18); background: rgba(167, 139, 250, 0.075); }
.topic-body { min-width: 0; }
.topic-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topic-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: #e8effc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.topic-row:hover .topic-title { color: #fff; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-pin { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.badge-lock { color: #9aa8c0; background: rgba(148, 163, 184, 0.1); }
.badge-cat { color: #a9b8ff; background: rgba(124, 150, 255, 0.1); }
.topic-excerpt {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
}
.topic-meta span { display: inline-flex; align-items: center; gap: 4px; }
.topic-last {
  text-align: right;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
  min-width: 88px;
}
.topic-last strong { display: block; color: #b8c6df; font-size: 11px; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state {
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty-state strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 7px; }
.skeleton-list { display: grid; gap: 13px; padding: 12px 0; }
.skeleton-row {
  height: 66px;
  border-radius: 13px;
  background: linear-gradient(90deg, rgba(148,163,184,0.06) 25%, rgba(148,163,184,0.12) 37%, rgba(148,163,184,0.06) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ── Sidebar ───────────────────────────────────────────────────── */
.account-card { padding: 23px; }
.account-card h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -0.025em; }
.account-card .panel-subtitle { margin-bottom: 18px; }
.form-stack { display: grid; gap: 13px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(6, 11, 20, 0.62);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: 0.18s ease;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(124, 150, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 150, 255, 0.1);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-error {
  padding: 9px 11px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.08);
  color: #fda4af;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-switch { margin-top: 16px; text-align: center; color: var(--muted); font-size: 11.5px; }
.notice-inline {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.07);
  color: #fcd34d;
  font-size: 11px;
  line-height: 1.5;
}
.account-head { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.account-identity { min-width: 0; }
.account-identity strong { display: block; font-size: 15px; letter-spacing: -0.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-line { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--success); font-size: 10.5px; font-weight: 700; }
.status-line.expired { color: var(--danger); }
.account-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 15px;
}
.account-meta > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(6, 11, 20, 0.38);
}
.account-meta span { display: block; color: var(--muted-2); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.account-meta strong { display: block; margin-top: 4px; color: #d6e0f2; font-size: 11.5px; font-weight: 700; }
.account-card .w-full + .w-full { margin-top: 9px; }
.hint { margin: 10px 0 0; color: var(--muted-2); font-size: 10.5px; line-height: 1.55; }
.online-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 0 2px; }
.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 11, 20, 0.38);
  color: #c7d2e6;
  font-size: 10.5px;
  font-weight: 650;
}
.online-chip .avatar { width: 22px; height: 22px; font-size: 9px; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.07);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.sidebar .panel:not(.account-card) { padding: 19px; }
.stat-list { display: grid; gap: 1px; margin-top: 10px; }
.stat-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
  color: var(--muted);
  font-size: 11.5px;
}
.stat-list > div:last-child { border-bottom: 0; }
.stat-list strong { color: #d9e3f5; font-size: 13px; font-weight: 800; }
.community-note { background: linear-gradient(160deg, rgba(30, 27, 66, 0.65), rgba(9, 15, 27, 0.86)); }
.note-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
  margin-bottom: 12px;
}
.community-note h3 { margin: 0 0 7px; font-size: 13px; }
.community-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* ── Notices, footer ───────────────────────────────────────────── */
.notice-stack { display: grid; gap: 8px; padding-top: 18px; }
.notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.075);
  color: #fcd34d;
  font-size: 12px;
  line-height: 1.5;
}
.notice-banner.red { border-color: rgba(251, 113, 133, 0.24); background: rgba(251, 113, 133, 0.075); color: #fda4af; }
.notice-banner strong { color: inherit; }
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 700; }
.footer-meta { display: flex; gap: 22px; align-items: center; }
.footer a:hover { color: var(--text); }

/* ── Dialogs ───────────────────────────────────────────────────── */
dialog.dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
dialog.dialog::backdrop {
  background: rgba(2, 6, 14, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
dialog.dialog[open] { animation: dialog-in 0.2s ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
.dialog-card {
  position: relative;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(500px 240px at 15% -10%, rgba(124, 150, 255, 0.16), transparent 70%),
    linear-gradient(160deg, #101a2c, #090f1b);
  box-shadow: var(--shadow);
}
.dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 11, 20, 0.55);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { color: var(--text); background: rgba(148, 163, 184, 0.12); }
.dialog-head { padding-right: 25px; margin-bottom: 19px; }
.dialog-head h2 { margin: 5px 0 7px; font-size: 23px; letter-spacing: -0.035em; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 11, 20, 0.5);
}
.segmented button {
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}
.segmented button.active { color: #fff; background: linear-gradient(135deg, rgba(109,140,255,0.9), rgba(50,184,230,0.9)); box-shadow: 0 6px 16px rgba(85,116,255,0.24); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }

dialog.dialog-wide { width: min(780px, calc(100% - 32px)); }
.topic-dialog-card { padding: 0; }
.topic-dialog-content { padding: 27px; }
.topic-detail-head { padding-right: 30px; margin-bottom: 18px; }
.topic-detail-head h2 { margin: 8px 0 9px; font-size: clamp(22px, 3vw, 29px); line-height: 1.18; letter-spacing: -0.035em; }
.topic-detail-meta { display: flex; flex-wrap: wrap; gap: 13px; color: var(--muted-2); font-size: 11px; font-weight: 600; }
.topic-detail-meta span { display: inline-flex; align-items: center; gap: 5px; }
.topic-op {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(6, 11, 20, 0.38);
  color: #cbd6e8;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.replies-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.replies-head h3 { margin: 0; font-size: 14px; }
.replies-head span { color: var(--muted-2); font-size: 10.5px; font-weight: 700; }
.reply-list { display: grid; gap: 10px; }
.reply {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  border-radius: 13px;
  background: rgba(13, 21, 37, 0.55);
}
.reply.admin { border-color: rgba(251, 191, 36, 0.16); background: rgba(55, 41, 14, 0.22); }
.reply .avatar { width: 34px; height: 34px; font-size: 12px; }
.reply-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.reply-head strong { font-size: 11.5px; color: #dce6f8; }
.reply-head time { color: var(--muted-2); font-size: 9.5px; }
.reply-body { margin: 5px 0 0; color: #b5c2d8; font-size: 12px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.locked-note {
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.reply-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.reply-form textarea { min-height: 92px; }
.reply-form .form-actions { justify-content: space-between; align-items: center; }
.reply-form .hint { margin: 0; }

/* ── Toasts ────────────────────────────────────────────────────── */
.toast-stack { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(340px, calc(100% - 36px)); pointer-events: none; }
.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(13, 21, 37, 0.96);
  box-shadow: var(--shadow-soft);
  color: #d9e3f5;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  animation: toast-in 0.2s ease both;
  pointer-events: auto;
}
.toast.success { border-color: rgba(52, 211, 153, 0.28); color: #a7f3d0; }
.toast.error { border-color: rgba(251, 113, 133, 0.3); color: #fecdd3; }
.toast.info { border-color: rgba(124, 150, 255, 0.3); color: #c7d2fe; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 44px; }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sidebar .account-card { grid-row: span 2; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 26px, 1220px); }
  .topbar-inner { height: 64px; gap: 14px; }
  .main-nav { display: none; }
  .online-pill { display: none; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(34px, 10vw, 48px); }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forum-panel { padding: 17px; }
  .forum-head { align-items: flex-start; flex-direction: column; }
  .panel-tools { width: 100%; }
  .searchbox { flex: 1; }
  .searchbox input { width: 100%; }
  .topic-row { grid-template-columns: 38px minmax(0, 1fr); }
  .topic-last { display: none; }
  .topic-icon { width: 38px; height: 38px; border-radius: 11px; }
  .sidebar { grid-template-columns: 1fr; }
  .sidebar .account-card { grid-row: auto; }
  .footer { flex-direction: column; align-items: flex-start; }
  .dialog-card, .topic-dialog-content { padding: 20px; }
  .brand-name { font-size: 17px; }
}
@media (max-width: 640px) {
  #top-register { display: none !important; }
}
@media (max-width: 430px) {
  .hero-stats { gap: 9px; }
  .stat-card { min-height: 106px; padding: 16px; }
  .stat-card strong { font-size: 26px; }
  .user-menu-name { display: none; }
  .panel-tools .btn { padding: 0 11px; }
}
