/* ============================================================
   uestc.gay — 样式表
   深色 + 极光渐变 + 玻璃拟态，纯手写无框架
   ============================================================ */

:root {
  --bg: #08080c;
  --bg-soft: #0e0e15;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #14141d;
  --panel-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ecedf2;
  --text-dim: #9b9db0;
  --text-faint: #6b6d80;
  --accent: #ff5c8a;
  --accent-2: #7c5cff;
  --accent-3: #29e0c8;
  --danger: #ff5f56;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 48px -18px rgba(0, 0, 0, 0.9);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 背景极光 ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  will-change: transform;
}
.b1 {
  width: 46vw; height: 46vw;
  background: var(--accent-2);
  top: -14vw; left: -8vw;
  animation: drift1 26s ease-in-out infinite;
}
.b2 {
  width: 40vw; height: 40vw;
  background: var(--accent);
  top: 18vh; right: -12vw;
  animation: drift2 32s ease-in-out infinite;
}
.b3 {
  width: 36vw; height: 36vw;
  background: var(--accent-3);
  bottom: -14vw; left: 22vw;
  opacity: 0.24;
  animation: drift3 38s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6vw, 5vh, 0) scale(1.14); }
}
@keyframes drift2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-7vw, -4vh, 0) scale(0.88); }
}
@keyframes drift3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(4vw, -6vh, 0) scale(1.1); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(14px, 4vw, 32px);
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 6px 18px -6px var(--accent);
}
.brand-logo {
  width: 34px; height: 34px;
  object-fit: contain;
  flex: none;
  /* 校徽是白底图，深色背景下加个圆底更协调 */
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.8);
}
.brand-text { font-size: 17px; }
.brand-text .dot { color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.ghost-btn:hover {
  background: var(--panel-hover);
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.ghost-btn:active { transform: translateY(0); }
.ghost-btn.small { padding: 6px 12px; font-size: 12.5px; }

.toggle .toggle-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.2s ease;
}
.toggle[aria-pressed="true"] {
  background: rgba(255, 92, 138, 0.16);
  border-color: rgba(255, 92, 138, 0.5);
  color: #ffb3c8;
}
.toggle[aria-pressed="true"] .toggle-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- 布局 ---------- */
.wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(14px, 4vw, 24px) 80px;
}

/* ---------- Hero ---------- */
.hero { margin-bottom: 32px; }
.kicker {
  margin: 0 0 10px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 600;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 55%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 46ch;
}
.hero .spicy {
  margin: 0 0 22px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: rgba(255, 92, 138, 0.07);
  color: #ffc4d6;
  font-size: 13.5px;
  max-width: 52ch;
}
.hero .spicy::before { content: "🌶️ "; }
.stat-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stat {
  flex: 1 1 120px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
}
.stat b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 12px; color: var(--text-faint); }

/* ---------- 通用面板（校园入口 / AI） ---------- */
.panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(12px);
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel-note { font-size: 11.5px; color: var(--text-faint); }

/* 校园入口宫格 */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.link-card {
  position: relative;
  display: block;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s ease;
  overflow: hidden;
}
.link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, hsl(var(--accent) 80% 60% / 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.link-card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--accent) 70% 55% / 0.55);
  background: rgba(0, 0, 0, 0.3);
}
.link-card:hover::after { opacity: 1; }
.link-card.featured { border-color: hsl(var(--accent) 70% 55% / 0.4); }
.link-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.link-icon { font-size: 17px; }
.link-name { font-size: 13.5px; font-weight: 600; }
.link-desc {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.link-lock {
  position: absolute;
  top: 9px; right: 10px;
  font-size: 10px;
  opacity: 0.65;
}

/* QQ 群 */
.qq-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
  flex-wrap: wrap;
}
.qq-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, #12b7f5, #0a84d8);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 10px 24px -12px #12b7f5;
  transition: all 0.2s ease;
}
.qq-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px #12b7f5; }
.qq-icon { font-size: 19px; }
.qq-text { display: flex; flex-direction: column; line-height: 1.25; }
.qq-text b { font-size: 14px; }
.qq-text small { font-size: 11px; opacity: 0.85; font-weight: 400; }
.qq-hint { margin: 0; font-size: 12.5px; color: var(--text-faint); }

