/* ============================================================
   TW引擎论坛 · 深蓝科技主题
   ============================================================ */

:root {
  --bg: #070e1b;
  --bg-2: #0a1424;
  --panel: #101c30;
  --panel-2: #0c1728;
  --line: #1b2b44;
  --line-2: #25395a;
  --blue: #2f81e0;
  --blue-l: #4da6f7;
  --cyan: #39c5ff;
  --gold: #f0a93a;
  --gold-2: #e08a12;
  --green: #2ecc71;
  --red: #e5604d;
  --text: #d9e4f2;
  --muted: #8ea6c6;
  --dim: #5d7595;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-mono: "Bahnschrift", "DIN Alternate", "Consolas", "SFMono-Regular", monospace;
  --radius: 12px;
  --max: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  background:
    radial-gradient(ellipse 65% 42% at 12% -4%, rgba(47, 129, 224, .11), transparent 62%),
    radial-gradient(ellipse 48% 36% at 92% 12%, rgba(57, 197, 255, .055), transparent 68%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-lock { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; }
button, input, select, textarea { font-family: inherit; }
::selection { background: rgba(57, 197, 255, .24); color: #fff; }

:focus-visible {
  outline: 2px solid rgba(57, 197, 255, .85);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07101f; }
::-webkit-scrollbar-thumb { background: #1e3049; border-radius: 99px; border: 2px solid #07101f; }
::-webkit-scrollbar-thumb:hover { background: #2a4466; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; }

/* ============================================================
   头部
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 14, 27, .82);
  border-bottom: 1px solid rgba(27, 43, 68, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  max-width: var(--max);
  height: 66px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }

.brand-mark {
  position: relative;
  width: 37px; height: 37px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(57, 197, 255, .42);
  background: linear-gradient(145deg, rgba(47, 129, 224, .22), rgba(57, 197, 255, .04));
  box-shadow: inset 0 0 16px rgba(57, 197, 255, .12);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
}

.brand-mark::after {
  content: "";
  position: absolute; right: -3px; bottom: -3px;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 2px;
  transform: rotate(45deg);
}

.brand-text {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.2;
}

.brand-text > span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 2.4px;
  color: var(--dim);
}

.main-nav { display: flex; align-items: center; gap: 24px; flex: 0 0 auto; }

.main-nav a {
  position: relative;
  padding: 21px 0;
  font-size: 13.5px;
  color: var(--muted);
  transition: color .2s;
}

.main-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 15px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-l), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.main-nav a:hover { color: var(--text); }
.main-nav a.on { color: var(--cyan); }
.main-nav a.on::after { transform: scaleX(1); }

.search {
  margin-left: auto;
  width: 268px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 28, 48, .55);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.search:focus-within {
  border-color: rgba(57, 197, 255, .5);
  background: rgba(16, 28, 48, .85);
  box-shadow: 0 0 0 3px rgba(47, 129, 224, .12);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}

.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search button {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: none;
  color: var(--dim);
  cursor: pointer;
  transition: color .2s, background .2s;
}

.search button:hover { color: var(--cyan); background: rgba(47, 129, 224, .12); }
.search button .icon { width: 15px; height: 15px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.menu-toggle .icon { width: 18px; height: 18px; }
.menu-toggle:hover { color: var(--text); border-color: rgba(57, 197, 255, .4); }

.mobile-panel { display: none; }

/* 用户区域 */
.user-slot { position: relative; }
.user-wrap { position: relative; }

.user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 9px 3px 3px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s;
}

.user-chip:hover { border-color: rgba(57, 197, 255, .4); }
.user-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.user-caret { font-size: 9px; color: var(--dim); }

.user-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 9px);
  min-width: 158px;
  padding: 6px;
  background: #111e33;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  z-index: 110;
}

.user-wrap.menu-open .user-menu { display: block; }

.user-menu-label {
  display: block;
  padding: 7px 10px 9px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
}

.user-menu button {
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 0; border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.user-menu button:hover { background: rgba(47, 129, 224, .1); color: var(--text); }

/* ============================================================
   通用组件
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s, border-color .2s, background .2s, color .2s;
}

.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; }

.btn-primary {
  background: linear-gradient(135deg, #3389ea, #1d62b8);
  border-color: rgba(110, 185, 255, .45);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 129, 224, .2);
}

.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 26px rgba(47, 129, 224, .3); }

.btn-gold {
  background: linear-gradient(135deg, #f7b733, var(--gold-2));
  border-color: rgba(255, 212, 128, .5);
  color: #241603;
  box-shadow: 0 8px 20px rgba(240, 169, 58, .18);
}

.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 26px rgba(240, 169, 58, .28); }

.btn-ghost {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, .02);
  color: var(--text);
}

.btn-ghost:hover { border-color: rgba(57, 197, 255, .42); color: var(--cyan); background: rgba(47, 129, 224, .06); }

.overline {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.6px;
  color: var(--cyan);
  text-transform: uppercase;
}

.overline::before { content: ""; width: 20px; height: 1px; background: currentColor; opacity: .7; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  flex: 0 0 auto;
  border: 1px solid;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-md { width: 46px; height: 46px; font-size: 17px; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.avatar-xs { width: 20px; height: 20px; border-radius: 5px; font-size: 10px; }

.tag {
  display: inline-flex; align-items: center;
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
  white-space: nowrap;
}

.tag-pin {
  color: #f7c65a;
  border-color: rgba(247, 183, 51, .4);
  background: rgba(247, 183, 51, .08);
}

.tag-feature {
  color: #82d6ff;
  border-color: rgba(57, 197, 255, .4);
  background: rgba(57, 197, 255, .08);
}

.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); opacity: .7; flex: 0 0 auto; }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 46px 24px 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .72fr);
  gap: 24px;
  align-items: stretch;
}

.hero-main {
  position: relative;
  padding: 40px 42px 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(17, 31, 52, .9), rgba(9, 17, 31, .68));
  overflow: hidden;
}

.hero-main::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(77, 137, 220, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 137, 220, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 78% 18%, #000, transparent 76%);
  mask-image: radial-gradient(ellipse at 78% 18%, #000, transparent 76%);
  pointer-events: none;
}

.hero-main::after {
  content: "TW";
  position: absolute;
  right: -8px; bottom: -52px;
  font-family: var(--font-mono);
  font-size: 210px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -14px;
  color: rgba(47, 129, 224, .055);
  pointer-events: none;
}

.hero-main > * { position: relative; z-index: 1; }

.hero h1 {
  margin: 16px 0 14px;
  font-size: 50px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1px;
}

.hero h1 > span {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: .92em;
  letter-spacing: -2px;
}

.hero-desc {
  max-width: 660px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.hero-desc b { color: #c9d8ee; font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-topics {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--dim);
}

.hero-topics > span { margin-right: 4px; font-family: var(--font-mono); letter-spacing: 1px; }

.hero-topics a {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
}

.hero-topics a:hover { border-color: rgba(57, 197, 255, .4); color: var(--cyan); background: rgba(47, 129, 224, .07); }

/* 社区状态面板 */
.live-panel {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid rgba(57, 197, 255, .24);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(17, 31, 52, .92), rgba(9, 18, 33, .9));
  position: relative;
  overflow: hidden;
}

.live-panel::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 84px; height: 84px;
  background: linear-gradient(225deg, rgba(57, 197, 255, .12), transparent 70%);
}

.live-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.panel-kicker {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--dim);
}

