/* ============================================
   存在大厅 — UI Design System v6 · Ghost 美学
   设计原则：通透 · 克制 · 一致 · 内容优先
   ============================================ */

/* ==========================================
   1. 设计令牌 Design Tokens
   ========================================== */
:root {
  /* ---- 品牌色 ---- */
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* ---- 中性色 Light ---- */
  --bg: #f0f5ff;
  --card: #ffffff;
  --card-hover: #f8faff;
  --surface: #f8fafc;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --text-muted: #cbd5e1;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --ring: #dbeafe;

  /* ---- 语义色 ---- */
  --success: #22c55e;
  --success-bg: #f0fdf4;
  --success-text: #15803d;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #dc2626;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  /* ---- 排版 ---- */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.813rem;  /* 13px */
  --font-size-base: 0.938rem;/* 15px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-huge: 2rem;    /* 32px */

  --line-height-tight: 1.3;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ---- 间距 (4px 基准) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* ---- 圆角 ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* ---- 阴影 (浅色) ---- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* ---- 动画 ---- */
  --transition-fast: 0.15s ease;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* ---- 渐变 ---- */
  --grad-brand: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --grad-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-cool: linear-gradient(135deg, #06b6d4, #3b82f6);
  --grad-rose: linear-gradient(135deg, #ec4899, #8b5cf6);
  --grad-green: linear-gradient(135deg, #22c55e, #06b6d4);

  /* ---- Z 层级 ---- */
  --z-dropdown: 50;
  --z-fab: 95;
  --z-nav: 100;
  --z-modal: 200;
  --z-toast: 9999;

  /* ---- 布局 ---- */
  --header-height: 52px;
  --nav-bottom-height: 60px;
  --content-max: 600px;
  --content-wide-max: 900px;
  --content-full-max: 1200px;
}

/* ==========================================
   2. 深色主题 Dark Theme
   — 显式暗色模式（用户手动切换）
   — 系统暗色模式（跟系统，值必须与上方同步）
   ========================================== */
[data-theme="dark"] {
  --primary-50: #1e3a5f;
  --primary-100: #1e3a8a;
  --primary-200: #1e40af;
  --primary-300: #1d4ed8;
  --primary-400: #2563eb;
  --primary-500: #3b82f6;
  --primary-600: #60a5fa;
  --primary-700: #93c5fd;
  --primary-800: #bfdbfe;
  --primary-900: #dbeafe;

  --bg: #0f172a;
  --card: #1e293b;
  --card-hover: #273548;
  --surface: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-light: #94a3b8;
  --text-lighter: #64748b;
  --text-muted: #475569;
  --border: #334155;
  --border-light: #1e293b;
  --ring: #1e3a5f;

  --success-bg: #052e16;
  --success-text: #4ade80;
  --danger-bg: #450a0a;
  --danger-text: #f87171;
  --warning-bg: #451a03;
  --warning-text: #fbbf24;
  --info-bg: #1e3a5f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ⚡ 系统暗色模式（值同上方，CSS 原生无法复用变量块，必须保持同步） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --primary-50: #1e3a5f;
    --primary-100: #1e3a8a;
    --primary-200: #1e40af;
    --primary-300: #1d4ed8;
    --primary-400: #2563eb;
    --primary-500: #3b82f6;
    --primary-600: #60a5fa;
    --primary-700: #93c5fd;
    --primary-800: #bfdbfe;
    --primary-900: #dbeafe;

    --bg: #0f172a;
    --card: #1e293b;
    --card-hover: #273548;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --text-lighter: #64748b;
    --text-muted: #475569;
    --border: #334155;
    --border-light: #1e293b;
    --ring: #1e3a5f;

    --success-bg: #052e16;
    --success-text: #4ade80;
    --danger-bg: #450a0a;
    --danger-text: #f87171;
    --warning-bg: #451a03;
    --warning-text: #fbbf24;
    --info-bg: #1e3a5f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

/* ==========================================
   3. 基础重置
   ========================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-bottom-height) + var(--space-3));
  transition: background var(--transition), color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- 滚动条 ---- */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-lighter);
}

/* ---- 焦点（无障碍） ---- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- 选中文字 ---- */
::selection {
  background: var(--primary-100);
  color: var(--primary-800);
}

/* ---- 减少动效 ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   4. 排版 Typography 工具
   ========================================== */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.text-muted { color: var(--text-light); }
.text-lighter { color: var(--text-lighter); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success-text); }
.text-danger { color: var(--danger-text); }
.text-warning { color: var(--warning-text); }

.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   5. 页面容器
   ========================================== */
.page {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-4);
}
.page-wide {
  width: 100%;
  max-width: var(--content-wide-max);
  margin: 0 auto;
  padding: var(--space-4);
}
.page-full {
  width: 100%;
  max-width: var(--content-full-max);
  margin: 0 auto;
  padding: var(--space-4);
}

