/* ============================================================
   老弱病残BBS - 完整样式表
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #14b8a6;
  --primary-light: #2dd4bf;
  --primary-dark: #0d9488;
  --accent: #22d3ee;
  --accent-2: #a855f7;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ 深色主题 ============ */
[data-theme="dark"] {
  --bg: #0a0e1a;
  --bg-soft: #0f1422;
  --header-bg: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #0f766e 100%);
  --header-text: #f0fdfa;
  --card-bg: rgba(255, 255, 255, 0.055);
  --card-bg-hover: rgba(255, 255, 255, 0.085);
  --card-edge: rgba(255, 255, 255, 0.12);
  --input-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(45, 212, 191, 0.5);
  --text: #e2e8f0;
  --text-strong: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --card-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.6),
                 inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --card-shadow-hover: 0 20px 44px -20px rgba(20, 184, 166, 0.5),
                       inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  --blob-1: rgba(20, 184, 166, 0.32);
  --blob-2: rgba(34, 211, 238, 0.22);
  --blob-3: rgba(168, 85, 247, 0.18);
  --noise-opacity: 0.035;
  color-scheme: dark;
}

/* ============ 浅色主题 ============ */
[data-theme="light"] {
  --bg: #eef2f7;
  --bg-soft: #ffffff;
  --header-bg: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 50%, #0d9488 100%);
  --header-text: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-bg-hover: rgba(255, 255, 255, 0.9);
  --card-edge: rgba(255, 255, 255, 0.95);
  --input-bg: rgba(255, 255, 255, 0.75);
  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(20, 184, 166, 0.45);
  --text: #1e293b;
  --text-strong: #0f172a;
  --text-dim: #475569;
  --text-muted: #94a3b8;
  --card-shadow: 0 8px 32px -14px rgba(15, 23, 42, 0.16),
                 inset 0 1px 0 0 rgba(255, 255, 255, 0.85);
  --card-shadow-hover: 0 20px 44px -20px rgba(20, 184, 166, 0.35),
                       inset 0 1px 0 0 rgba(255, 255, 255, 0.95);
  --blob-1: rgba(20, 184, 166, 0.18);
  --blob-2: rgba(34, 211, 238, 0.14);
  --blob-3: rgba(168, 85, 247, 0.12);
  --noise-opacity: 0.02;
  color-scheme: light;
}

html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition: background-color 0.55s var(--ease-smooth),
              border-color 0.55s var(--ease-smooth),
              color 0.55s var(--ease-smooth),
              box-shadow 0.55s var(--ease-smooth) !important;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease-smooth), color 0.5s var(--ease-smooth);
}

body::before {
  content: '';
  position: fixed;
  inset: -10%;
  background:
    radial-gradient(circle at 15% 20%, var(--blob-1) 0%, transparent 42%),
    radial-gradient(circle at 85% 30%, var(--blob-2) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, var(--blob-3) 0%, transparent 42%);
  z-index: -2;
  animation: blobDrift 40s ease-in-out infinite;
  filter: blur(20px);
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(3%, -3%) scale(1.06); }
  50% { transform: translate(-2%, 2%) scale(0.97); }
  75% { transform: translate(2%, 3%) scale(1.04); }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: var(--noise-opacity);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.25s; }
a:hover { color: var(--accent); }

/* ============ 滚动进度条 ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1000;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.8);
}

/* ============ 主 Header ============ */
.main-header {
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 4px 24px -8px rgba(20, 184, 166, 0.4);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
}
.brand:hover { color: #fff !important; }
.brand::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px rgba(255,255,255,0.9);
  animation: pulse 2s ease-in-out infinite;
}
.brand-name { color: #fff; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.main-nav {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  flex-shrink: 1;
}
.main-nav a {
  color: rgba(255,255,255,0.85) !important;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
}
.main-nav a:hover,
.main-nav a.active {
  color: #fff !important;
  background: rgba(255,255,255,0.15);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}
.nav-right { display: flex; align-items: center; gap: 0.5rem; }

/* ============ 顶部搜索框 ============ */
.header-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  padding: 0 0.9rem;
  height: 38px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}
.header-search:focus-within {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
  width: 260px;
}
.header-search .search-icon {
  width: 16px; height: 16px;
  stroke: rgba(255,255,255,0.75);
  flex-shrink: 0;
}
.header-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  min-width: 0;
  height: auto;
  box-shadow: none;
}
.header-search input::placeholder { color: rgba(255,255,255,0.6); }
.header-search input:focus { box-shadow: none; background: transparent; border: none; }
.search-clear {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s;
}
.search-clear:hover { background: rgba(255,255,255,0.35); }
.search-clear svg { width: 12px; height: 12px; stroke: currentColor; }

/* ============ 主题切换 ============ */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.theme-toggle:hover {
  transform: rotate(18deg) scale(1.08);
  background: rgba(255,255,255,0.25);
}
.theme-toggle svg {
  width: 18px; height: 18px;
  position: absolute;
  top: 50%; left: 50%;
  margin: -9px 0 0 -9px;
  stroke: #fff;
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}
[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.4); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.4); }