.live-head h2 { font-size: 18px; font-weight: 700; }

.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 9px;
  border: 1px solid rgba(46, 204, 113, .35);
  border-radius: 99px;
  background: rgba(46, 204, 113, .07);
  color: #72e3a4;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
}

.pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, .5);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .45); }
  70% { box-shadow: 0 0 0 7px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.live-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.live-stat { padding: 17px 15px; background: rgba(10, 20, 36, .92); }

.live-stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.live-stat span { display: block; margin-top: 5px; font-size: 11px; color: var(--dim); }

.live-foot {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-top: auto;
  padding-top: 20px;
  font-size: 11.5px;
  color: var(--dim);
}

.live-foot b { color: var(--muted); font-family: var(--font-mono); font-weight: 600; }
.live-dot { width: 1px; height: 10px; background: var(--line-2); }

/* ============================================================
   Section
   ============================================================ */

.section { padding: 52px 24px; }
.section-tint {
  border-top: 1px solid rgba(27, 43, 68, .55);
  background: linear-gradient(180deg, rgba(11, 21, 38, .55), transparent 82%);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 { margin-top: 7px; font-size: 25px; font-weight: 700; letter-spacing: -.2px; }
.section-head p { margin-top: 7px; color: var(--dim); font-size: 12.5px; }

.head-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding-bottom: 2px;
  font-size: 12.5px;
  color: var(--blue-l);
  white-space: nowrap;
  transition: color .2s;
}

.head-link .icon { width: 15px; height: 15px; }
.head-link:hover { color: var(--cyan); }
.head-link:hover .icon { transform: translateX(2px); }
.head-link .icon { transition: transform .2s; }

/* 版块卡片 */
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.board-card {
  position: relative;
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
  overflow: hidden;
}

.board-card::before {
  content: "";
  position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 2px;
  background: var(--cyan);
  opacity: 0;
  transition: opacity .25s;
}

.board-card:hover {
  transform: translateY(-3px);
  border-color: rgba(61, 163, 245, .42);
  background: #122039;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
}

.board-card:hover::before { opacity: 1; }

.board-top { display: flex; align-items: center; gap: 12px; }

.board-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid rgba(57, 197, 255, .24);
  border-radius: 10px;
  background: rgba(47, 129, 224, .11);
  color: var(--cyan);
}

.board-icon .icon { width: 21px; height: 21px; }

.board-name h3 { font-size: 16px; font-weight: 700; line-height: 1.35; }

.board-name > span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1.8px;
  color: var(--dim);
}

.board-desc {
  min-height: 47px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.board-foot {
  display: flex; gap: 16px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--dim);
}