@media (max-width: 640px) {
  .page,
  .page-wide,
  .page-full {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }
}

/* ==========================================
   6. 顶部导航 Top Navigation
   ========================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--space-4);
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .top-nav {
  background: rgba(15, 23, 42, 0.85);
}

.top-nav .logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: opacity var(--transition-fast);
}
.top-nav .logo .logo-main {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--primary);
  letter-spacing: 0.5px;
}
.top-nav .logo .logo-img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.top-nav .logo .logo-sub {
  font-size: 11px;
  color: var(--text-lighter);
  white-space: nowrap;
}
.top-nav .logo:hover {
  opacity: 0.8;
}

@media (max-width: 600px) {
  .top-nav .logo .logo-sub {
    display: none;
  }
}

.top-nav .user-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-light);
}

/* ---- 主题按钮 ---- */
.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-lighter);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-family: inherit;
}
.theme-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}
.theme-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- 通知铃铛 ---- */
.bell-wrap {
  position: relative;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.bell-wrap:hover {
  background: var(--card-hover);
}
.bell-wrap svg {
  color: var(--text-lighter);
  transition: color var(--transition-fast);
}
.bell-wrap:hover svg {
  color: var(--text);
}

.unread-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--card);
}

/* ---- 用户头像 ---- */
.user-avatar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition-fast);
}
.user-avatar:hover {
  background: var(--card-hover);
}

.avatar-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}
.avatar-name {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
}

/* ---- 导航操作按钮 ---- */
.nav-action-btn {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
  line-height: 1.4;
}
.nav-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.nav-action-btn.logout:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ==========================================
   7. 底部导航 Bottom Navigation
   ========================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  padding: 4px 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="dark"] .bottom-nav {
  background: rgba(15, 23, 42, 0.88);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 0;
  text-decoration: none;
  color: var(--text-lighter);
  font-size: 10px;
  transition: color var(--transition-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav a .nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-lighter);
  transition: color var(--transition-fast);
}
.bottom-nav a .nav-label {
  font-weight: var(--font-weight-medium);
  margin-top: 1px;
}
.bottom-nav a.active {
  color: var(--primary);
}
.bottom-nav a.active .nav-icon {
  color: var(--primary);
}