/* ============ 用户悬停菜单 ============ */
.user-menu { position: relative; z-index: 9999; }
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.user-trigger:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.4);
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #d1fae5);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-wood {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  font-size: 0.78rem;
  font-weight: 700;
}
.user-wood svg { width: 12px; height: 12px; }
.user-trigger .chevron {
  width: 14px; height: 14px;
  transition: transform 0.3s var(--ease);
}
.user-menu.open .chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 0.4rem;
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 44px -20px rgba(0,0,0,0.6),
              0 0 0 1px rgba(255,255,255,0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
              visibility 0.22s var(--ease);
  z-index: 9999;
}
.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.35rem;
}
.user-avatar-lg {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(20, 184, 166, 0.5);
}
.dropdown-username {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-wood {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 600;
  margin-top: 0.15rem;
}
.dropdown-wood svg { width: 13px; height: 13px; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all 0.18s var(--ease);
}
.dropdown-item:hover {
  background: var(--card-bg-hover);
  color: var(--text-strong);
}
.dropdown-item svg {
  width: 17px; height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.dropdown-divider { height: 1px; background: var(--border); margin: 0.35rem 0.4rem; }
.dropdown-logout { color: #f87171; }
.dropdown-logout:hover { background: rgba(239, 68, 68, 0.1); color: #f87171; }

/* ============ 页面容器 ============ */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  position: relative;
  z-index: 1;
}

/* ============ 统计 + 时钟 ============ */
.stats-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}
.stat-ball {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 0.5rem;
  text-align: center;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--card-shadow);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.stat-ball:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.ball-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px -4px rgba(20, 184, 166, 0.6);
}
.ball-num { font-size: 1.25rem; font-weight: 800; color: var(--text-strong); line-height: 1.1; }
.ball-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ============ 磨砂时钟 ============ */
.chart_sd {
  min-width: 260px;
  padding: 1rem 1.4rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-edge);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  text-align: right;
}
.chart_sd::after {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-edge), transparent);
  pointer-events: none;
}
.chart_sd:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
  background: var(--card-bg-hover);
}
#clock_c {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cweek {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-family: 'Courier New', ui-monospace, monospace;
  color: var(--text);
}
.cweek strong { font-weight: 700; font-size: 0.95rem; color: var(--text-strong); }
.cweek i { font-style: normal; font-size: 0.85rem; color: var(--text-dim); }
.cweek em { font-style: normal; font-size: 0.78rem; color: var(--text-muted); }
#date_c {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

/* ============ 三栏布局 ============ */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr 260px;
  gap: 1.2rem;
  align-items: start;
}
.col-main { min-width: 0; }
.col-side { display: flex; flex-direction: column; gap: 1rem; }

/* ============ 通用卡片 ============ */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
              border-color 0.35s, background 0.35s;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%),
              rgba(20, 184, 166, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 0;
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
}

/* ============ 公告卡片 ============ */
.announcement-card .card-title-bar {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.7rem;
  margin-bottom: 0.6rem;
}
.announcement-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.announcement-list { display: flex; flex-direction: column; gap: 0.25rem; }
.announcement-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid transparent;
}
.announcement-item:hover {
  background: var(--card-bg-hover);
  border-color: var(--border);
  transform: translateX(3px);
}
.announcement-icon { font-size: 1rem; flex-shrink: 0; }
.announcement-title {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-dim);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s;
}
.announcement-item:hover .announcement-title { color: var(--text-strong); }
.announcement-arrow {
  width: 14px; height: 14px;
  stroke: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), stroke 0.25s;
}
.announcement-item:hover .announcement-arrow {
  stroke: var(--primary-light);
  transform: translateX(3px);
}

/* ============ 公告弹窗 ============ */
.announcement-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

.announcement-modal {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modalIn 0.35s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(30px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.announcement-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.announcement-modal-label {
  font-size: 0.78rem;
  color: var(--primary-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.announcement-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem 0;
}
.announcement-modal-date { font-size: 0.82rem; color: var(--text-muted); }
.announcement-modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s var(--ease);
}
.announcement-modal-close:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-strong);
  transform: rotate(90deg);
}
.announcement-modal-close svg { width: 16px; height: 16px; stroke: currentColor; }
.announcement-modal-body {
  padding: 1.5rem 1.8rem;
  overflow-y: auto;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.85;
  flex: 1;
  word-break: break-word;
}
.announcement-modal-body strong { color: var(--text-strong); font-weight: 700; }
.announcement-modal-foot {
  padding: 1rem 1.8rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}
.announcement-modal-foot .btn { min-width: 100px; }

/* ============ 版块列表（左侧栏） ============ */
.board-list { display: flex; flex-direction: column; gap: 0.3rem; }
.board-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
}
.board-item:hover { background: var(--card-bg-hover); color: var(--text-strong); }
.board-item.active {
  background: rgba(20, 184, 166, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.board-count { font-size: 0.78rem; color: var(--text-muted); }

/* ============ 标签页 ============ */
.tabs-card { padding: 0.4rem; margin-bottom: 1rem; }
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.tab {
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.tab:hover { color: var(--text-strong); background: var(--card-bg-hover); }
.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(20, 184, 166, 0.6);
}

/* ============ 帖子卡片 ============ */
.post-card {
  margin-bottom: 0.8rem;
  padding: 1.1rem 1.2rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s var(--ease),
              box-shadow 0.4s var(--ease),
              border-color 0.35s var(--ease),
              background 0.35s var(--ease);
}
.post-card .post-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  text-decoration: none;
  color: transparent;
}
.post-card .post-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: inherit;
}
.post-card > *:not(.post-link) {
  position: relative;
  z-index: 1;
}
.post-card button,
.post-card .btn,
.post-card a:not(.post-link) {
  position: relative;
  z-index: 3;
}
.post-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  opacity: 0;
  transform: scaleY(0.35);
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
  z-index: 4;
}
.post-card:hover {
  transform: translateY(-6px) scale(1.004);
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
  box-shadow: 0 24px 48px -20px rgba(20, 184, 166, 0.55),
              0 0 0 1px rgba(45, 212, 191, 0.2);
}
.post-card:hover::after { opacity: 1; transform: scaleY(1); }
.post-card .card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.post-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
  color: var(--text-strong);
  line-height: 1.4;
  transition: color 0.3s var(--ease);
}
.post-card:hover h3 { color: var(--primary-light); }
.post-card .card-body {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 0.4rem;
  transition: color 0.3s var(--ease);
}
.post-card:hover .card-body { color: var(--text); }
.post-card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  gap: 1rem;
}
.post-card .card-foot .stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.35s var(--ease), color 0.3s var(--ease);
}
.post-card:hover .card-foot .stat:last-child {
  transform: translateX(5px);
  color: var(--primary-light);
}
.post-card .card-foot svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* ============ 头像 ============ */
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ============ 右侧栏 ============ */
.signin-card { text-align: center; }
.signin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-strong);
}
.signin-count { font-size: 0.78rem; color: var(--text-muted); }
.signin-btn { width: 100%; }
.signin-hint { margin-top: 0.6rem; font-size: 0.78rem; color: var(--text-muted); }