.board-foot b { color: var(--muted); font-family: var(--font-mono); font-weight: 600; }

.board-latest {
  margin-top: 9px;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-latest span { margin-right: 6px; color: var(--gold); }

/* 首页两栏 */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 24px;
  align-items: start;
}

.sidebar { display: flex; flex-direction: column; gap: 16px; }

/* 主题列表 */
.thread-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  overflow: hidden;
}

.thread-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(27, 43, 68, .7);
  transition: background .2s;
}

.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: rgba(47, 129, 224, .055); }
.thread-row:hover .thread-title-text { color: #fff; }

.thread-row.is-pinned { background: rgba(247, 183, 51, .035); }

.thread-row.is-pinned::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold);
}

.thread-index {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 1px;
  color: var(--dim);
}

.thread-main { min-width: 0; }

.thread-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  min-width: 0;
}

.thread-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s;
}

.thread-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--dim);
}

.meta-author { color: var(--muted); }

.thread-counts { display: flex; gap: 16px; text-align: center; }

.thread-counts span { display: flex; flex-direction: column; gap: 1px; }
.thread-counts b { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--muted); }
.thread-counts em { font-style: normal; font-size: 9.5px; color: var(--dim); }

.list-foot {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 17, 31, .45);
  text-align: center;
}

.list-foot a { font-size: 12.5px; color: var(--blue-l); }
.list-foot a:hover { color: var(--cyan); }

/* 标签切换 */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 17, 31, .7);
}

.tab {
  padding: 6px 13px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--dim);
  font-size: 12px;
  cursor: pointer;
  transition: color .2s, background .2s, box-shadow .2s;
}

.tab:hover { color: var(--muted); }

.tab.on {
  background: rgba(47, 129, 224, .15);
  color: #9fd5ff;
  box-shadow: inset 0 0 0 1px rgba(61, 163, 245, .3);
}

/* 侧栏面板 */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 { font-size: 14.5px; font-weight: 700; }
.panel-body { padding: 14px 18px; }

.notice-list { display: flex; flex-direction: column; gap: 13px; }

.notice-list li { display: flex; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.dot-mark {
  width: 5px; height: 5px;
  margin-top: 7px;
  flex: 0 0 auto;
  background: var(--cyan);
  border-radius: 1px;
  transform: rotate(45deg);
}

.notice-list time {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
}

.member-list { display: flex; flex-direction: column; gap: 12px; }
.member-list li { display: flex; align-items: center; gap: 10px; }

.member-info { min-width: 0; }
.member-line { display: flex; align-items: center; gap: 6px; }

.member-name {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-meta { display: block; font-size: 10.5px; color: var(--dim); }

.online-dot {
  width: 6px; height: 6px;
  flex: 0 0 auto;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(46, 204, 113, .6);
}

.rule-list { display: flex; flex-direction: column; gap: 9px; }

.rule-list li {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.rule-list li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--blue);
}

/* ============================================================
   面包屑 / 二级页面
   ============================================================ */

.breadcrumb {
  max-width: var(--max);
  margin: 22px auto 0;
  padding: 0 24px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 11.5px;
  color: var(--dim);
}

.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span { color: var(--dim); opacity: .8; }

.page { padding: 18px 24px 10px; }

.board-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.board-main { min-width: 0; }
#threadMain { min-width: 0; }

.board-hero {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(17, 31, 52, .94), rgba(10, 20, 35, .78));
  overflow: hidden;
}

.board-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(77, 137, 220, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 137, 220, .05) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at 88% 0, #000, transparent 72%);
  mask-image: radial-gradient(ellipse at 88% 0, #000, transparent 72%);
  pointer-events: none;
}

.board-hero > * { position: relative; z-index: 1; }

.board-hero-main { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }

.board-icon-lg { width: 58px; height: 58px; border-radius: 14px; }
.board-icon-lg .icon { width: 28px; height: 28px; }

.board-hero h1 { margin: 6px 0 8px; font-size: 30px; line-height: 1.25; letter-spacing: -.4px; }
.board-hero p { max-width: 640px; color: var(--muted); font-size: 12.5px; line-height: 1.9; }

.board-meta {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--dim);
}

.board-meta b { color: var(--muted); font-weight: 600; }

.board-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  margin: 20px 0 12px;
  flex-wrap: wrap;
}

.board-toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.board-toolbar-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
  text-transform: uppercase;
}

.board-toolbar-note { font-size: 11.5px; color: var(--dim); }

/* 侧栏辅助 */
.side-board { display: flex; gap: 10px; align-items: flex-start; }

.side-board-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(57, 197, 255, .25);
  border-radius: 8px;
  background: rgba(47, 129, 224, .1);
  color: var(--cyan);
}

.side-board-icon .icon { width: 17px; height: 17px; }
.side-board b { display: block; font-size: 12.5px; }
.side-board p { margin-top: 4px; color: var(--dim); font-size: 11.5px; line-height: 1.7; }

.side-more {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--blue-l);
  font-size: 11.5px;
}

.side-more .icon { width: 14px; height: 14px; }
.side-more:hover { color: var(--cyan); }