/* ---- 存在大厅大按钮 + 发射子菜单 ---- */
.hall-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 0;
}
.hall-fab {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: transform var(--transition-fast), background var(--transition-fast);
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.hall-fab:active {
  transform: translateX(-50%) scale(0.92);
}
.hall-label {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--text-lighter);
  margin-top: 1px;
  transition: color var(--transition-fast);
}
.hall-label.active {
  color: var(--primary);
}
.hall-subs {
  position: absolute;
  left: 50%;
  bottom: 45px;
  width: 0;
  height: 0;
  z-index: calc(var(--z-nav) + 2);
}
/* 四花瓣的弧形终点坐标（相对大按钮中心） */
.hall-subs a:nth-child(1) { --dx: -98px; --dy: -69px; }
.hall-subs a:nth-child(2) { --dx: -37px; --dy: -114px; }
.hall-subs a:nth-child(3) { --dx: 37px;  --dy: -114px; }
.hall-subs a:nth-child(4) { --dx: 98px;  --dy: -69px; }
.hall-subs a {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58px;
  text-decoration: none;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.3);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hall-subs a .petal-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-light);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.hall-subs a .petal-label {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
  margin-top: 3px;
  white-space: nowrap;
  text-shadow: 0 0 6px var(--card), 0 0 3px var(--card);
}
.hall-subs a.active .petal-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.hall-subs a.active .petal-label {
  color: var(--primary);
}
/* 展开：花瓣沿弧形从大按钮依次发射 */
.bottom-nav.hall-open .hall-subs a {
  opacity: 1;
  pointer-events: auto;
  transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(1);
}
.bottom-nav.hall-open .hall-subs a:nth-child(1) { transition-delay: 0ms; }
.bottom-nav.hall-open .hall-subs a:nth-child(2) { transition-delay: 50ms; }
.bottom-nav.hall-open .hall-subs a:nth-child(3) { transition-delay: 100ms; }
.bottom-nav.hall-open .hall-subs a:nth-child(4) { transition-delay: 150ms; }
/* 下滑时花瓣缓慢隐去（展开状态保留，回滑恢复） */
.bottom-nav.hall-open.hall-away .hall-subs a {
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% + var(--dx)), calc(var(--dy) + 12px)) scale(0.85);
  transition-duration: 0.4s;
  transition-delay: 0ms;
}
.bottom-nav.hall-open .hall-fab {
  background: var(--primary-dark);
}
/* 展开时的遮罩 */
.hall-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: calc(var(--z-nav) - 1);
}
.hall-mask.show {
  opacity: 1;
  pointer-events: auto;
}
/* 「敬请期待」轻提示气泡 */
.soon-tip {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  white-space: nowrap;
  pointer-events: none;
  animation: soonTipIn 0.25s ease;
}
.soon-tip.bye {
  opacity: 0;
  transition: opacity 0.35s ease;
}
@keyframes soonTipIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (min-width: 1024px) {
  .hall-mask { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hall-subs a,
  .hall-fab,
  .hall-mask {
    transition: none;
  }
}

/* 桌面隐藏底部导航 + 显示侧边栏 */
@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
  body {
    padding-bottom: 0;
  }

  .page,
  .page-wide,
  .page-full {
    margin-left: 200px;
    width: calc(100% - 200px);
  }

  .top-nav {
    left: 200px;
    width: calc(100% - 200px);
  }
}

/* ==========================================
   7.5 桌面侧边栏 Side Navigation
   ========================================== */
.side-nav {
  display: none;
}
@media (min-width: 1024px) {
  .side-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 200px;
    z-index: var(--z-nav);
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: var(--space-5) var(--space-4);
    overflow-y: auto;
  }

  .side-nav .side-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    cursor: pointer;
    user-select: none;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-6);
    padding: 0 var(--space-3);
    transition: opacity var(--transition-fast);
  }
  .side-nav .side-logo-img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  .side-nav .side-logo:hover {
    opacity: 0.8;
  }

  .side-nav .side-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
  }
  .side-nav .side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-light);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
  }
  .side-nav .side-link:hover {
    background: var(--card-hover);
    color: var(--text);
  }
  .side-nav .side-link.active {
    background: var(--primary-50);
    color: var(--primary-dark);
    font-weight: var(--font-weight-semibold);
  }
  .side-nav .side-link .side-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
  }

  .side-nav .side-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--space-3);
    margin-top: auto;
  }
  .side-nav .side-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-size: var(--font-size-sm);
    transition: background var(--transition-fast);
  }
  .side-nav .side-user:hover {
    background: var(--card-hover);
  }
  .side-nav .side-user .side-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    flex-shrink: 0;
  }

  .side-nav .side-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    margin-top: 4px;
  }
  .side-nav .side-theme .side-theme-label {
    font-size: 12px;
    color: var(--text-lighter);
  }
  .side-nav .side-theme-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-lighter);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--transition-fast);
    font-family: inherit;
  }
  .side-nav .side-theme-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
}

/* ==========================================
   8. 按钮系统 Button (Ghost 风格)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  background: transparent;
  color: var(--text);
  text-decoration: none;
}
.btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* 主按钮 — 唯一实心变体 */
.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 幽灵按钮 — 透明 + 细边框，hover 浮现背景 */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-50);
}