.action-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.8rem; }
.action-btn {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
}
.action-btn:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-strong);
}
.action-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px -6px rgba(20, 184, 166, 0.7);
}
.action-btn.primary:hover { color: #fff; }

.info-list { display: flex; flex-direction: column; gap: 0.5rem; }
.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.info-item span:first-child { color: var(--text-muted); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(20, 184, 166, 0.7);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -8px rgba(20, 184, 166, 0.9);
  color: #fff;
}
.btn-ghost {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-strong);
}
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; border-radius: 8px; }

/* ============ 空状态 ============ */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.empty svg {
  width: 40px; height: 40px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 0.8rem;
  opacity: 0.5;
}

/* ============ 表单 ============ */
input, textarea, select {
  width: 100%;
  padding: 0.95rem 1.1rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}
textarea {
  resize: vertical;
  min-height: 360px;
  line-height: 1.8;
  font-size: 1rem;
  padding: 1.1rem 1.3rem;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: 0.92rem;
  color: var(--text-dim);
  margin-bottom: 0.55rem;
  font-weight: 500;
}

/* ============ 提示消息 ============ */
.msg {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.msg-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
[data-theme="light"] .msg-error { color: #b91c1c; }
.msg-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
[data-theme="light"] .msg-success { color: #15803d; }

/* ============ 标题 ============ */
h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
  color: var(--text-strong);
  line-height: 1.2;
}
h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-strong);
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

/* ============ 帖子标签 ============ */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0.2rem;
}
.tag-major,
.tag-minor {
  display: inline-block;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.tag-major {
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(20, 184, 166, 0.35);
}
.tag-major:hover {
  background: rgba(20, 184, 166, 0.28);
  color: #fff;
  transform: translateY(-1px);
}
.tag-minor {
  background: var(--card-bg-hover);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.tag-minor:hover {
  background: var(--card-bg);
  color: var(--text-strong);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.tag-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ============ 帖子正文 Markdown ============ */
.post-content {
  white-space: normal;
  line-height: 1.9;
  margin: 1.5rem 0;
  color: var(--text);
  font-size: 1.08rem;
  word-break: break-word;
}
.post-content > *:first-child { margin-top: 0; }
.post-content > *:last-child { margin-bottom: 0; }
.post-content p { margin: 1em 0; line-height: 1.9; font-size: 1.08rem; }
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--text-strong);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 1.6em 0 0.7em;
  line-height: 1.3;
}
.post-content h1 { font-size: 1.9rem; padding-bottom: 0.4em; border-bottom: 1px solid var(--border); }
.post-content h2 { font-size: 1.55rem; padding-bottom: 0.3em; border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 1.28rem; }
.post-content h4 { font-size: 1.12rem; }
.post-content a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
.post-content a:hover { color: var(--accent); }
.post-content strong { color: var(--text-strong); font-weight: 700; }
.post-content em { font-style: italic; }
.post-content del { opacity: 0.6; }
.post-content ul,
.post-content ol { margin: 0.9em 0; padding-left: 1.8em; }
.post-content li { margin: 0.4em 0; line-height: 1.85; font-size: 1.05rem; }
.post-content blockquote {
  margin: 1.2em 0;
  padding: 0.8em 1.2em;
  border-left: 4px solid var(--primary);
  background: var(--card-bg);
  border-radius: 0 10px 10px 0;
  color: var(--text-dim);
  font-style: italic;
  font-size: 1.05rem;
}
.post-content blockquote p { margin: 0.4em 0; }
.post-content code {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 0.9em;
  padding: 0.18em 0.45em;
  background: var(--card-bg-hover);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--primary-light);
}
.post-content pre {
  margin: 1.2em 0;
  padding: 1.1em 1.3em;
  background: var(--card-bg-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  line-height: 1.65;
  font-size: 0.94rem;
}
.post-content pre code { padding: 0; background: none; border: none; color: var(--text); font-size: inherit; }
.post-content img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  margin: 1.2em auto;
  box-shadow: var(--card-shadow);
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.post-content img:hover {
  transform: scale(1.01);
  box-shadow: 0 16px 44px -12px rgba(20, 184, 166, 0.5);
}
.post-content hr { border: none; height: 1px; background: var(--border); margin: 2em 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 1rem; }
.post-content th,
.post-content td { padding: 0.7em 1em; border: 1px solid var(--border); text-align: left; }
.post-content th { background: var(--card-bg-hover); color: var(--text-strong); font-weight: 700; }

/* ============================================================
   链接卡片（简约现代风）
   ============================================================ */
.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  margin: 0.9em 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    background 0.4s var(--ease);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  isolation: isolate;
}
.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
              transparent 0%,
              var(--lc-glow) 50%,
              transparent 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.link-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg,
              transparent,
              rgba(255, 255, 255, 0.08),
              transparent);
  transition: left 0.7s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.link-card:hover {
  transform: translateY(-3px);
  border-color: var(--lc-color);
  background: var(--card-bg-hover);
  box-shadow:
    0 18px 44px -16px var(--lc-glow),
    0 0 0 1px var(--lc-color);
}
.link-card:hover::before { opacity: 1; }
.link-card:hover::after { left: 120%; }

.link-card > * {
  position: relative;
  z-index: 2;
}

.link-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--lc-bg);
  border: 1px solid var(--lc-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
  box-shadow: 0 4px 14px -6px var(--lc-glow);
}
.link-card:hover .link-card-icon {
  transform: scale(1.08) rotate(-8deg);
  box-shadow: 0 8px 24px -8px var(--lc-glow);
}

.link-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.link-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}
.link-card:hover .link-card-title {
  color: var(--lc-color);
}
.link-card-desc {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.5;
  transition: color 0.3s var(--ease);
}
.link-card:hover .link-card-desc {
  color: var(--text);
}

.link-card-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--lc-bg);
  border: 1px solid var(--lc-color);
  color: var(--lc-color);
  transition:
    transform 0.5s var(--ease),
    background 0.4s var(--ease),
    color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.link-card-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.4s var(--ease);
}
.link-card:hover .link-card-arrow {
  background: var(--lc-color);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 8px 20px -6px var(--lc-glow);
}
.link-card:hover .link-card-arrow svg {
  transform: translateX(1px);
}