.mod-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mod-label { margin-right: 2px; font-size: 10.5px; color: var(--dim); }

.mod-chip {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  color: var(--muted);
  font-size: 10.5px;
}

.side-links { display: flex; flex-direction: column; }

.side-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  transition: color .2s;
}

.side-link:last-child { border-bottom: 0; }
.side-link:hover { color: var(--cyan); }
.side-link b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--dim); }

/* ============================================================
   帖子详情
   ============================================================ */

.thread-page { padding-top: 18px; }
.thread-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }

.post-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.post-head {
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(47, 129, 224, .055), transparent);
}

.post-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.post-board-link {
  padding-left: 9px;
  border-left: 1px solid var(--line-2);
  color: var(--blue-l);
  font-size: 11.5px;
}

.post-title { font-size: 27px; font-weight: 700; line-height: 1.45; letter-spacing: -.3px; }

.post-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--dim);
}

.post-author { color: var(--blue-l); font-size: 12.5px; font-weight: 600; }

.post-body { display: grid; grid-template-columns: 182px minmax(0, 1fr); }

.post-author-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 20px;
  border-right: 1px solid var(--line);
  background: rgba(9, 17, 31, .45);
  text-align: center;
}

.post-author-card h2 { margin: 12px 0 8px; font-size: 14px; font-weight: 700; }

.level-badge {
  padding: 2px 9px;
  border: 1px solid rgba(57, 197, 255, .3);
  border-radius: 99px;
  background: rgba(57, 197, 255, .07);
  color: var(--cyan);
  font-size: 9.5px;
}

.post-author-card dl {
  width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
}

.post-author-card dt { font-size: 10px; color: var(--dim); }
.post-author-card dd { margin-top: 3px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--muted); }

.author-status {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1.6px;
  color: var(--dim);
}

.post-content {
  min-height: 260px;
  padding: 28px 32px 34px;
  color: #c7d6e9;
  font-size: 14.5px;
  line-height: 2.05;
}

.post-content p { margin-bottom: 17px; }
.post-content p:last-child { margin-bottom: 0; }

.post-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(9, 17, 31, .5);
}

.post-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.action-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}

.action-btn svg {
  width: 15px; height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-btn:hover { border-color: rgba(57, 197, 255, .42); color: var(--cyan); }

.action-btn.is-liked {
  border-color: rgba(229, 96, 77, .45);
  background: rgba(229, 96, 77, .08);
  color: #ff8b7d;
}

.action-btn.is-liked svg { fill: rgba(229, 96, 77, .18); }

.action-btn b { font-family: var(--font-mono); font-weight: 600; }

.post-sign { font-size: 11px; color: var(--dim); }

/* 回复 */
.replies {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.replies-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.replies-head h2 { margin-top: 5px; font-size: 18px; font-weight: 700; }
.replies-head h2 b { margin-left: 4px; font-family: var(--font-mono); font-size: 17px; font-weight: 600; color: var(--cyan); }
.replies-order { font-size: 11px; color: var(--dim); }

.reply-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(27, 43, 68, .62);
}

.reply-item:last-child { border-bottom: 0; }

.reply-main { min-width: 0; }

.reply-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.reply-who { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.reply-who b { font-size: 13px; color: var(--text); }
.reply-who time { font-size: 10.5px; color: var(--dim); }

.reply-level {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--dim);
  font-size: 9px;
}

.floor { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); }