/* 纯文字按钮 — 几乎无样式 */
.btn-ghost {
  border-color: transparent;
  color: var(--text-light);
}
.btn-ghost:hover {
  background: var(--card-hover);
  border-color: transparent;
  color: var(--text);
}

/* 危险按钮 */
.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: var(--danger-text);
  border-color: var(--danger-text);
  color: #fff;
  transform: translateY(-1px);
}

/* 尺寸 */
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-lg {
  padding: 13px 28px;
  font-size: var(--font-size-base);
  border-radius: var(--radius-sm);
}
.btn-block {
  width: 100%;
}

/* ==========================================
   9. 输入框 Input
   ========================================== */
.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--card);
  font-family: inherit;
  color: var(--text);
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.input::placeholder {
  color: var(--text-lighter);
}
.input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

textarea.input {
  resize: vertical;
  min-height: 110px;
  line-height: var(--line-height-relaxed);
}

/* ==========================================
   10. 卡片系统 Card
   ========================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  transition: all var(--transition-fast);
}
.card:hover {
  border-color: var(--primary-light);
}

.card-clickable {
  cursor: pointer;
}
.card-clickable:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.card-clickable:active {
  transform: translateY(0);
}

/* ==========================================
   11. 帖子网格 Post Cards
   ========================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}
@media (min-width: 1200px) {
  .posts-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.post-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-card:hover::before {
  opacity: 1;
}
.post-card:active {
  transform: translateY(0);
}

.post-card .post-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.post-card .post-author {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.post-card .post-author:hover {
  color: var(--primary);
}
.post-card .author-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  flex-shrink: 0;
}
.post-card .author-avatar img,
.post-avatar-img {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.post-card .post-time {
  font-size: 11px;
  color: var(--text-lighter);
  margin-left: auto;
}
.post-card .post-title {
  font-weight: var(--font-weight-semibold);
  font-size: 15px;
  margin-bottom: 6px;
  line-height: var(--line-height-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .post-content {
  font-size: 13px;
  color: var(--text-light);
  line-height: var(--line-height-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  flex: 1;
}
.post-card .post-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--ring);
}

.post-status-label {
  font-size: 11px;
  color: var(--text-lighter);
}

/* 帖子分类标签内联样式 */
.post-card .post-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.post-card .cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.post-card .cat-label {
  color: var(--text-light);
}

/* ==========================================
   12. 徽标 Badge
   ========================================== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
}
.badge-blue {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.badge-green {
  background: var(--success-bg);
  color: var(--success-text);
}
.badge-yellow {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.badge-red {
  background: var(--danger-bg);
  color: var(--danger-text);
}
.badge-purple {
  background: #f3e8ff;
  color: #7c3aed;
}

/* 分类标签 */
.cat-seeking {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.cat-supply {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.cat-gaming {
  background: #f3e8ff;
  color: #7c3aed;
}
.cat-loving {
  background: #fce7f3;
  color: #9d174d;
}

/* ==========================================
   13. 渐变色图标 Gradient Icons
   ========================================== */
.gicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}
.gicon-lg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
}
.gicon-sm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 10px;
}
.gicon-brand {
  background: var(--primary);
}
.gicon-warm {
  background: var(--warning);
}
.gicon-cool {
  background: #06b6d4;
}
.gicon-rose {
  background: #ec4899;
}
.gicon-green {
  background: var(--success);
}

/* ==========================================
   14. 弹窗系统 Modal (GHOST)
   ========================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.2s ease;
}
.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.94) translateY(8px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}
.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6) 0;
  gap: var(--space-3);
}
.modal-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  word-break: break-word;
  line-height: var(--line-height-tight);
}
.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--card-hover);
  color: var(--text-lighter);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-family: inherit;
}
.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: var(--space-4) var(--space-6) var(--space-6);
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 480px) {
  .modal-header {
    padding: var(--space-4) var(--space-4) 0;
  }
  .modal-body {
    padding: var(--space-3) var(--space-4) var(--space-4);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ==========================================
   15. 更多菜单 Dropdown
   ========================================== */