.link-card-blue {
  --lc-color: #3b82f6;
  --lc-bg: rgba(59, 130, 246, 0.12);
  --lc-glow: rgba(59, 130, 246, 0.4);
}
.link-card-green {
  --lc-color: #22c55e;
  --lc-bg: rgba(34, 197, 94, 0.12);
  --lc-glow: rgba(34, 197, 94, 0.4);
}
.link-card-purple {
  --lc-color: #a855f7;
  --lc-bg: rgba(168, 85, 247, 0.12);
  --lc-glow: rgba(168, 85, 247, 0.4);
}
.link-card-orange {
  --lc-color: #f59e0b;
  --lc-bg: rgba(245, 158, 11, 0.12);
  --lc-glow: rgba(245, 158, 11, 0.4);
}
.link-card-red {
  --lc-color: #ef4444;
  --lc-bg: rgba(239, 68, 68, 0.12);
  --lc-glow: rgba(239, 68, 68, 0.4);
}
.link-card-cyan {
  --lc-color: #06b6d4;
  --lc-bg: rgba(6, 182, 212, 0.12);
  --lc-glow: rgba(6, 182, 212, 0.4);
}

/* ============ 帖子操作区 ============ */
.post-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.like-btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease), fill 0.3s; }
.like-btn:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}
.like-btn:hover svg { transform: scale(1.15); }
.like-btn:active svg { transform: scale(0.9); }
.like-btn.liked {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
}
.like-btn.liked svg {
  fill: #ef4444;
  stroke: #ef4444;
  animation: likePop 0.4s var(--ease);
}
@keyframes likePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ============ 赞赏滚木 ============ */
.tip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.tip-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.tip-btn:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(251, 191, 36, 0.5);
}
.tip-btn:active { transform: translateY(0); }
.tip-received {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  color: #fbbf24;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
}
.tip-received svg { width: 14px; height: 14px; }

.tip-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}
.tip-modal {
  width: 100%;
  max-width: 400px;
  padding: 1.8rem;
  border-radius: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8);
  animation: modalIn 0.3s var(--ease);
}
.tip-modal h3 {
  font-size: 1.2rem;
  color: var(--text-strong);
  margin-bottom: 0.4rem;
  text-align: center;
}
.tip-modal p {
  color: var(--text-dim);
  font-size: 0.88rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.tip-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary-light);
  font-weight: 700;
}
.tip-balance svg { width: 14px; height: 14px; }
.tip-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tip-option {
  padding: 0.9rem 0.4rem;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.tip-option:hover { border-color: var(--border-hover); background: var(--card-bg-hover); }
.tip-option.selected {
  border-color: var(--primary);
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.tip-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.tip-custom input {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  min-height: auto;
  padding: 0.7rem 1rem;
}
.tip-modal-actions { display: flex; gap: 0.6rem; }
.tip-modal-actions .btn { flex: 1; }

/* ============ 发帖工具栏 ============ */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  padding: 0.6rem;
  margin-bottom: 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.editor-toolbar button {
  min-width: 40px;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.editor-toolbar button:hover {
  background: var(--card-bg-hover);
  color: var(--text-strong);
  border-color: var(--border);
}
.editor-toolbar button:active { transform: scale(0.95); }
.editor-toolbar .toolbar-spacer { flex: 1; }
.editor-toolbar .tab-btn {
  padding: 0 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.editor-toolbar .tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px -4px rgba(20, 184, 166, 0.6);
}
.editor-toolbar .tab-btn.active:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.preview-box {
  min-height: 360px;
  padding: 1.5rem 1.8rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.9;
}
.preview-box:empty::before {
  content: '暂无内容';
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============ 上传状态 ============ */
.upload-status {
  margin-top: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  animation: msgIn 0.3s var(--ease);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.upload-status.info {
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--primary-light);
}
.upload-status.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.upload-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
[data-theme="light"] .upload-status.success { color: #15803d; }
[data-theme="light"] .upload-status.error { color: #b91c1c; }

/* ============ 链接卡片弹窗 ============ */
.lc-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
  overflow-y: auto;
}
.lc-modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.8rem;
  border-radius: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  animation: modalIn 0.3s var(--ease);
}
.lc-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 0.3rem;
}
.lc-modal-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}
.lc-modal .form-group { margin-bottom: 1rem; }
.lc-modal label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.lc-modal input {
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  min-height: auto;
  height: auto;
}

.lc-icons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.lc-icon-btn {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  padding: 0;
}
.lc-icon-btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  background: var(--card-bg-hover);
}
.lc-icon-btn.selected {
  border-color: var(--primary);
  background: rgba(20, 184, 166, 0.15);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
  transform: scale(1.05);
}

.lc-colors {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.lc-color-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  padding: 0;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.4);
}
.lc-color-btn:hover { transform: scale(1.15); }
.lc-color-btn.selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25),
              0 4px 12px -2px rgba(0, 0, 0, 0.5);
  transform: scale(1.15);
}

.lc-preview {
  padding: 0.5rem;
  background: var(--input-bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.lc-preview .link-card {
  margin: 0;
  pointer-events: none;
}

.lc-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.lc-actions .btn { flex: 1; }

/* ============ 评论 ============ */
.comment { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.comment-head .btn-sm { padding: 0.28rem 0.7rem; font-size: 0.78rem; }
.comment-body {
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 1.02rem;
}
.comment-replies {
  margin-top: 0.8rem;
  margin-left: 1.2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}
.comment-reply { padding: 0.85rem 0; border-bottom: none; }
.comment-reply:not(:last-child) { border-bottom: 1px dashed var(--border); }
.reply-form-slot { margin-top: 0.6rem; }
.reply-form {
  margin-top: 0.4rem;
  padding: 0.9rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  animation: replyIn 0.3s var(--ease);
}
@keyframes replyIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.reply-input {
  width: 100%;
  min-height: 70px;
  padding: 0.7rem 0.9rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.reply-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.reply-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }

/* ============ 管理员标识 ============ */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(251, 146, 60, 0.18));
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.4);
  text-transform: uppercase;
  line-height: 1.4;
}
.del-btn.admin-del,
.admin-del {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.08) !important;
  font-weight: 700 !important;
}
.del-btn.admin-del:hover,
.admin-del:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: rgba(239, 68, 68, 0.55) !important;
  color: #fca5a5 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(239, 68, 68, 0.5);
}
.del-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ 个人主页 ============ */
.profile-hero {
  padding: 2rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.profile-avatar-lg {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2.4rem;
  flex-shrink: 0;
  box-shadow: 0 12px 32px -10px rgba(20, 184, 166, 0.6);
}
.profile-info { flex: 1; min-width: 200px; }
.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}
.profile-since { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; }
.profile-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.profile-stat { text-align: center; }
.profile-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.profile-stat-lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }
.profile-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.4rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.profile-tab {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.profile-tab:hover { color: var(--text-strong); background: var(--card-bg-hover); }
.profile-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(20, 184, 166, 0.6);
}