.reply-content { margin-top: 8px; color: #b9c9de; font-size: 13.5px; line-height: 1.95; }
.reply-content p { margin-bottom: 10px; }
.reply-content p:last-child { margin-bottom: 0; }

/* 回复编辑 */
.reply-compose {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.compose-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 20px 24px 14px;
}

.compose-head h2 { margin-top: 5px; font-size: 18px; font-weight: 700; }
.compose-hint { font-size: 11.5px; color: var(--dim); }
#replyForm { padding: 0 24px 22px; }

textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #0a1424;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.8;
  resize: vertical;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

textarea:focus { border-color: rgba(57, 197, 255, .6); box-shadow: 0 0 0 3px rgba(47, 129, 224, .12); }
textarea::placeholder { color: #526a8a; }

.compose-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 12px;
}

.compose-note { font-size: 11px; color: var(--dim); }

/* 相关主题 */
.related-list { display: flex; flex-direction: column; }

.related-item { display: block; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.related-item:last-child { border-bottom: 0; padding-bottom: 0; }

.related-title { display: block; color: var(--text); font-size: 12.5px; line-height: 1.6; transition: color .2s; }
.related-item:hover .related-title { color: var(--cyan); }
.related-meta { display: block; margin-top: 4px; font-size: 10.5px; color: var(--dim); }

/* ============================================================
   空状态
   ============================================================ */

.empty-state { padding: 44px 24px; text-align: center; color: var(--dim); }
.empty-state h3 { margin-bottom: 8px; color: var(--text); font-size: 16px; }
.empty-state p { margin-bottom: 16px; font-size: 12.5px; }
.empty-page { padding: 80px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.empty-page h1 { margin-bottom: 12px; color: var(--text); font-size: 24px; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.empty-reply { padding: 30px 24px; }

/* ============================================================
   弹窗 / 表单
   ============================================================ */

.modal-mask {
  position: fixed; inset: 0; z-index: 120;
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 16, .76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-mask.is-open { display: flex; }

.modal {
  width: min(460px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: linear-gradient(160deg, #111f35, #0b1626);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  animation: modalIn .22s ease;
}

.modal-wide { width: min(620px, 100%); }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-kicker {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--cyan);
}

.modal-head h3 { font-size: 20px; font-weight: 700; }

.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--dim);
  cursor: pointer;
  transition: color .2s, background .2s;
}

.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.modal-body { padding: 20px 24px 2px; }

.form-note {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-left: 2px solid rgba(57, 197, 255, .4);
  border-radius: 0 6px 6px 0;
  background: rgba(47, 129, 224, .06);
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.8;
}

.field { display: block; margin-bottom: 14px; }

.field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

input, select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #0a1424;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input::placeholder { color: #526a8a; }

input:focus, select:focus {
  border-color: rgba(57, 197, 255, .6);
  box-shadow: 0 0 0 3px rgba(47, 129, 224, .12);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-error {
  min-height: 18px;
  color: #ff8a7a;
  font-size: 11.5px;
  line-height: 1.6;
}

.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px 22px;
}

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 140;
  padding: 11px 18px;
  border: 1px solid rgba(57, 197, 255, .35);
  border-radius: 8px;
  background: #13233a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  color: var(--text);
  font-size: 12.5px;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .22s, transform .22s;
  pointer-events: none;
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: rgba(229, 96, 77, .5); color: #ffb4aa; }

/* ============================================================
   页脚
   ============================================================ */

.site-footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  background: #070d19;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 38px 24px 30px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { max-width: 380px; color: var(--dim); font-size: 11.5px; line-height: 1.9; }

.footer-col h4 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
}

.footer-col a { display: block; padding: 4px 0; color: var(--dim); font-size: 11.5px; transition: color .2s; }
.footer-col a:hover { color: var(--cyan); }

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid rgba(27, 43, 68, .6);
  color: var(--dim);
  font-size: 11px;
}

.footer-bottom b { color: var(--blue-l); font-weight: 600; }

/* ============================================================
   动效
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.hero-main, .live-panel { animation: fadeUp .5s ease both; }
.live-panel { animation-delay: .08s; }

.board-card { animation: fadeUp .45s ease both; }
.board-card:nth-child(2) { animation-delay: .03s; }
.board-card:nth-child(3) { animation-delay: .06s; }
.board-card:nth-child(4) { animation-delay: .09s; }
.board-card:nth-child(5) { animation-delay: .12s; }
.board-card:nth-child(6) { animation-delay: .15s; }
.board-card:nth-child(7) { animation-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; }
  .live-panel { display: grid; grid-template-columns: 1fr; }
  .live-stats { grid-template-columns: repeat(4, 1fr); }
  .live-foot { margin-top: 0; }
  .board-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1060px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-grid .sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .home-grid .sidebar .panel:last-child { grid-column: 1 / -1; }
  .board-page-grid, .thread-grid { grid-template-columns: 1fr; }
  .board-page-grid .sidebar, .thread-grid .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1040px) {
  .header-inner { gap: 16px; }
  .main-nav { gap: 16px; }
  .search { width: 210px; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .search { display: none; }
  .menu-toggle { display: grid; }
  .header-actions { margin-left: auto; }

  .mobile-panel.is-open {
    display: block;
    position: absolute; left: 0; right: 0; top: 66px;
    padding: 14px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: #0a1526;
    box-shadow: 0 22px 44px rgba(0, 0, 0, .5);
  }

  .mobile-panel nav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }

  .mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 13.5px;
  }

  .mobile-panel nav a:hover, .mobile-panel nav a.on {
    background: rgba(47, 129, 224, .12);
    color: var(--cyan);
  }

  .mobile-panel .search { display: flex; width: 100%; margin-left: 0; }

  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .header-inner { height: 60px; padding: 0 16px; gap: 12px; }
  .brand-mark { width: 33px; height: 33px; font-size: 12.5px; }
  .brand-text { font-size: 14.5px; }
  .brand-text > span { font-size: 7.5px; letter-spacing: 1.8px; }
  .header-post { display: none; }
  .mobile-panel.is-open { top: 60px; padding: 12px 16px 16px; }

  .hero { padding: 28px 16px 8px; }
  .hero-main { padding: 26px 22px 24px; border-radius: 13px; }
  .hero-main::after { font-size: 140px; right: -6px; bottom: -36px; }
  .hero h1 { margin-top: 12px; font-size: 34px; letter-spacing: -.6px; }
  .hero-desc { font-size: 13px; line-height: 1.9; }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .hero-topics { margin-top: 20px; }
  .live-panel { padding: 20px; border-radius: 13px; }
  .live-stats { grid-template-columns: 1fr 1fr; }
  .live-stat b { font-size: 22px; }

  .section { padding: 38px 16px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .section-head h2 { font-size: 21px; }
  .section-head .tabs { align-self: flex-start; }
  .board-grid { grid-template-columns: 1fr; }
  .board-desc { min-height: 0; }
  .home-grid .sidebar { display: flex; }
  .home-grid .sidebar .panel:last-child { grid-column: auto; }

  .thread-row { grid-template-columns: minmax(0, 1fr) auto; padding: 13px 14px; }
  .thread-index { display: none; }
  .thread-counts { gap: 10px; }
  .thread-counts span:last-child { display: none; }
  .thread-title { font-size: 13.5px; }
  .thread-meta { font-size: 10.5px; }

  .breadcrumb { padding: 0 16px; margin-top: 16px; }
  .page { padding: 14px 16px 6px; }

  .board-hero { flex-direction: column; align-items: stretch; padding: 20px; gap: 18px; }
  .board-hero h1 { font-size: 23px; }
  .board-icon-lg { width: 46px; height: 46px; }
  .board-icon-lg .icon { width: 23px; height: 23px; }
  .board-hero .btn { width: 100%; }
  .board-page-grid .sidebar, .thread-grid .sidebar { display: flex; }
  .board-toolbar { align-items: flex-start; flex-direction: column; }

  .post-head { padding: 22px 20px 18px; }
  .post-title { font-size: 21px; }
  .post-body { grid-template-columns: 1fr; }
  .post-author-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  .post-author-card .avatar-lg { width: 48px; height: 48px; font-size: 18px; }
  .post-author-card h2 { margin: 0 0 5px; }
  .post-author-card dl { display: none; }
  .author-status { display: none; }
  .post-content { padding: 22px 20px 26px; font-size: 14px; line-height: 1.95; min-height: 0; }
  .post-foot { padding: 12px 18px; }
  .post-sign { display: none; }

  .replies-head, .compose-head { padding: 18px; }
  .reply-item { padding: 18px; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; }
  .reply-item .avatar-md { width: 38px; height: 38px; font-size: 14px; }
  #replyForm { padding: 0 18px 18px; }
  .compose-foot .btn { width: 100%; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .modal-head { padding: 18px 18px 14px; }
  .modal-body { padding: 18px 18px 2px; }
  .modal-foot { padding: 12px 18px 18px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 22px; padding: 28px 16px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { padding: 14px 16px; flex-direction: column; }
}

@media (max-width: 420px) {
  .user-name { display: none; }
  .user-chip { padding: 2px 6px 2px 2px; }
  .hero h1 { font-size: 30px; }
  .live-stats { grid-template-columns: 1fr 1fr; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 6px 8px; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ============================================================
   账号 / 等级 / 勋章
   ============================================================ */

.overline em { font-style: normal; }

.auth-tabs { display: flex; gap: 6px; padding: 14px 24px 0; }

.auth-tab {
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--dim);
  font-size: 12.5px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}

.auth-tab:hover { color: var(--muted); }

.auth-tab.on {
  border-color: rgba(57, 197, 255, .3);
  background: rgba(47, 129, 224, .1);
  color: var(--cyan);
}

.auth-pane[hidden] { display: none; }

.user-level {
  padding: 1px 5px;
  border: 1px solid rgba(57, 197, 255, .3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--cyan);
}

.user-menu-stat {
  display: block;
  padding: 5px 10px 9px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--dim);
}