.more-wrap {
  position: relative;
  display: inline-block;
}
.more-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--card-hover);
  color: var(--text-lighter);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-fast);
  font-family: inherit;
}
.more-btn:hover {
  background: var(--border);
  color: var(--text);
}
.more-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 135px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  overflow: hidden;
  margin-bottom: 6px;
  animation: dropdownIn 0.12s ease;
}
.more-dropdown.show {
  display: block;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.more-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: background var(--transition-fast);
}
.more-dropdown-item:hover {
  background: var(--card-hover);
}
.more-dropdown-item .item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-read {
  background: var(--primary);
}
.dot-xiang {
  background: #ec4899;
}

/* ==========================================
   16. FAB 浮动筛选按钮
   ========================================== */
.filter-fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--nav-bottom-height) + var(--space-4));
  z-index: var(--z-fab);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (min-width: 1024px) {
  .filter-fab {
    bottom: var(--space-8);
  }
}

.fab-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}
.fab-btn:active {
  transform: scale(0.92);
}

.fab-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.fab-panel.open {
  display: flex;
}

.fab-panel .fab-search {
  width: 220px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  outline: none;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--transition-fast);
}
.fab-panel .fab-search:focus {
  border-color: var(--primary);
}

.fab-panel .fab-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.fab-panel .fab-cats button {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  font-family: inherit;
}
.fab-panel .fab-cats button:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.fab-panel .fab-cats button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ==========================================
   17. 加载 Loading + Spinner
   ========================================== */
.loading {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-lighter);
  font-size: var(--font-size-sm);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   18. 消息提示 Toast
   ========================================== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: var(--font-size-sm);
  z-index: var(--z-toast);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90%;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success-text);
}
.toast.error {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* 复制提示 */
.copy-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  z-index: var(--z-toast);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.copy-toast.show {
  opacity: 1;
}

/* ==========================================
   19. 空状态 Empty
   ========================================== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-lighter);
  font-size: var(--font-size-sm);
}
.empty .empty-icon {
  font-size: 44px;
  margin-bottom: 10px;
  opacity: 0.3;
  line-height: 1;
}

/* ==========================================
   20. 底部备案 Footer
   ========================================== */
.footer-bar {
  text-align: center;
  padding: var(--space-4);
  font-size: 12px;
  color: var(--text-lighter);
}
.footer-bar a {
  color: var(--text-lighter);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-bar a:hover {
  color: var(--primary);
}

/* ==========================================
   21. 活动卡片 Activity Card
   ========================================== */
.activity-card {
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 0;
  transition: all var(--transition-fast);
}
.activity-card .ac-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.activity-card .ac-header:hover {
  background: var(--card-hover);
}
.activity-card .ac-title {
  font-weight: var(--font-weight-semibold);
  font-size: 15px;
  flex: 1;
}
.activity-card .ac-arrow {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-lighter);
  background: var(--card-hover);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.activity-card .ac-arrow.open {
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
}
.activity-card .ac-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}
.activity-card .ac-body {
  padding: 0 var(--space-4) var(--space-4);
  display: none;
}
.activity-card .ac-body.open {
  display: block;
}
.activity-card .ac-body p {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-3);
}

/* 活动子项 */
.ac-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card-hover);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text);
}
.ac-sub:hover {
  border-color: var(--primary);
  background: var(--primary-50);
}
.ac-sub .sub-text {
  flex: 1;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}
.ac-sub .sub-tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}
.ac-sub.disabled {
  cursor: default;
  opacity: 0.55;
}
.ac-sub.disabled:hover {
  border-color: var(--border);
  background: var(--card-hover);
}

/* ==========================================
   22. 通用网格 & 链接卡片
   ========================================== */
.activity-grid {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 480px) {
  .activity-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.video-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 480px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.link-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-fast);
  margin-bottom: 8px;
}
.link-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.link-card .link-text {
  flex: 1;
  min-width: 0;
}
.link-card .link-title {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}
.link-card .link-desc {
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 2px;
}