.tip-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.tip-item:last-child { border-bottom: none; }
.tip-info { flex: 1; min-width: 0; }
.tip-title {
  font-size: 0.95rem;
  color: var(--text-strong);
  font-weight: 500;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tip-meta { font-size: 0.8rem; color: var(--text-muted); }
.tip-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.tip-amount.in {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.tip-amount.out {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.tip-amount svg { width: 14px; height: 14px; }

/* ============ 消息通知 ============ */
.msg-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.msg-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
  box-shadow: 0 12px 32px -14px rgba(20, 184, 166, 0.5);
  color: inherit;
}
.msg-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}
.msg-body { flex: 1; min-width: 0; }
.msg-header {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.msg-header strong { color: var(--text-strong); font-weight: 700; }
.msg-target { color: var(--primary-light); font-weight: 500; }
.msg-preview {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  margin-top: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: var(--card-bg-hover);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  word-break: break-word;
}
.msg-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  padding-top: 0.15rem;
}

/* ============ 主页四大板块卡片 ============ */
.page-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-left: 0.9rem;
  position: relative;
}
.page-section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.6);
}
.page-section-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0;
}
.page-section-head .sub { font-size: 0.82rem; color: var(--text-muted); }

.boards-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.board-home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.4rem;
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: all 0.4s var(--ease);
  overflow: hidden;
}
.board-home-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%),
              rgba(20, 184, 166, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 0;
}
.board-home-card:hover::before { opacity: 1; }
.board-home-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
  box-shadow: 0 24px 48px -20px rgba(20, 184, 166, 0.55),
              0 0 0 1px rgba(45, 212, 191, 0.2);
}
.board-home-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  text-decoration: none;
  color: transparent;
}
.board-home-card > *:not(.board-home-link) {
  position: relative;
  z-index: 1;
}
.board-home-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.board-home-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s var(--ease);
}
.board-home-card:hover .board-home-icon { transform: scale(1.08) rotate(-5deg); }
.board-home-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.board-home-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.board-home-count { display: flex; align-items: baseline; gap: 0.15rem; flex-shrink: 0; }
.board-home-count-num {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.board-home-count-lbl { font-size: 0.78rem; color: var(--text-muted); }
.board-home-posts {
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}
.board-home-post {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 0.3rem 0.2rem;
  border-radius: 6px;
}
.board-home-post-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(20, 184, 166, 0.7);
}
.board-home-post-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}
.board-home-post-time { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }
.board-home-more {
  font-size: 0.78rem;
  color: var(--primary-light);
  padding-left: 1rem;
  padding-top: 0.2rem;
}
.board-home-empty {
  padding: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-bottom: 0.8rem;
}
.board-home-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  padding-top: 0.4rem;
  transition: transform 0.3s var(--ease);
}
.board-home-foot svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  transition: transform 0.3s var(--ease);
}
.board-home-card:hover .board-home-foot { transform: translateX(-4px); }
.board-home-card:hover .board-home-foot svg { transform: translateX(4px); }

@media (min-width: 900px) {
  .boards-home-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 板块详情页头部 ============ */
.board-detail-head {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.5rem;
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  flex-wrap: wrap;
}
.board-detail-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  flex-shrink: 0;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}
.board-detail-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0 0 0.2rem 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.board-detail-desc { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* ============ 发帖板块选择器 ============ */
.board-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.board-option {
  padding: 1rem 0.5rem;
  border-radius: 14px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  color: var(--text-dim);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s var(--ease);
}
.board-option:hover {
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
  transform: translateY(-2px);
}
.board-option.selected {
  border-color: var(--primary);
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12),
              0 8px 20px -8px rgba(20, 184, 166, 0.6);
}
.board-option-icon { font-size: 1.5rem; line-height: 1; }
.board-option-name { font-size: 0.92rem; font-weight: 700; color: inherit; }

/* ============ 板块筛选栏 ============ */
.board-filter {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--card-shadow);
}
.filter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.filter-btn:hover {
  color: var(--text-strong);
  border-color: var(--border-hover);
  background: var(--card-bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -10px rgba(20, 184, 166, 0.4);
}
.filter-icon {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
.filter-btn:hover .filter-icon { transform: scale(1.2) rotate(-6deg); }
.filter-name { font-size: 0.92rem; font-weight: 700; letter-spacing: 0.01em; }
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--card-bg-hover);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 24px -8px rgba(20, 184, 166, 0.7),
              0 0 0 3px rgba(20, 184, 166, 0.15);
  transform: translateY(-2px);
}
.filter-btn.active .filter-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.filter-btn.active .filter-icon { animation: filterIconPop 0.4s var(--ease); }
@keyframes filterIconPop {
  0% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.3) rotate(-12deg); }
  100% { transform: scale(1) rotate(0); }
}
.filter-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 10%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.filter-btn:active::after { opacity: 1; }
.filter-btn + .filter-btn::before {
  content: '';
  position: absolute;
  left: -0.35rem;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: var(--border);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s;
}
.filter-btn:hover::before,
.filter-btn.active::before,
.filter-btn:hover + .filter-btn::before,
.filter-btn.active + .filter-btn::before { opacity: 0; }