.user-menu-link {
  display: block;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--blue-l);
  font-size: 12.5px;
  transition: background .2s, color .2s;
}

.user-menu-link:hover { background: rgba(47, 129, 224, .1); color: var(--cyan); }

.level-chip, .level-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid hsl(var(--h, 220) 70% 35%);
  border-radius: 99px;
  background: hsl(var(--h, 220) 70% 15%);
  color: hsl(var(--h, 220) 85% 75%);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  --h: 220;
}

.level-badge {
  padding: 3px 10px;
  font-size: 10.5px;
  border-radius: 8px;
  margin-top: 6px;
}

.title-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 5px;
  border: 1px solid hsl(var(--h, 40) 70% 38%);
  border-radius: 5px;
  background: hsl(var(--h, 40) 70% 16%);
  color: hsl(var(--h, 40) 88% 72%);
  font-size: 9.5px;
  line-height: 1.8;
  white-space: nowrap;
  --h: 40;
}

.title-icon {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
}

.author-titles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 14px;
}

/* 后台：称号编辑卡片 */
.title-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.title-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid hsl(var(--h, 40) 55% 26%);
  border-radius: 8px;
  background: hsl(var(--h, 40) 50% 12%);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s, transform .12s;
  --h: 40;
}
.title-item:hover { border-color: hsl(var(--h, 40) 70% 50%); background: hsl(var(--h, 40) 60% 18%); }
.title-item input[type="checkbox"] { display: none; }
.title-item input[type="checkbox"]:checked + .title-item-icon + .title-item-body { }
.title-item:has(input:checked) {
  border-color: hsl(var(--h, 40) 80% 60%);
  box-shadow: 0 0 0 2px hsl(var(--h, 40) 80% 30%);
  background: hsl(var(--h, 40) 65% 20%);
}