/* 杂志网格 */
.magazine-grid {
  display: grid;
  gap: 8px;
}
@media (min-width: 480px) {
  .magazine-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-fast);
}
.mag-item:hover {
  border-color: var(--primary-light);
}
.mag-item .mag-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
}
.mag-item .mag-title {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  flex: 1;
}
.mag-item .mag-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.tag-ready {
  background: var(--primary);
  color: #fff;
}
.tag-wip {
  background: var(--warning-bg);
  color: var(--warning-text);
}

/* ==========================================
   23. 未来页面 Future Page
   ========================================== */
.future-section {
  margin-bottom: 28px;
}
.future-section .sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.video-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition-fast);
}
.video-card:hover {
  box-shadow: var(--shadow-md);
}
.video-card .video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
}
.video-card .video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-card .video-caption {
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text);
}

/* ==========================================
   24. 未来/活动页 — 大方块布局 Tiles
   ========================================== */
.future-tiles,
.activity-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .future-tiles,
  .activity-tiles {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .future-tiles,
  .activity-tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tile {
  aspect-ratio: 1 / 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--text);
  padding: var(--space-3);
  text-align: center;
  user-select: none;
}
.tile:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tile:active {
  transform: translateY(0);
}
.tile .tile-icon {
  font-size: 24px;
  line-height: 1;
}
.tile .tile-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