/* Telegram 群 */
.tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, #2aabee, #229ed9);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 10px 24px -12px #2aabee;
  transition: all 0.2s ease;
}
.tg-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px #2aabee; }
.tg-icon { font-size: 19px; }

/* ---------- 二级域名注册 ---------- */
.domain-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}
.domain-lead b { color: var(--text); }
.domain-lead code {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  color: var(--accent-3);
}
.domain-perks {
  margin: 0 0 18px;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.9;
}
.domain-perks b { color: var(--text-dim); }

.domain-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 11px 22px;
}

.domain-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}
.domain-user img {
  border-radius: 50%;
  flex: none;
  background: rgba(255, 255, 255, 0.08);
}
.domain-user-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.domain-user-info b { font-size: 14px; }
.domain-user-info small { font-size: 11.5px; color: var(--text-faint); }

.domain-form {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.domain-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.domain-row input,
.domain-row select {
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease;
}
.domain-row input:focus,
.domain-row select:focus { border-color: hsl(265 70% 60% / 0.6); }
#domain-name { flex: 1 1 140px; min-width: 0; }
#domain-target { flex: 2 1 200px; min-width: 0; }
#domain-type { flex: 0 0 auto; }
.domain-suffix {
  font-size: 14px;
  color: var(--text-faint);
  white-space: nowrap;
  flex: none;
}
.domain-avail { font-size: 12px; flex: none; }
.domain-avail.ok { color: var(--accent-3); }
.domain-avail.bad { color: var(--danger); }

.domain-proxy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}
.domain-proxy input { accent-color: var(--accent-2); margin: 0; }

.domain-list { display: flex; flex-direction: column; gap: 10px; }
.domain-card {
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}
.domain-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}
.domain-fqdn {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-3);
  text-decoration: none;
  word-break: break-all;
}
.domain-fqdn:hover { text-decoration: underline; }
.domain-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(124, 92, 255, 0.18);
  color: #c9b6ff;
  border: 1px solid rgba(124, 92, 255, 0.35);
}
.domain-badge.proxy {
  background: rgba(255, 159, 28, 0.15);
  color: #ffce8f;
  border-color: rgba(255, 159, 28, 0.35);
}
.domain-target {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 0 0 9px;
  word-break: break-all;
}
.domain-target code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
}
.domain-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.domain-actions button {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.domain-actions button:hover {
  background: var(--panel-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.domain-actions button.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 95, 86, 0.5);
}
.domain-empty {
  padding: 24px 16px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- 成电文库 ---------- */
.lib-list { display: flex; flex-direction: column; gap: 10px; }
.lib-item {
  position: relative;
  display: block;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s ease;
}
.lib-item::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: hsl(var(--accent) 75% 60%);
}
.lib-item:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--accent) 70% 55% / 0.5);
  background: rgba(0, 0, 0, 0.3);
}
.lib-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.lib-title { font-size: 14.5px; font-weight: 600; }
.lib-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: hsl(var(--accent) 60% 50% / 0.18);
  color: hsl(var(--accent) 80% 76%);
  border: 1px solid hsl(var(--accent) 60% 55% / 0.35);
}
.lib-author { font-size: 11.5px; color: var(--text-faint); margin-left: auto; }
.lib-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}
.lib-rights {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 180, 84, 0.08);
  border: 1px dashed rgba(255, 180, 84, 0.3);
  font-size: 11.5px;
  color: #ffce8f;
  line-height: 1.6;
}
.lib-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11.5px;
  color: hsl(var(--accent) 80% 72%);
}
.lib-item.locked { cursor: default; }
.lib-item.locked:hover { transform: none; border-color: var(--border); }