.title-item-icon {
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}

.title-item-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.title-item-body b {
  font-size: 12.5px;
  color: hsl(var(--h, 40) 88% 72%);
  font-weight: 600;
}
.title-item-body em {
  font-style: normal;
  font-size: 10px;
  color: hsl(var(--h, 40) 60% 55%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* 后台：等级覆盖输入行 */
.inline-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.inline-toggle-row input[type="number"] {
  width: 110px;
}
.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
}
.inline-toggle input {
  accent-color: var(--blue-l);
}
.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--dim);
  font-family: var(--font-mono);
}

.tag-hidden {
  color: #ff9a8a;
  border-color: rgba(229, 96, 77, .4);
  background: rgba(229, 96, 77, .1);
}

.post-limit {
  margin: -4px 0 8px;
  font-size: 10.5px;
  color: var(--dim);
}

.admin-preview-bar {
  margin-bottom: 16px;
  padding: 11px 16px;
  border: 1px solid rgba(229, 96, 77, .4);
  border-radius: 9px;
  background: rgba(229, 96, 77, .08);
  color: #ffb4aa;
  font-size: 12px;
}

.admin-preview-bar a { color: #ffd3cc; text-decoration: underline; }

/* ============================================================
   管理控制台
   ============================================================ */

.admin-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 14, 27, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.admin-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header-tag {
  padding: 3px 10px;
  border: 1px solid rgba(57, 197, 255, .26);
  border-radius: 99px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.6px;
}

.admin-header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.admin-user { display: flex; align-items: center; gap: 10px; }

.admin-user-chip { display: flex; align-items: center; gap: 9px; }
.admin-user-chip b { display: block; font-size: 12.5px; line-height: 1.3; }
.admin-user-chip span { display: block; font-size: 10px; color: var(--dim); }

.admin-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 24px 60px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-shell[hidden], .admin-gate[hidden] { display: none !important; }

.admin-side {
  position: sticky;
  top: 88px;
  padding: 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.admin-side-head { padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
.admin-side-head h1 { margin-top: 6px; font-size: 19px; font-weight: 700; }
.admin-side-head p { margin-top: 5px; color: var(--dim); font-size: 11px; }

.admin-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}

.admin-nav-item em { font-style: normal; font-family: var(--font-mono); font-size: 9.5px; color: var(--dim); }

.admin-nav-item:hover { background: rgba(47, 129, 224, .06); color: var(--text); }

.admin-nav-item.on {
  border-color: rgba(57, 197, 255, .3);
  background: rgba(47, 129, 224, .12);
  color: var(--cyan);
}

.admin-nav-item.on em { color: var(--cyan); }

.admin-side-foot {
  margin-top: 16px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  line-height: 1.7;
}

.admin-refresh {
  margin-top: 10px;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: rgba(10, 20, 36, .7);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.admin-refresh:hover { border-color: rgba(57, 197, 255, .4); color: var(--cyan); }

.admin-main { min-width: 0; }

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  padding: 2px 2px 16px;
  border-bottom: 1px solid var(--line);
}

.admin-page-head h2 { margin-top: 6px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.admin-page-head p { margin-top: 6px; max-width: 620px; color: var(--dim); font-size: 12px; }
.admin-result-count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--blue);
}

.stat-label { display: block; font-size: 11px; color: var(--dim); }
.stat-value { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 27px; font-weight: 600; color: var(--text); line-height: 1.2; }
.stat-hint { display: block; margin-top: 5px; font-size: 10px; color: var(--dim); }

.stat-card.tone-green::before { background: var(--green); }
.stat-card.tone-cyan::before { background: var(--cyan); }
.stat-card.tone-gold::before { background: var(--gold); }
.stat-card.tone-red::before { background: var(--red); }
.stat-card.tone-purple::before { background: #7a6ff0; }
.stat-card.tone-green .stat-value { color: #6ee7a0; }
.stat-card.tone-cyan .stat-value { color: var(--cyan); }
.stat-card.tone-gold .stat-value { color: #f7c65a; }
.stat-card.tone-red .stat-value { color: #ff9a8a; }
.stat-card.tone-purple .stat-value { color: #a99bff; }

.admin-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}

.admin-card-head { padding: 15px 20px 12px; border-bottom: 1px solid var(--line); }
.admin-card-head h3 { margin-top: 4px; font-size: 15px; font-weight: 700; }

.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.admin-table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 20, 36, .55);
  color: var(--dim);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(27, 43, 68, .55);
  font-size: 12.5px;
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(47, 129, 224, .05); }
.admin-table tr.is-off-row { opacity: .62; }

.admin-thread-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 460px; }
.admin-thread-title > span:last-child { color: var(--text); font-weight: 600; line-height: 1.55; }
.admin-sub-meta { margin-top: 4px; color: var(--dim); font-size: 10.5px; }
.admin-thread-link { color: var(--text); font-weight: 600; transition: color .2s; }
.admin-thread-link:hover { color: var(--cyan); }

.admin-status { display: flex; flex-wrap: wrap; gap: 4px; }

.status-chip {
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  color: var(--dim);
  font-size: 9.5px;
  white-space: nowrap;
}

.status-chip.is-pin { border-color: rgba(247, 183, 51, .4); background: rgba(247, 183, 51, .08); color: #f7c65a; }
.status-chip.is-feature { border-color: rgba(57, 197, 255, .36); background: rgba(57, 197, 255, .08); color: #82d6ff; }
.status-chip.is-off { border-color: rgba(229, 96, 77, .42); background: rgba(229, 96, 77, .1); color: #ff9a8a; }
.status-chip.is-on { border-color: rgba(46, 204, 113, .4); background: rgba(46, 204, 113, .1); color: #6ee7a0; }

.admin-num { font-family: var(--font-mono); color: var(--muted); font-weight: 600; }
.admin-nums { display: flex; gap: 12px; color: var(--dim); font-size: 10.5px; white-space: nowrap; }
.admin-nums b { font-family: var(--font-mono); color: var(--muted); font-size: 12px; }

.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: rgba(10, 20, 36, .7);
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.mini-btn:hover { border-color: rgba(57, 197, 255, .45); color: var(--cyan); background: rgba(47, 129, 224, .08); }
.mini-btn.is-danger:hover { border-color: rgba(229, 96, 77, .55); color: #ff9a8a; background: rgba(229, 96, 77, .08); }

.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.admin-toolbar input, .admin-toolbar select { width: auto; min-width: 170px; height: 38px; }
.admin-toolbar input[type="search"] { flex: 1; min-width: 220px; }
.toolbar-hint { color: var(--dim); font-size: 10.5px; }

.admin-empty { padding: 26px 16px; color: var(--dim); font-size: 12px; text-align: center; }
.admin-dim { color: var(--dim); font-size: 10.5px; }

.admin-user-cell { display: flex; align-items: center; gap: 9px; }
.admin-user-cell b { display: block; font-size: 12.5px; }
.admin-user-cell span { display: block; color: var(--dim); font-size: 10px; }

.admin-level { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.medal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 220px; }

.role-chip {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  color: var(--dim);
  font-size: 9.5px;
  white-space: nowrap;
}

.role-chip.is-admin {
  border-color: rgba(240, 169, 58, .42);
  background: rgba(240, 169, 58, .09);
  color: #f2c37c;
}

.admin-board-name b { display: block; color: var(--text); font-size: 12.5px; }
.admin-board-name span { display: block; margin-top: 2px; color: var(--dim); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .6px; }

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-form { padding: 18px 20px 20px; }
.admin-form .btn { width: 100%; margin-top: 4px; }

.admin-rule-list { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 6px; }
.admin-rule-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.admin-rule-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-rule-list b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }

.admin-tip { padding: 12px 20px 20px; color: var(--dim); font-size: 11px; line-height: 1.9; }

.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(10, 20, 36, .5);
  cursor: pointer;
}

.check-item input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--blue); cursor: pointer; }
.check-item b { display: block; color: var(--text); font-size: 11.5px; font-weight: 600; }
.check-item em { display: block; color: var(--dim); font-size: 9.5px; font-style: normal; line-height: 1.5; }

/* 后台登录入口 */

.admin-gate {
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
}

.gate-card {
  width: min(430px, 100%);
  padding: 32px 30px 26px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(160deg, #111f35, #0b1626);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.gate-card h1 { margin: 8px 0 10px; font-size: 24px; font-weight: 700; }
.gate-card > p { margin-bottom: 18px; color: var(--dim); font-size: 12px; line-height: 1.8; }
.gate-card .field { margin-bottom: 12px; }
.gate-submit { width: 100%; margin-top: 2px; }
.gate-note { margin-top: 14px !important; color: var(--dim); font-family: var(--font-mono); font-size: 10.5px; }
.gate-back { display: inline-block; margin-top: 16px; color: var(--blue-l); font-size: 11.5px; }
.gate-back:hover { color: var(--cyan); }

@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-nav-item { flex: 1 1 140px; justify-content: flex-start; }
  .admin-side-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .admin-refresh { width: auto; margin-top: 0; padding: 6px 12px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .admin-header-inner { height: 60px; padding: 0 16px; }
  .admin-header-tag { display: none; }
  .admin-shell { padding: 16px 16px 40px; }
  .admin-page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .admin-page-head h2 { font-size: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 22px; }
  .check-list { grid-template-columns: 1fr; }
  .admin-toolbar input, .admin-toolbar select { width: 100%; flex: 1 1 100%; }
  .admin-user { display: none; }
  .auth-tabs { padding: 12px 18px 0; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .admin-nav-item { flex: 1 1 100%; }
}

/* 头部账号菜单补充 */
.user-menu { min-width: 200px; }
.post-author-card dl > div:last-child { grid-column: 1 / -1; }
.post-author-card dl > div:last-child dd { margin-top: 2px; }

@media (max-width: 1040px) {
  .user-level { display: none; }
}