/* ============ 页脚 ============ */
footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 240px 1fr; }
  .col-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 800px) {
  .stats-panel { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .col-right { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .header-inner { gap: 1rem; }
  .chart_sd { min-width: auto; padding: 0.85rem 1.1rem; }
  #clock_c { font-size: 2rem; }
  .post-content { font-size: 1rem; }
  .post-content h1 { font-size: 1.5rem; }
  .post-content h2 { font-size: 1.3rem; }
  .page { padding: 1rem; }
  .user-name { display: none; }
  .user-trigger { padding: 0.3rem 0.55rem; }
  .user-wood { padding: 0.12rem 0.4rem; font-size: 0.72rem; }
  .user-dropdown { min-width: 220px; }
  .profile-hero { padding: 1.5rem 1.2rem; gap: 1.2rem; }
  .profile-avatar-lg { width: 76px; height: 76px; font-size: 1.9rem; }
  .profile-name { font-size: 1.35rem; }
  .header-search { width: 180px; height: 34px; padding: 0 0.7rem; }
  .header-search input { font-size: 0.85rem; }
  .header-search:focus-within { width: 220px; }
}

@media (max-width: 640px) {
  .board-filter { gap: 0.4rem; padding: 0.6rem; border-radius: 16px; }
  .filter-btn {
    flex: 1;
    min-width: calc(50% - 0.4rem);
    justify-content: center;
    padding: 0.65rem 0.7rem;
  }
  .filter-name { font-size: 0.88rem; }
  .filter-icon { font-size: 1rem; }
  .filter-badge { min-width: 20px; height: 20px; font-size: 0.72rem; }
  .filter-btn + .filter-btn::before { display: none; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  #clock_c { font-size: 1.7rem; }
  .cweek em { display: none; }
  .card { padding: 0.9rem; border-radius: 14px; }
  .editor-toolbar { gap: 0.2rem; padding: 0.4rem; }
  .editor-toolbar button { min-width: 34px; height: 32px; padding: 0 0.45rem; font-size: 0.85rem; }
  .preview-box { padding: 1rem; min-height: 240px; }
  textarea { min-height: 240px; padding: 0.9rem; }
  .tip-options { grid-template-columns: repeat(4, 1fr); }
  .tip-modal { padding: 1.3rem; }
  .header-search { display: none; }
  .announcement-modal { max-height: 90vh; border-radius: 16px; }
  .announcement-modal-head { padding: 1.2rem 1.2rem 1rem; }
  .announcement-modal-title { font-size: 1.2rem; }
  .announcement-modal-body { padding: 1.2rem; font-size: 0.96rem; }
  .announcement-modal-foot { padding: 0.9rem 1.2rem 1.2rem; }
  .board-selector { grid-template-columns: repeat(2, 1fr); }
  .board-home-head { gap: 0.7rem; }
  .board-home-icon { width: 46px; height: 46px; font-size: 1.3rem; }
  .board-home-name { font-size: 1.15rem; }
  .board-home-count-num { font-size: 1.15rem; }
  .msg-card { padding: 0.85rem 0.9rem; gap: 0.7rem; }
  .msg-avatar { width: 32px; height: 32px; font-size: 0.82rem; }
  .msg-time { font-size: 0.7rem; }
  .link-card { padding: 0.95rem 1rem; gap: 0.7rem; }
  .link-card-icon { width: 40px; height: 40px; font-size: 1.25rem; }
  .link-card-title { font-size: 0.98rem; }
  .link-card-desc { font-size: 0.82rem; }
  .lc-modal { padding: 1.3rem; border-radius: 16px; }
  .lc-icon-btn { width: 38px; height: 38px; font-size: 1.05rem; }
  .lc-color-btn { width: 30px; height: 30px; }
}

@media (max-width: 380px) {
  .filter-btn { min-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
/* ============================================================
   分页组件
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 1rem 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--card-shadow);
}
.pagination:empty { display: none; }

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
  font-variant-numeric: tabular-nums;
}
.page-btn:hover:not(:disabled) {
  background: var(--card-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px rgba(20, 184, 166, 0.5);
}
.page-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px -8px rgba(20, 184, 166, 0.7);
  cursor: default;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-ellipsis {
  padding: 0 0.3rem;
  color: var(--text-muted);
  font-weight: 700;
  user-select: none;
}

/* ============================================================
   管理面板帖子搜索
   ============================================================ */
.admin-post-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1rem;
  padding-left: 0.9rem;
}
.admin-post-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0;
  padding-left: 0.9rem;
  position: relative;
}
.admin-post-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 20px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.6);
}
.admin-post-tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 260px;
  padding: 0 0.9rem;
  height: 40px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.25s var(--ease);
}
.admin-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}
.admin-search svg {
  width: 16px; height: 16px;
  stroke: var(--text-muted);
  flex-shrink: 0;
}
.admin-search input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  height: auto;
  min-height: auto;
  box-shadow: none;
}
.admin-search input:focus {
  box-shadow: none;
  background: transparent;
  border: none;
}
.admin-search-clear {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg-hover);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.2s;
}
.admin-search-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.admin-search-clear svg { width: 11px; height: 11px; stroke: currentColor; }

.admin-post-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .admin-post-head { padding-left: 0; }
  .admin-post-head h2 { padding-left: 0.9rem; }
  .admin-post-tools { width: 100%; }
  .admin-search { width: 100%; }
  .pagination { gap: 0.3rem; padding: 0.7rem 0.5rem; }
  .page-btn { min-width: 36px; height: 36px; padding: 0 0.6rem; font-size: 0.85rem; }
}
/* ============================================================
   移动端：汉堡按钮 + 侧边栏
   ============================================================ */

/* 汉堡按钮（默认隐藏） */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.mobile-menu-btn:hover { background: rgba(255, 255, 255, 0.25); }
.mobile-menu-btn:active { transform: scale(0.94); }
.mobile-menu-btn svg { width: 20px; height: 20px; stroke: currentColor; }