/* ---------- 成电DICK AI ---------- */
.ai-panel { border-color: hsl(265 70% 55% / 0.32); }
.ai-panel .panel-head h2 { color: #c9b6ff; }
.accent-btn {
  background: linear-gradient(120deg, hsl(265 70% 55% / 0.2), hsl(200 80% 55% / 0.18));
  border-color: hsl(265 70% 60% / 0.45);
  color: #d3c4ff;
}
.accent-btn:hover { color: #fff; border-color: hsl(265 70% 65% / 0.7); }

.ai-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 2px 12px;
  scroll-behavior: smooth;
}
.ai-msg { display: flex; gap: 9px; align-items: flex-start; }
.ai-msg-user { flex-direction: row-reverse; }
.ai-avatar {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 15px;
  background: hsl(265 60% 24%);
  border: 1px solid hsl(265 70% 50% / 0.5);
}
.ai-msg-user .ai-avatar {
  background: hsl(320 55% 24%);
  border-color: hsl(320 70% 55% / 0.5);
}
.ai-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
}
.ai-msg-user .ai-bubble {
  background: linear-gradient(120deg, hsl(320 60% 30% / 0.55), hsl(265 60% 32% / 0.55));
  border-color: hsl(320 70% 55% / 0.35);
}
.ai-tip { color: var(--text-faint); font-size: 12px; }
.ai-typing { display: inline-flex; gap: 4px; align-items: center; }
.ai-typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: blink 1.2s infinite;
}
.ai-typing i:nth-child(2) { animation-delay: 0.2s; }
.ai-typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.ai-error {
  border-color: rgba(255, 95, 86, 0.45) !important;
  color: #ffb3ad;
}

.ai-quick {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ai-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.ai-chip:hover {
  background: var(--panel-hover);
  color: var(--text);
  border-color: hsl(265 70% 60% / 0.5);
  transform: translateY(-1px);
}

.ai-form { display: flex; gap: 9px; align-items: flex-end; }
#ai-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  max-height: 140px;
  outline: none;
  transition: border-color 0.2s ease;
}
#ai-input:focus { border-color: hsl(265 70% 60% / 0.6); }
#ai-input::placeholder { color: var(--text-faint); }
.ai-send { padding: 11px 20px; flex: none; }