/* 标签通用 */
.tag-blue {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.tag-orange {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.tag-green {
  background: var(--success-bg);
  color: var(--success-text);
}

/* ==========================================
   25. 统一节标题 Section Header
   ========================================== */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.section-title .section-count {
  color: var(--text-lighter);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-sm);
  margin-left: 4px;
}

/* ==========================================
   26. 筛选栏 Filter Bar
   ========================================== */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.filter-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  background: var(--card);
  color: var(--text);
  white-space: nowrap;
  transition: all var(--transition-fast);
  font-family: inherit;
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ==========================================
   27. 统计数据行 Stats Row
   ========================================== */
.stats-row {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.stats-cell {
  text-align: center;
}
.stats-cell .stats-value {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
}
.stats-cell .stats-label {
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 2px;
}

/* ==========================================
   28. 个人资料卡片 Profile Card
   ========================================== */
.profile-card {
  text-align: center;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.profile-card .avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  margin: 0 auto 12px;
  flex-shrink: 0;
}
.profile-card .profile-name {
  font-size: 20px;
  margin-bottom: 4px;
}
.profile-card .profile-code {
  font-size: 13px;
  color: var(--text-lighter);
  margin-bottom: 10px;
  font-family: monospace;
}
.profile-card .profile-intro {
  font-size: 14px;
  color: var(--text-light);
  line-height: var(--line-height-normal);
  margin-bottom: 16px;
}

/* 个人中心 - QQ 绑定 */
.qq-bind {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
}
.qq-bind-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qq-bind-label {
  font-size: 14px;
  color: var(--text);
  font-weight: var(--font-weight-medium);
}
.qq-bind-status {
  font-size: 13px;
  color: var(--text-lighter);
  cursor: pointer;
  transition: color 0.2s;
}
.qq-bind-status:hover {
  color: var(--primary);
}
.qq-bind-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.qq-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.qq-input:focus {
  border-color: var(--primary);
}
.qq-btn {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.qq-btn:hover {
  opacity: 0.9;
}

/* 个人中心 - 联系方式绑定（QQ/微信，含审核状态） */
.bind-section {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.bind-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bind-label {
  font-size: 14px;
  color: var(--text);
  font-weight: var(--font-weight-medium);
  min-width: 36px;
}
.bind-value {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}
.bind-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}
.bind-status.approved { background: #dcfce7; color: #166534; }
.bind-status.pending { background: #fef9c3; color: #854d0e; }
.bind-status.rejected { background: #fee2e2; color: #991b1b; }
.bind-status.empty { background: transparent; color: var(--text-lighter); }
.bind-help {
  font-size: 16px;
  color: var(--text-lighter);
  transition: color 0.2s;
  cursor: pointer;
}
.bind-help:hover {
  color: var(--primary);
}
.bind-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.bind-input {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.bind-input:focus {
  border-color: var(--primary);
}
.bind-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.bind-btn:hover {
  opacity: 0.9;
}
.bind-btn.bind-cancel {
  background: transparent;
  color: var(--text-lighter);
  border: 1px solid var(--border);
}
.bind-btn.bind-cancel:hover {
  background: var(--bg);
}
.bind-tip {
  width: 100%;
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 4px;
}

/* 个人中心 - 头像上传 & 自我介绍编辑 */
.avatar-wrap {
  position: relative;
  text-align: center;
  margin-bottom: 12px;
}
.avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: calc(50% - 50px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: opacity 0.2s;
}
.avatar-edit-btn:hover {
  opacity: 0.8;
}
.avatar-wrap .bind-status {
  position: absolute;
  top: -4px;
  right: calc(50% - 60px);
}
.profile-intro-wrap {
  position: relative;
  margin-bottom: 12px;
}
.profile-intro-wrap .bind-status {
  font-size: 11px;
  margin-left: 8px;
}
.intro-edit-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-lighter);
  vertical-align: middle;
  transition: color 0.2s;
}
.intro-edit-btn:hover {
  color: var(--primary);
}
.intro-form {
  margin-top: 8px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ==========================================
   29. 表单区块 Form Section
   ========================================== */
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  margin-bottom: 6px;
  color: var(--text);
}

/* ==========================================
   30. 状态栏 Status Bar
   ========================================== */
.status-bar {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg);
  color: var(--text-light);
  margin-bottom: var(--space-4);
}
.status-bar.success {
  background: var(--success-bg);
  color: var(--success-text);
}
.status-bar.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}
.status-bar.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

/* ==========================================
   31. 博客弹窗 Meta 信息
   ========================================== */
.modal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
.modal-meta .meta-name {
  color: var(--text-lighter);
  font-size: 13px;
  text-decoration: none;
}
.modal-meta .meta-name:hover {
  color: var(--primary);
}
.modal-meta .meta-time {
  color: var(--text-lighter);
  font-size: 13px;
}

/* ==========================================
   32. 弹窗居中内容 Modal Center
   ========================================== */
.modal-center {
  text-align: center;
}
.modal-center .modal-body {
  padding-bottom: var(--space-5);
}
.modal-center .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   33. 信息页眉 Hero Section
   ========================================== */
.hero-card {
  text-align: center;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.hero-card .hero-gicon {
  margin: 0 auto 12px;
}
.hero-card .hero-title {
  font-size: 24px;
  margin-bottom: 8px;
}
.hero-card .hero-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
}
.hero-card .hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   34. 内容卡片列表 Content List
   ========================================== */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.content-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}
.content-item:hover {
  border-color: var(--primary-light);
}
.content-item .item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}
.content-item .item-name {
  font-weight: var(--font-weight-medium);
}
.content-item .item-detail {
  font-size: 12px;
  color: var(--text-lighter);
}
.content-item .item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.content-item .item-time {
  font-size: 11px;
  color: var(--text-lighter);
}

/* ==========================================
   35. 内容网格 Content Grid
   ========================================== */
.content-grid {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 480px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================
   36. 对接卡片 Connection Card
   ========================================== */
.conn-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  transition: all var(--transition-fast);
}
.conn-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}
.conn-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.conn-name {
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  color: var(--primary);
}
.conn-dot {
  color: var(--text-lighter);
  font-size: 18px;
}
.conn-reason {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  margin-bottom: 6px;
}
.conn-time {
  font-size: 12px;
  color: var(--text-lighter);
}

/* ==========================================
   37. 红点指示器 Nav Dot
   ========================================== */
.nav-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--card);
  z-index: 1;
}

.side-dot {
  position: relative;
  top: -8px;
  right: 4px;
  width: 6px;
  height: 6px;
  margin-left: -6px;
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-block;
  background: var(--danger);
  border-radius: 50%;
  border: 1px solid var(--card);
}

/* 筛选栏审核中红点 */
.pending-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* 发帖悬浮按钮（位于搜索按钮上方） */
.fab-post-btn {
  position: fixed;
  bottom: calc(var(--nav-bottom-height, 72px) + 72px);
  right: 16px;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 99;
}
.fab-post-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(59,130,246,0.5);
}
@media (min-width: 1024px) {
  .fab-post-btn { bottom: 90px; }
}