/* 侧边栏遮罩 */
.mobile-sidebar-mask {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-sidebar-mask.open {
  opacity: 1;
  visibility: visible;
}

/* 侧边栏 */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  z-index: 9998;
  background: var(--card-bg);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 8px 0 40px -10px rgba(0, 0, 0, 0.6);
}
.mobile-sidebar.open { transform: translateX(0); }

/* 侧边栏头部：用户信息 */
.mobile-sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 1.2rem;
  background: var(--header-bg);
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.mobile-sidebar-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
  pointer-events: none;
}
.ms-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}
.ms-user-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.ms-username {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.15rem;
}
.ms-wood {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}
.ms-wood svg { width: 13px; height: 13px; }
.ms-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s var(--ease);
  position: relative;
  z-index: 1;
}
.ms-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}
.ms-close svg { width: 16px; height: 16px; stroke: currentColor; }

/* 侧边栏内容 */
.mobile-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.8rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ms-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 0.7rem 0.4rem;
}
.ms-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  text-align: left;
  transition: all 0.22s var(--ease);
  position: relative;
}
.ms-item:hover {
  background: var(--card-bg-hover);
  color: var(--text-strong);
  border-color: var(--border);
  transform: translateX(3px);
}
.ms-item:active { transform: translateX(3px) scale(0.98); }

.ms-icon {
  font-size: 1.15rem;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.ms-text {
  flex: 1;
  min-width: 0;
  color: inherit;
}
.ms-hint {
  font-size: 0.78rem;
  color: var(--primary-light);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
  white-space: nowrap;
}
.ms-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.25s var(--ease);
}
.ms-item:hover .ms-arrow {
  transform: translateX(3px);
  color: var(--primary-light);
}

/* 签到按钮状态 */
.ms-signin.signed .ms-hint {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
}
.ms-signin:disabled {
  cursor: default;
  opacity: 0.75;
}
.ms-signin:disabled:hover {
  transform: none;
  background: transparent;
  border-color: transparent;
}

/* 退出 */
.ms-logout { color: #f87171; }
.ms-logout:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.28);
  color: #f87171;
}

/* 分隔线 */
.ms-divider {
  height: 1px;
  background: var(--border);
  margin: 0.6rem 0.5rem;
}

/* ============================================================
   移动端媒体查询：隐藏统计球、侧栏，显示汉堡
   ============================================================ */
@media (max-width: 800px) {
  /* 隐藏统计面板 */
  .stats-panel { display: none; }

  /* 三栏布局收成单栏，隐藏左右侧栏 */
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .col-left,
  .col-right { display: none; }

  /* 顶部 header 精简 */
  .header-inner {
    padding: 0.7rem 1rem;
    gap: 0.6rem;
    flex-wrap: nowrap;
  }
  .mobile-menu-btn { display: flex; }

  .brand {
    font-size: 1rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
  }
  .brand-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 导航隐藏 */
  .main-nav { display: none; }

  /* 搜索框拉满中间空间 */
  .header-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 36px;
    padding: 0 0.8rem;
  }
  .header-search:focus-within { width: auto; }
  .header-search input { font-size: 0.88rem; }

  /* 桌面端的主题按钮和用户菜单隐藏（已进侧边栏） */
  .header-actions { display: none; }

  /* 页面内边距收紧 */
  .page {
    padding: 1rem 0.9rem 2rem;
  }

  /* 板块卡片在移动端更紧凑 */
  .boards-home-grid { gap: 0.8rem; }
  .board-home-card { padding: 1.1rem 1.2rem; border-radius: 16px; }
  .board-home-icon { width: 48px; height: 48px; font-size: 1.4rem; border-radius: 14px; }
  .board-home-name { font-size: 1.2rem; }
  .board-home-desc { font-size: 0.8rem; }
  .board-home-count-num { font-size: 1.2rem; }
  .board-home-post-title { font-size: 0.85rem; }

  /* 页头紧凑 */
  .page-section-head { margin-bottom: 0.8rem; }
  .page-section-head h2 { font-size: 1.05rem; }
  .page-section-head .sub { font-size: 0.75rem; }

  /* 底部 footer 紧凑 */
  footer {
    padding: 1.5rem 1rem;
    font-size: 0.78rem;
    margin-top: 1rem;
  }
}

/* 超窄屏 */
@media (max-width: 360px) {
  .mobile-sidebar { width: 88vw; }
  .header-inner { padding: 0.6rem 0.8rem; gap: 0.5rem; }
  .brand { font-size: 0.92rem; }
  .header-search { height: 34px; padding: 0 0.6rem; }
}

/* 桌面端隐藏侧边栏相关（保险） */
@media (min-width: 801px) {
  .mobile-sidebar,
  .mobile-sidebar-mask,
  .mobile-menu-btn {
    display: none !important;
  }
}
/* ============================================================
   手机端修复：顶部保留搜索框 + 侧边栏加全部帖子入口
   ============================================================ */

/* 覆盖旧的隐藏规则，让搜索框在手机上显示 */
@media (max-width: 800px) {
  .header-search {
    display: flex !important;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 36px;
    padding: 0 0.8rem;
  }
  .header-search input { font-size: 0.88rem; }
  .header-search input::placeholder { font-size: 0.85rem; }
}

/* 超窄屏进一步压缩，不隐藏 */
@media (max-width: 520px) {
  .header-search {
    display: flex !important;
    height: 34px;
    padding: 0 0.65rem;
    min-width: 0;
  }
  .header-search input { font-size: 0.82rem; }
  .header-search .search-icon { width: 14px; height: 14px; }
  .brand-name { max-width: 90px; }
}

@media (max-width: 380px) {
  .brand { font-size: 0.85rem; }
  .brand-name { max-width: 72px; }
  .header-search input::placeholder { color: transparent; }
}
/* ============================================================
   头像链接 & 头像图片
   ============================================================ */
.avatar-link {
  display: inline-flex;
  text-decoration: none;
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform 0.3s var(--ease);
}
.avatar-link:hover { transform: scale(1.08); }
.avatar-img {
  object-fit: cover;
  display: block;
  background: var(--card-bg-hover);
}
.avatar-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   个人主页头像编辑
   ============================================================ */