/* ---------- 发布框 ---------- */
/* 站点公告 */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 180, 84, 0.38);
  background: rgba(255, 180, 84, 0.1);
  font-size: 13px;
  line-height: 1.6;
  color: #ffd8a6;
}
.notice-icon { flex: none; line-height: 1.6; }
.notice-text { margin: 0; }
.notice-text b { color: #ffb454; }

.composer {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  margin-bottom: 34px;
}
.composer:focus-within { border-color: rgba(255, 92, 138, 0.4); }

.composer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.nick-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.nick-prefix { font-size: 12px; color: var(--text-faint); flex: none; }
#nick {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
#nick::placeholder { color: var(--text-faint); }

.dice-btn {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.dice-btn:hover { background: var(--panel-hover); transform: rotate(-14deg) scale(1.08); }
.dice-btn.spin { animation: spin 0.5s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

#body {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  min-height: 104px;
  outline: none;
  transition: border-color 0.2s ease;
}
#body:focus { border-color: rgba(255, 92, 138, 0.45); }
#body::placeholder { color: var(--text-faint); }

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
/* 人机验证槽：未启用验证时是空的，靠 :empty 隐藏，不留空白 */
.cap-slot { margin-top: 12px; }
.cap-slot:empty { display: none; }
.cap-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cap-question {
  font-size: 13.5px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.cap-input {
  width: 84px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-align: center;
}
.cap-input:focus { border-color: rgba(255, 92, 138, 0.45); outline: none; }
.cap-refresh {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.3s ease;
}
.cap-refresh:hover { color: var(--accent); border-color: rgba(255, 92, 138, 0.45); transform: rotate(-90deg); }
.mood-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.mood-btn {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  filter: grayscale(0.6) opacity(0.6);
}
.mood-btn:hover { background: var(--panel-hover); filter: none; transform: translateY(-2px); }
.mood-btn[aria-checked="true"] {
  background: rgba(255, 92, 138, 0.16);
  border-color: rgba(255, 92, 138, 0.45);
  filter: none;
}

.composer-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.counter { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.counter.warn { color: #ffb454; }

.nsfw-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}
.nsfw-check:has(input:checked) {
  background: rgba(255, 92, 138, 0.14);
  border-color: rgba(255, 92, 138, 0.5);
  color: #ffb3c8;
}
.nsfw-check input { accent-color: var(--accent); margin: 0; }

/* 勾选框就近提醒：紧跟在 NSFW 勾选框下方 */
.nsfw-tip {
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: #ffb454;
}

.primary-btn {
  position: relative;
  padding: 10px 24px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 10px 26px -10px var(--accent);
}
.primary-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 32px -10px var(--accent); }
.primary-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.primary-btn.loading .btn-text { opacity: 0; }
.primary-btn.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.hint {
  margin: 10px 2px 0;
  font-size: 12.5px;
  min-height: 18px;
  color: var(--text-faint);
}
.hint.error { color: var(--danger); }
.hint.ok { color: var(--accent-3); }

/* ---------- 信息流 ---------- */
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.feed-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
/* 信息流：宽屏走多列瀑布流，一屏能扫到更多整活，不用一路往下翻 */
.feed { columns: 1; column-gap: 14px; }
.feed > * { break-inside: avoid; margin-bottom: 14px; }
@media (min-width: 760px) { .feed { columns: 2; } }
@media (min-width: 1240px) { .feed { columns: 3; } }

/* 筛选栏：搜昵称/内容 + 按心情 */
.feed-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 180px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}
.search-field:focus-within { border-color: rgba(255, 92, 138, 0.45); }
.search-icon { font-size: 12px; opacity: 0.7; }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.search-field input::placeholder { color: var(--text-faint); }
.mood-select {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.feed-count { font-size: 12.5px; color: var(--text-faint); }
/* 空态/骨架屏在多列里横跨整行，别只占一列 */
.feed .empty { column-span: all; }

.card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.2s ease;
  animation: cardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: hsl(var(--hue, 320) 80% 62%);
  opacity: 0.85;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.avatar {
  flex: none;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: hsl(var(--hue, 320) 62% 22%);
  border: 1px solid hsl(var(--hue, 320) 70% 40% / 0.6);
  font-size: 16px;
}
.card-meta { min-width: 0; flex: 1; }
.card-nick {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: hsl(var(--hue, 320) 75% 76%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-time { font-size: 11.5px; color: var(--text-faint); }
.card-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.2s ease; }
.card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; }
.icon-btn {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover { background: var(--panel-hover); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }

.card-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 15px;
  color: #dfe0e8;
}
.card-body.spoiler {
  filter: blur(6px);
  cursor: pointer;
  user-select: none;
  transition: filter 0.25s ease;
}
.card-body.spoiler:hover { filter: blur(4px); }
.card-body.revealed { filter: none; cursor: auto; user-select: auto; }

.nsfw-veil {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 92, 138, 0.14);
  border: 1px solid rgba(255, 92, 138, 0.4);
  color: #ffb3c8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.card-fortune {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--text-dim);
}
.card-fortune b { color: var(--text); }

.card-reactions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.react-btn:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px) scale(1.04);
}
.react-btn.bump { animation: bump 0.34s ease; }
.react-btn.mine {
  border-color: rgba(255, 92, 138, 0.55);
  background: rgba(255, 92, 138, 0.13);
  color: #ffb3c8;
}
.react-count { font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes bump {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.24); }
  100% { transform: scale(1); }
}