/* 按钮竖向布局（手机端） */
@media (max-width: 599px) {
  .filter-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .filter-bar .filter-btn {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
  }
  .action-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .action-bar .btn {
    width: 100%;
  }
}

/* 对接记录样式修复 */
.content-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
}
.item-avatar-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 14px;
}
.item-avatar-link:hover {
  text-decoration: underline;
}
.item-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.item-avatar-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

/* 手机端搜索面板竖向排列 */
@media (max-width: 599px) {
  .fab-panel > div:first-child { flex-direction: column; }
  .fab-panel > div:first-child input { width: 100%; }
  .fab-panel > div:first-child button { width: 100%; }
  .fab-panel .fab-cats { flex-direction: column; }
  .fab-panel .fab-cats button { width: 100%; text-align: center; }
}

/* 管理员前台通知铃铛 */
.admin-shield {
  font-size: 14px;
  line-height: 1;
}
.admin-bell .unread-dot {
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  position: absolute;
  top: -6px;
  right: -8px;
  display: none;
  box-sizing: border-box;
}

/* ===== 生日日历 ===== */
.birthday-edit { background:var(--card); padding:14px; border-radius:12px; }
.birth-month { margin-bottom:20px; }
.birth-month-title { font-weight:600; font-size:15px; margin-bottom:8px; color:var(--primary); }
.birth-count { font-weight:400; font-size:12px; color:var(--text-lighter); }
.birth-month-empty { color:var(--text-lighter); font-size:13px; text-align:center; padding:8px; }
.birth-day-grid { display:flex; flex-direction:column; gap:6px; }
.birth-day { background:var(--card); border-radius:8px; padding:10px 12px; }
.birth-day.same-year { border:2px solid #f59e0b; background:rgba(245,158,11,0.05); }
.birth-day-num { font-size:13px; font-weight:600; margin-bottom:4px; }
.birth-day.same-year .birth-day-num { color:#f59e0b; }
.birth-day-users { display:flex; flex-wrap:wrap; gap:4px; }
.birth-user-chip { display:inline-block; padding:3px 10px; border-radius:14px; background:var(--bg); font-size:12px; color:var(--text); text-decoration:none; }
.birth-user-chip:hover { background:var(--primary); color:#fff; }

/* ===== 线下常在地 ===== */
.loc-group { margin-bottom:8px; border-radius:8px; overflow:hidden; border:1px solid var(--border); }
.loc-group-header { display:flex; align-items:center; gap:8px; padding:10px 12px; background:var(--card); cursor:pointer; }
.loc-group-header:hover { background:var(--card-hover); }
.loc-group-title { font-weight:600; font-size:14px; flex:1; }
.loc-group-count { font-size:12px; color:var(--text-lighter); }
.loc-group-arrow { font-size:11px; color:var(--text-lighter); transition:transform 0.2s; }
.loc-group.open .loc-group-arrow { transform:rotate(180deg); }
.loc-group-body { display:none; padding:8px 12px 12px; background:var(--card); }
.loc-group.open .loc-group-body { display:flex; flex-wrap:wrap; gap:6px; }
.loc-user-chip { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:14px; background:var(--bg); font-size:12px; color:var(--text); text-decoration:none; }
.loc-user-chip:hover { background:var(--primary); color:#fff; }
.loc-user-detail { font-size:10px; color:var(--text-lighter); }
.loc-user-chip:hover .loc-user-detail { color:rgba(255,255,255,0.7); }

/* ==========================================
   邀请链路小地图（个人中心嵌入）
   ========================================== */
.invite-mini-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
  overflow: hidden;
}
.invite-mini-hd {
  padding: 12px 16px 0;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--text);
}
.invite-mini-body {
  position: relative;
}
.invite-mini-canvas {
  display: block;
  width: 100%;
  pointer-events: none;
}
.invite-mini-full {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  background: var(--card);
  transition: border-color var(--transition-fast);
}
.invite-mini-full:hover {
  border-color: var(--primary);
}
.invite-mini-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}
[data-theme="dark"] .invite-mini-mask {
  background: rgba(30, 41, 59, 0.62);
}