.profile-avatar-wrap {
  position: relative;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  cursor: default;
}
.profile-avatar-wrap.editable { cursor: pointer; }
.profile-avatar-wrap.editable:hover .avatar-edit-overlay { opacity: 1; }

.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.avatar-edit-overlay svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  fill: none;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.22s var(--ease);
  flex-shrink: 0;
}
.icon-btn:hover {
  border-color: var(--primary);
  background: rgba(20, 184, 166, 0.1);
  color: var(--primary-light);
  transform: rotate(-8deg) scale(1.05);
}
.icon-btn svg { width: 14px; height: 14px; }

/* ============================================================
   侧边栏公告
   ============================================================ */
.ms-announcements {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ms-ann-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.22s var(--ease);
}
.ms-ann-item:hover {
  background: var(--card-bg-hover);
  color: var(--text-strong);
  border-color: var(--border);
  transform: translateX(3px);
}
.ms-ann-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.7);
}
.ms-ann-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}
/* ============================================================
   个人主页 — 移动端适配
   ============================================================ */

@media (max-width: 800px) {
  /* 个人资料卡：垂直布局 */
  .profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.2rem;
    gap: 1rem;
  }
  .profile-avatar-wrap {
    margin: 0 auto;
  }
  .profile-avatar-lg {
    width: 88px;
    height: 88px;
    font-size: 2.1rem;
  }
  .profile-info {
    width: 100%;
    min-width: 0;
    text-align: center;
  }
  .profile-name-row {
    justify-content: center;
    gap: 0.4rem;
  }
  .profile-name {
    font-size: 1.3rem;
  }
  .profile-since {
    font-size: 0.82rem;
    margin-bottom: 0.9rem;
  }

  /* 统计：两列网格 */
  .profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    width: 100%;
  }
  .profile-stat {
    background: var(--card-bg-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.4rem;
    text-align: center;
  }
  .profile-stat-val {
    font-size: 1.25rem;
  }
  .profile-stat-lbl {
    font-size: 0.72rem;
    margin-top: 0.2rem;
  }

  /* Tab：可横向滚动 */
  .profile-tabs {
    padding: 0.35rem;
    gap: 0.25rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .profile-tabs::-webkit-scrollbar { display: none; }
  .profile-tab {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  /* 滚木收支条目：纵向堆叠 */
  .tip-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.85rem 0;
  }
  .tip-amount {
    align-self: flex-start;
    font-size: 0.9rem;
  }
}

@media (max-width: 520px) {
  .profile-avatar-lg {
    width: 76px;
    height: 76px;
    font-size: 1.85rem;
  }
  .profile-name {
    font-size: 1.15rem;
  }
  .profile-stat-val {
    font-size: 1.1rem;
  }
  .profile-stat-lbl {
    font-size: 0.68rem;
  }
}

/* ============================================================
   昵称 / 弹窗 — 移动端适配
   ============================================================ */
@media (max-width: 520px) {
  .tip-modal-mask {
    padding: 1rem;
    align-items: flex-end;
  }
  .tip-modal {
    max-width: none !important;
    width: 100%;
    padding: 1.4rem;
    border-radius: 20px 20px 16px 16px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s var(--ease);
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .tip-modal h3 {
    font-size: 1.15rem;
  }
  .tip-modal p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  .tip-modal .form-group {
    margin-bottom: 0.9rem;
  }
  .tip-modal input {
    font-size: 1rem;
    padding: 0.85rem 1rem;
    min-height: auto;
  }
  .tip-modal-actions {
    margin-top: 1rem;
    gap: 0.5rem;
  }
  .tip-modal-actions .btn {
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
  }

  /* 头像编辑按钮在移动端常显（因为没有 hover） */
  .profile-avatar-wrap.editable .avatar-edit-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 60%);
  }
  .avatar-edit-overlay svg {
    width: 24px;
    height: 24px;
    position: absolute;
    bottom: 6px;
    right: 6px;
  }

  /* 昵称编辑图标按钮放大一点，好点 */
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .icon-btn svg {
    width: 16px;
    height: 16px;
  }
}
/* ============================================================
   登录 / 注册页
   ============================================================ */
.auth-card {
  padding: 2rem 1.8rem;
  animation: cardIn 0.5s var(--ease) both;
}
.auth-head {
  margin-bottom: 1.5rem;
}
.auth-head h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
}
.auth-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1.3rem;
  font-size: 1rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.auth-switch a {
  font-weight: 600;
  margin-left: 0.2rem;
}

/* ============================================================
   邮箱验证提示卡片
   ============================================================ */
.auth-verify {
  padding: 2.5rem 2rem;
  text-align: center;
  animation: cardIn 0.5s var(--ease) both;
}

.verify-icon {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(34, 211, 238, 0.18));
  border: 1px solid rgba(20, 184, 166, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px -12px rgba(20, 184, 166, 0.6);
}
.verify-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--primary-light);
  position: relative;
  z-index: 1;
}
.verify-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  animation: verifyPulse 2s ease-out infinite;
}
@keyframes verifyPulse {
  0% { opacity: 0.7; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.35); }
}

.verify-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0 0 0.7rem;
  letter-spacing: -0.01em;
}
.verify-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0 0 1.5rem;
}
.verify-desc strong {
  color: var(--primary-light);
  font-weight: 700;
  word-break: break-all;
}

.verify-tips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  background: var(--card-bg-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
}
.verify-tip-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.verify-tip-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.verify-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.verify-actions .btn {
  width: 100%;
  padding: 0.8rem 1.3rem;
}

.verify-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--text-muted);
  transition: color 0.25s;
}

/* ============================================================
   移动端
   ============================================================ */
@media (max-width: 520px) {
  .auth-card {
    padding: 1.6rem 1.3rem;
    border-radius: 16px;
  }
  .auth-head h2 { font-size: 1.35rem; }
  .auth-verify { padding: 1.8rem 1.3rem; }
  .verify-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 1.2rem;
  }
  .verify-icon svg { width: 32px; height: 32px; }
  .verify-title { font-size: 1.2rem; }
  .verify-desc { font-size: 0.88rem; }
  .verify-tips { padding: 0.85rem 1rem; }
  .verify-tip-item { font-size: 0.8rem; }
}