/* 骨架屏 */
.skeleton {
  height: 118px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(100deg, rgba(255,255,255,0.035) 30%, rgba(255,255,255,0.075) 50%, rgba(255,255,255,0.035) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

.feed-more { display: grid; place-items: center; margin-top: 22px; }
.feed-end { color: var(--text-faint); font-size: 13px; text-align: center; }

.empty {
  padding: 46px 20px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  color: var(--text-dim);
}
.empty .big { font-size: 34px; display: block; margin-bottom: 10px; }

/* ---------- 弹窗 ---------- */
/* 弹层容器：flex + 卡片 margin:auto 居中。
   这样即使卡片因为任何原因比视口高，也能从顶部开始排布并让容器自身滚动，
   不会像 place-items:center 那样把上下两端裁到视口外、既划不动也点不到关闭。 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.76);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  width: min(430px, 100%);
  margin: auto;
  max-height: 84vh;
  max-height: 84dvh;
  overflow-y: auto;
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  animation: popIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
}
.modal-close:hover { background: var(--panel-hover); color: var(--text); }
.modal-title { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.modal-sub { margin: 0 0 18px; font-size: 13px; color: var(--text-faint); }

/* 抽签结果 */
.fortune-card { text-align: center; padding: 8px 0 4px; }
.fortune-level {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.fortune-label { font-size: 13px; color: var(--text-faint); letter-spacing: 0.2em; margin-bottom: 18px; }
.fortune-text {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--border-strong);
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.fortune-nick { font-size: 12.5px; color: var(--text-faint); margin-bottom: 18px; }
.fortune-nick b { color: var(--accent-3); }

/* 热榜 */
.hot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hot-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
}
.hot-rank {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-hover);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}
.hot-item:nth-child(1) .hot-rank { background: linear-gradient(135deg, #ffd166, #ff9f1c); color: #2a1a00; }
.hot-item:nth-child(2) .hot-rank { background: linear-gradient(135deg, #d8dae5, #9aa0b5); color: #1c1f2b; }
.hot-item:nth-child(3) .hot-rank { background: linear-gradient(135deg, #e0a172, #b87333); color: #2a1600; }
.hot-body { min-width: 0; flex: 1; }
.hot-nick { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.hot-text {
  font-size: 13.5px;
  margin: 3px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.hot-heat { font-size: 11.5px; color: var(--accent); margin-top: 5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 120;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(22, 22, 30, 0.96);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: toastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast[hidden] { display: none; }
.toast.error { border-color: rgba(255, 95, 86, 0.5); }
.toast.ok { border-color: rgba(41, 224, 200, 0.5); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 页脚 ---------- */
.footer {
  padding: 34px 20px 44px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12.5px;
}
.footer p { margin: 0 0 6px; }
.footer-fine { max-width: 44ch; margin: 0 auto !important; opacity: 0.75; line-height: 1.7; }

/* ---------- 响应式 ---------- */
@media (max-width: 560px) {
  .topbar {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions .ghost-btn {
    padding: 7px 11px;
    font-size: 12px;
    flex: none;
  }
  .toggle-label { display: none; }
  .composer-right { width: 100%; justify-content: space-between; }
  .primary-btn { flex: 1; }
  .card-actions { opacity: 1; }
  .stat { flex: 1 1 88px; padding: 12px; }
  .stat b { font-size: 19px; }

  .link-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .link-card { padding: 11px 12px; }
  .link-desc { font-size: 11px; }
  .qq-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .qq-btn { justify-content: center; }
  .qq-hint { text-align: center; }

  .ai-bubble { max-width: 88%; font-size: 13.5px; }
  .ai-chat { max-height: 340px; }
  .ai-form { flex-wrap: nowrap; }
  .ai-send { padding: 11px 15px; font-size: 13px; }

  .modal-card { padding: 22px 18px; }
  .toast { bottom: 16px; font-size: 13px; }
}

@media (max-width: 360px) {
  .link-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection { background: rgba(255, 92, 138, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   多页面组件（域名页 / 个人页 / 文库页 / 后台）
   ============================================================ */

.wrap-narrow { width: min(820px, 100%); }

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--text-faint);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.16s ease;
}
.back-link:hover { color: var(--text); }

.page-head { margin-bottom: 24px; }
.page-head h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -0.02em;
  font-weight: 800;
}
.page-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.75;
  max-width: 60ch;
}
.page-sub code, .perk-list code, .help-list code, .field-hint code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  color: var(--accent-3);
}

.panel-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.panel-sub { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.75; }
.panel-muted { background: rgba(255, 255, 255, 0.025); }

.skeleton-tall { height: 200px; margin-bottom: 20px; }

/* ---------- 快捷入口宫格 ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.quick-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.quick-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, hsl(var(--accent) 80% 60% / 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.quick-card:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--accent) 70% 55% / 0.55);
}
.quick-card:hover::after { opacity: 1; }
.quick-icon { font-size: 20px; }
.quick-card b { font-size: 14px; font-weight: 600; position: relative; z-index: 1; }
.quick-card small {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* ---------- 顶栏导航态 ---------- */
.topbar-actions .ghost-btn.active {
  background: rgba(255, 92, 138, 0.16);
  border-color: rgba(255, 92, 138, 0.45);
  color: #ffb3c8;
}
.nav-avatar { border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.1); }

/* ---------- 表单字段 ---------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.field input[type="text"],
.field input[type="password"],
.field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease;
}
.field input:focus, .field select:focus { border-color: hsl(265 70% 60% / 0.6); }
.field-hint { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-faint); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  user-select: none;
}
.check-row input { accent-color: var(--accent-2); margin: 3px 0 0; flex: none; }
.check-row span { display: flex; flex-direction: column; gap: 3px; }
.check-row b { font-size: 13px; font-weight: 600; }
.check-row small { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.big-btn { padding: 13px 26px; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }

.perk-list, .help-list {
  margin: 0 0 20px;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 2;
}
.perk-list b, .help-list b { color: var(--text); }
.help-list { counter-reset: step; list-style: decimal; }

/* ---------- 域名卡片 ---------- */
.domain-when { margin: 6px 0 0; font-size: 11.5px; color: var(--text-faint); }
.domain-empty a { margin-left: 4px; }

/* ---------- 个人信息页 ---------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.profile-avatar {
  border-radius: 50%;
  flex: none;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--border-strong);
}
.profile-info { flex: 1; min-width: 0; }
.profile-info h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-all;
}
.profile-name { margin: 0 0 4px; font-size: 14px; color: var(--text-dim); }
.profile-meta { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.danger-btn:hover { color: var(--danger) !important; border-color: rgba(255, 95, 86, 0.5) !important; }

.info-list { margin: 0; display: flex; flex-direction: column; gap: 1px; }
.info-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.info-list > div:last-child { border-bottom: none; }
.info-list dt { font-size: 13px; color: var(--text-faint); }
.info-list dd { margin: 0; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 管理后台 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 560px;
}
.data-table th {
  text-align: left;
  padding: 9px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-dim);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.data-table tr.row-banned td { opacity: 0.55; }
.data-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.table-empty { text-align: center; padding: 28px 10px !important; color: var(--text-faint); }

.user-cell { display: flex; align-items: center; gap: 7px; }
.user-cell span { color: var(--text); font-weight: 500; }

.badge-ok, .badge-danger {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-ok {
  background: rgba(41, 224, 200, 0.14);
  color: #7ce8d8;
  border: 1px solid rgba(41, 224, 200, 0.35);
}
.badge-danger {
  background: rgba(255, 95, 86, 0.14);
  color: #ffb3ad;
  border: 1px solid rgba(255, 95, 86, 0.4);
}

.mini-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.mini-btn:hover {
  background: var(--panel-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.mini-btn.danger:hover { color: var(--danger); border-color: rgba(255, 95, 86, 0.5); }

.selfcheck-box {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: rgba(0, 0, 0, 0.2);
  font-size: 13px;
  color: var(--text-dim);
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.7;
}
.selfcheck-box.ok { border-color: rgba(41, 224, 200, 0.45); color: #7ce8d8; }
.selfcheck-box.bad { border-color: rgba(255, 95, 86, 0.45); color: #ffb3ad; }

.audit-list { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.audit-row {
  display: grid;
  grid-template-columns: 150px 140px 1fr;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.audit-row:hover { background: rgba(255, 255, 255, 0.025); }
.audit-time { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.audit-action { color: var(--accent-3); font-weight: 600; }
.audit-detail { color: var(--text-dim); word-break: break-all; }

.feed-tools { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .audit-row { grid-template-columns: 1fr; gap: 2px; }
  .audit-time { font-size: 11px; }
  .profile-card { flex-direction: column; align-items: flex-start; }
  .info-list > div { flex-direction: column; gap: 3px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}


.user-email { font-size: 11px; color: var(--text-faint); margin-top: 2px; word-break: break-all; }

/* ---------- 评论：入口按钮 + 弹层内滚动列表 ---------- */
.comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.comment-btn:hover {
  background: var(--panel-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.comment-count { font-variant-numeric: tabular-nums; font-weight: 600; }

/* 固定高度 + 内部滚动：评论再多也不会把弹层和信息流撑长 */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 42vh;
  max-height: 42dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: 14px;
  padding-right: 4px;
}
.comment-item { border-left: 2px solid var(--border); padding-left: 10px; }
.comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comment-nick { font-size: 12.5px; font-weight: 600; color: var(--text); }
.comment-time { font-size: 11px; color: var(--text-faint); }
.comment-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-empty {
  margin: 0;
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}
.comment-form { display: block; }
.comment-nick-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.comment-nick-input {
  flex: 1;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color 0.2s ease;
}
.comment-nick-input:focus { border-color: rgba(255, 92, 138, 0.45); outline: none; }
.comment-nick-input::placeholder { color: var(--text-faint); }
.comment-dice { width: 32px; height: 32px; font-size: 14px; }
.comment-row { display: flex; gap: 8px; align-items: flex-end; }
.comment-input {
  flex: 1;
  min-height: 38px;
  max-height: 96px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  resize: none;
}
.comment-input:focus { outline: none; border-color: var(--border-strong); }
.comment-send { padding: 9px 16px; font-size: 13.5px; white-space: nowrap; }

/* ---------- 管理后台：评论表格 ---------- */
.comment-admin-body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  max-width: 340px;
  word-break: break-word;
}
.comment-admin-meta { font-size: 11px; color: var(--text-faint); margin-top: 3px; }

/* ============================================================
   现代化动效层
   —— 集中放这里，要回退整段删掉即可恢复原样
   ============================================================ */

/* ---------- 全局手感 ---------- */
html { scroll-behavior: smooth; }
::selection { background: rgba(255, 92, 138, 0.32); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

.wrap { animation: pageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* 顶栏滚起来之后加深，做出层次 */
body.scrolled .topbar {
  background: rgba(8, 8, 12, 0.9);
  box-shadow: 0 12px 32px -20px rgba(0, 0, 0, 0.95);
  border-bottom-color: var(--border-strong);
}

/* ---------- 卡片：错峰浮现 + 悬浮抬升 + 光标跟随高光 ---------- */
.card {
  animation-delay: calc(min(var(--i, 0), 12) * 45ms);
}
.card:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--hue, 320) 72% 58% / 0.45);
  box-shadow:
    0 26px 54px -26px rgba(0, 0, 0, 0.98),
    0 0 0 1px hsl(var(--hue, 320) 72% 58% / 0.18);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    hsl(var(--hue, 320) 85% 68% / 0.14),
    transparent 62%
  );
}
.card:hover::after { opacity: 1; }

/* ---------- 主按钮：光泽扫过 + 按下回弹 ---------- */
.primary-btn { overflow: hidden; } /* 光泽条要裁在圆角内 */
.primary-btn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.primary-btn:hover:not(:disabled)::before { left: 130%; }
.primary-btn:active:not(:disabled) { transform: scale(0.97); }

/* ---------- 胶囊按钮：按下回弹 + 选中发光 + 数字弹跳 ---------- */
.react-btn:active, .comment-btn:active { transform: scale(0.9); }
.react-btn.mine {
  box-shadow:
    0 0 0 1px rgba(255, 92, 138, 0.35),
    0 8px 20px -10px rgba(255, 92, 138, 0.7);
}
.react-btn.pop, .comment-btn.pop { animation: pillPop 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pillPop {
  0%   { transform: scale(1); }
  38%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.react-count, .comment-count { display: inline-block; }
.react-count.pop, .comment-count.pop { animation: countPop 0.44s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes countPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ---------- 评论：逐条滑入 + 新评论高亮 ---------- */
.comment-item {
  animation: commentIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(min(var(--i, 0), 12) * 35ms);
  padding: 6px 8px 6px 10px;
  border-radius: 0 10px 10px 0;
  transition: background 0.9s ease;
}
@keyframes commentIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.comment-item.fresh { background: rgba(255, 92, 138, 0.15); }

/* ---------- 弹层：更柔和的入场 ---------- */
.modal-backdrop { animation: fadeIn 0.24s ease both; }
.modal-card { animation: modalPop 0.34s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 细滚动条 ---------- */
.comment-list, .modal-card, .table-wrap {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.comment-list::-webkit-scrollbar,
.modal-card::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
.comment-list::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}
.comment-list::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* ---------- 无障碍：系统要求减少动效时，全部关掉 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
