/* ============================================
   势逐七浪 — 复古贴吧/博客风格主题
   支持：浅雾蓝 / 浅绯红 / 米白色
   ============================================ */

/* ---------- 默认主题：浅雾蓝：清新蓝色调 ---------- */
:root {
  color-scheme: light;
  --bg: #f4f8ff;
  --bg-rgb: 244, 248, 255;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #eaf2ff;
  --ink: #0f1a2e;
  --muted: #4a5568;
  --dim: #6b7a8f;
  --line: #c8d8ee;
  --accent: #5b83b7;
  --accent-strong: #2e5d98;
  --accent-soft: rgba(91, 131, 183, 0.15);
  --accent-glow: rgba(91, 131, 183, 0.25);
  --accent-gradient: linear-gradient(135deg, #5b83b7 0%, #2e5d98 100%);
  --green: #4e8a60;
  --red: #b75f5f;
  --shadow: 0 8px 26px rgba(55, 85, 120, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.45);
  --radius-xl: 32px;
  --radius-lg: 28px;
  --radius: 24px;
  --radius-md: 20px;
  --radius-sm: 18px;
  --radius-xs: 16px;
  --radius-2xs: 12px;
  --radius-3xs: 8px;
  --radius-full: 999px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Serif SC", "Songti SC", serif;
}

/* ---------- 浅绯红：温暖红色调 ---------- */
[data-theme="red"] {
  color-scheme: light;
  --bg: #fff5f3;
  --bg-rgb: 255, 245, 243;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffe5e0;
  --ink: #3d1f1c;
  --muted: #8a5f58;
  --dim: #b08078;
  --line: #f0c8c0;
  --accent: #d46a60;
  --accent-strong: #b84840;
  --accent-soft: rgba(212, 106, 96, 0.18);
  --accent-glow: rgba(212, 106, 96, 0.32);
  --accent-gradient: linear-gradient(135deg, #d46a60 0%, #b84840 100%);
  --green: #6a9a5a;
  --red: #d46060;
  --glass-bg: rgba(255, 245, 243, 0.42);
  --glass-border: rgba(255, 200, 190, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.48);
}

/* ---------- 米白色：典雅暖色调 ---------- */
[data-theme="cream"] {
  color-scheme: light;
  --bg: #faf6ed;
  --bg-rgb: 250, 246, 237;
  --panel: rgba(255, 252, 245, 0.94);
  --panel-strong: #f0e8d8;
  --ink: #2c2418;
  --muted: #6a5d4a;
  --dim: #9a8a70;
  --line: rgba(140, 120, 80, 0.18);
  --accent: #d4a040;
  --accent-strong: #b08020;
  --accent-soft: rgba(212, 160, 64, 0.18);
  --accent-glow: rgba(212, 160, 64, 0.35);
  --accent-gradient: linear-gradient(135deg, #d4a040 0%, #b08020 100%);
  --green: #5a9a4a;
  --red: #c45a3a;
  --shadow: 0 12px 40px rgba(80, 60, 30, 0.12);
  --glass-bg: rgba(250, 246, 237, 0.45);
  --glass-border: rgba(240, 228, 200, 0.32);
  --glass-highlight: rgba(255, 252, 245, 0.48);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: color 0.4s ease;
}

/* ============================================
   氛围场景：室内 + 落地窗 + 下雨 + 盆栽（真实图片背景）
   ============================================ */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background: url("./images/bg-rainy-room.jpg") center/cover no-repeat;
}

/* 图片上方暗色 overlay + 右下角渐变覆盖水印 */
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 88%, rgba(0,0,0,0.45) 100%),
    rgba(0, 0, 0, 0.15);
}

/* 隐藏氛围 */
.atmosphere.off { display: none; }

/* 背景纹理 */
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(128, 128, 128, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 128, 128, 0.3) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

/* 环境光晕 */
.ambient {
  position: fixed;
  z-index: -2;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.28;
  animation: drift 16s ease-in-out infinite alternate;
}
.ambient-one {
  top: 6%;
  left: -8rem;
  background: var(--accent);
}
.ambient-two {
  right: -10rem;
  bottom: 8%;
  background: var(--accent);
  animation-delay: -5s;
  opacity: 0.18;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2rem, -1.5rem, 0) scale(1.1); }
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.20) inset,
    0 2px 16px rgba(0, 0, 0, 0.12),
    0 -1px 0 rgba(0, 0, 0, 0.04) inset;
  transition: border-color 0.3s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }

.brand strong, .brand small { display: block; }
.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav-tab {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-xs);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}
.nav-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.18);
}
.nav-tab.active {
  color: #0f1a2e;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.88rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.user-badge:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
.user-badge .avatar {
  margin: 0;
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.85rem;
  border-radius: 50%;
}

/* ---------- 主内容 ---------- */
main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

/* ---------- 公告条 ---------- */
.retro-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.85rem;
  color: var(--ink);
}
.retro-bar span:first-child {
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
}
.retro-bar marquee {
  flex: 1;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.5fr);
  gap: 1rem;
  align-items: center;
  min-height: 280px;
}

.home-minimal {
  display: flex;
  justify-content: center;
  min-height: 170px;
}

.home-minimal .hero-panel {
  width: 100%;
}

.hero-copy,
.hero-panel,
.block,
.side-card,
.toolbar {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--radius) * 1.2);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.16),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  overflow: hidden;
}

/* 多层玻璃质感：主折射光 */
.hero-copy::before,
.hero-panel::before,
.block::before,
.side-card::before,
.toolbar::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.00) 0%,
    rgba(255, 255, 255, 0.02) 20%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.02) 80%,
    rgba(255, 255, 255, 0.00) 100%
  );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-15deg);
  opacity: 0.6;
}

/* 边缘内发光 */
.hero-copy::after,
.hero-panel::after,
.block::after,
.side-card::after,
.toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 0 40px rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 1;
}

.hero-copy:hover,
.hero-panel:hover,
.block:hover,
.side-card:hover,
.toolbar:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.22),
    0 6px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.hero-copy > *,
.hero-panel > *,
.block > *,
.side-card > *,
.toolbar > * {
  position: relative;
  z-index: 2;
}

.hero-copy {
  position: relative;
  padding: clamp(1.8rem, 4vw, 3rem);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 600px;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 400;
}

h3 { margin-bottom: 0.6rem; font-size: 1.05rem; }

.hero-desc {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

/* ---------- 按钮 ---------- */
.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  cursor: pointer;
  border: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(var(--accent), var(--accent-strong));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25), 0 6px 18px var(--accent-glow);
  font-weight: 900;
}
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.secondary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.text-button {
  min-height: 2.2rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.15);
}

.secondary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.35);
}

/* ---------- Hero 面板 ---------- */
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.mini-grid div {
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
}
.mini-grid strong,
.mini-grid span { display: block; }
.mini-grid strong {
  font-size: 1.5rem;
  color: var(--accent);
}
.mini-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.85rem;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.6rem;
  min-width: 200px;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.search-box input,
.publish-form input,
.publish-form select,
.publish-form textarea,
.dialog input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-box input {
  min-height: 2.6rem;
  border: 0;
  background: transparent;
}
.search-box input:focus,
.publish-form input:focus,
.publish-form select:focus,
.publish-form textarea:focus,
.dialog input:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- 标签 ---------- */
.chip-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.8rem;
  transition: 0.2s ease;
}
.chip { cursor: pointer; }
.chip:hover,
.tag:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}
.chip.active {
  color: #fff;
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- 内容网格 ---------- */
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.section-grid.single {
  grid-template-columns: 1fr;
}

/* ---------- 信息页网格 ---------- */
.info-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1rem;
}

.info-stats-wide {
  grid-column: 1 / -1;
}
.info-stats-wide .mini-grid {
  grid-template-columns: repeat(4, 1fr);
}

.info-tools {
  grid-column: 1 / 3;
}

.info-about {
  grid-column: 3 / 4;
}

.info-tags {
  grid-column: 1 / 2;
}

.info-members {
  grid-column: 2 / 4;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 1rem;
  margin-top: 1rem;
}

.retro-box,
.retro-section {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) * 1.2);
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    0 14px 48px rgba(0, 0, 0, 0.14),
    0 6px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* 更细腻的玻璃折射光 */
.retro-section::before,
.retro-box::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 180%;
  height: 220%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.04) 25%,
      rgba(255, 255, 255, 0.10) 50%,
      rgba(255, 255, 255, 0.04) 75%,
      rgba(255, 255, 255, 0.00) 100%
    );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-12deg);
  opacity: 0.5;
}

/* 边缘内发光增强 */
.retro-section::after,
.retro-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    inset 0 0 60px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.retro-section > *,
.retro-box > * {
  position: relative;
  z-index: 2;
}

.retro-section:hover,
.retro-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.22),
    0 8px 28px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.retro-box {
  padding: 1rem;
}

.retro-box h3 {
  margin: -1rem -1rem 0.8rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.latest-list {
  display: grid;
  gap: 0.45rem;
}

.latest-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.42rem 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.88rem;
}

.latest-item strong {
  color: var(--ink);
  font-weight: 700;
}

.button-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.board-tools {
  margin-bottom: 0.9rem;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.content-column,
.sidebar {
  display: grid;
  gap: 1rem;
}

.block,
.side-card {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-list,
.forum-board {
  display: grid;
  gap: 0.8rem;
}

/* ---------- 卡片 ---------- */
.content-card,
.post-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius-sm) * 1.4);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--glass-border);
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  cursor: pointer;
}

/* 卡片内容层 */
.content-card > *,
.post-card > * {
  position: relative;
  z-index: 2;
}

.content-card:hover,
.post-card:hover {
  border-color: var(--glass-border);
  background: var(--glass-bg);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 0 0 1px var(--glass-border);
  transform: translateY(-4px) scale(1.02);
}

/* 点击按住时的玻璃特效 */
.content-card:active,
.post-card:active {
  border-color: var(--glass-border);
  background: var(--glass-bg);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.36),
    0 16px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--glass-border),
    0 0 30px var(--accent-glow);
  transform: translateY(-2px) scale(0.98);
}

@keyframes glassPulse {
  0% {
    box-shadow:
      0 20px 64px rgba(0, 0, 0, 0.24),
      0 8px 32px rgba(0, 0, 0, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -1px 0 rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.32),
      0 12px 40px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.2),
      0 0 20px var(--accent-glow);
  }
  100% {
    box-shadow:
      0 24px 72px rgba(0, 0, 0, 0.28),
      0 12px 40px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      inset 0 -1px 0 rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.2);
  }
}

@keyframes glassPress {
  0% {
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    transform: translateY(-2px) scale(0.98);
  }
}

.content-card.featured::before,
.content-card.pinned::before,
.post-card.pinned::before {
  position: absolute;
  top: 0;
  right: 1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  color: #fff;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  content: "精华";
}
.content-card.pinned::before,
.post-card.pinned::before { content: "置顶"; }

/* 卡片动态光点（玻璃水珠感） */
.content-card .glass-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.15) 50%, transparent 70%);
  pointer-events: none;
  animation: glassFloat 8s ease-in-out infinite;
  opacity: 0;
}
.content-card:nth-child(3n+1) .glass-dot {
  top: 8%;
  right: 12%;
  animation-delay: 0s;
}
.content-card:nth-child(3n+2) .glass-dot {
  top: 5%;
  right: 25%;
  animation-delay: 2.5s;
  width: 10px;
  height: 10px;
}
.content-card:nth-child(3n+3) .glass-dot {
  top: 10%;
  right: 18%;
  animation-delay: 5s;
  width: 14px;
  height: 14px;
}

@keyframes glassFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
  20% { opacity: 0.8; transform: translateY(-2px) scale(1); }
  50% { opacity: 0.4; transform: translateY(4px) scale(0.9); }
  80% { opacity: 0; transform: translateY(8px) scale(0.7); }
}

.article-card .comments {
  background: rgba(255, 255, 255, 0.44);
  margin-inline: -0.35rem;
  padding-inline: 0.35rem;
  border-radius: var(--radius-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.meta {
  color: var(--dim);
  font-size: 0.8rem;
}

.excerpt {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.small-button {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  transition: 0.2s ease;
}
.small-button:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.38);
}
.small-button.active {
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  background: var(--accent);
  font-weight: 600;
}
.small-button.danger:hover {
  color: #fff;
  border-color: rgba(231, 76, 60, 0.5);
  background: rgba(231, 76, 60, 0.15);
}

/* ---------- 评论 ---------- */
.comments {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment {
  color: var(--muted);
  font-size: 0.88rem;
}
.comment strong { color: var(--ink); }

.comment-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.comment-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  padding: 0.55rem 0.8rem;
  outline: none;
}
.comment-form input:focus { border-color: rgba(255, 255, 255, 0.14); }

/* ---------- 侧边栏 ---------- */
.side-card p {
  color: var(--ink);
  line-height: 1.7;
  font-size: 0.92rem;
}

.member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.member:last-child { border-bottom: 0; }

.avatar {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  margin-right: 0.45rem;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  font-size: 0.85rem;
}

.role {
  color: var(--green);
  font-size: 0.78rem;
}

/* ---------- 发布 ---------- */
.publish { margin-top: 1rem; }

.draft-indicator {
  color: var(--muted);
  font-size: 0.82rem;
}

.publish-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.publish-form label,
.dialog label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.publish-form input,
.publish-form select,
.publish-form textarea,
.dialog input {
  min-height: 2.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
}

.publish-form textarea {
  resize: vertical;
  line-height: 1.7;
}

.wide { grid-column: 1 / -1; }

/* ---------- 对话框 ---------- */
.dialog {
  width: min(640px, calc(100% - 2rem));
  border: 0;
  border-radius: calc(var(--radius) * 1.5);
  color: var(--ink);
  background: transparent;
}
.dialog::backdrop {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 1.2rem;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--radius) * 1.4);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 弹窗高级玻璃折射 */
.dialog-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.05) 20%,
      rgba(255, 255, 255, 0.12) 40%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.05) 80%,
      rgba(255, 255, 255, 0.00) 100%
    );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-18deg);
  opacity: 0.6;
}

.dialog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 80px rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 1;
}

.dialog-card > * {
  position: relative;
  z-index: 2;
}

.dialog-card:hover {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.38),
    0 12px 36px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.settings-card {
  max-height: 80vh;
  overflow-y: auto;
}

.dialog-body {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
}
.dialog-body p { margin: 0.5rem 0; }
.dialog-body ul, .dialog-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.dialog-body li { margin: 0.3rem 0; }
.dialog-body strong { color: var(--ink); }
.dialog-body em { color: var(--dim); }

.preview-card .content-card {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.preview-card .card-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
}
.preview-card .meta {
  color: var(--dim);
  font-size: 0.82rem;
}
.preview-card .excerpt {
  color: var(--muted);
  line-height: 1.8;
  margin: 0.8rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-card .card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.preview-card .tag {
  color: var(--accent);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.42);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.preview-card .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dialog-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  cursor: pointer;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.3rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: 0.2s ease;
}
.dialog-close:hover {
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

/* ---------- 登录/注册 ---------- */
.auth-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 2px solid transparent;
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.auth-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.auth-tab.active {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 12px var(--accent-glow);
  border-color: rgba(255,255,255,0.2);
  font-weight: 900;
}
.auth-tab .tab-icon { font-size: 1.1rem; }

.auth-panel {
  display: grid;
  gap: 1rem;
  padding: 0.5rem 0;
}
.auth-panel.hidden { display: none; }

/* 输入框组 */
.input-group-glass {
  display: grid;
  gap: 0.8rem;
}

.auth-glass input,
.dialog input {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}
.auth-glass input:focus,
.dialog input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
}
.auth-glass input::placeholder {
  color: var(--dim);
}

/* 密码切换按钮 */
.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: 0.2s ease;
}
.password-toggle:hover {
  color: var(--accent);
}

/* 记住我 */
.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--ink);
  font-size: 0.88rem;
}
.remember-me input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.remember-me label {
  cursor: pointer;
}

/* 错误和成功提示 */
.auth-error {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 99, 71, 0.15);
  border: 1px solid rgba(255, 99, 71, 0.3);
  color: #d32f2f;
  font-size: 0.88rem;
}
.auth-success {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #2e7d32;
  font-size: 0.88rem;
}

/* 许可协议 */
.terms-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.terms-agree input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  accent-color: var(--accent);
}
.terms-agree label { cursor: pointer; }
.terms-link {
  color: var(--accent);
  text-decoration: none;
}
.terms-link:hover { text-decoration: underline; }

/* ---------- 设置 ---------- */
.setting-group {
  padding: 0.8rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.setting-group:first-of-type { border-top: 0; }

/* 个人资料 */
.profile-row {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.6rem;
}

.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.avatar-preview {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview span {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}

.upload-button {
  cursor: pointer;
}

.profile-fields {
  flex: 1;
  display: grid;
  gap: 0.6rem;
}

.profile-fields label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.profile-fields input,
.profile-fields select {
  min-height: 2.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  outline: none;
}

.profile-fields input:focus,
.profile-fields select:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

/* 主题 */
.theme-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 0.6rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink);
}
.theme-option input {
  position: absolute;
  opacity: 0;
}
.theme-preview {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: 0.2s ease;
}
.theme-option input:checked + .theme-preview {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.theme-blue { background: linear-gradient(135deg, #f4f8ff 45%, #9fbadc); }
.theme-red  { background: linear-gradient(135deg, #fff6f4 45%, #d9a19b); }
.theme-cream { background: linear-gradient(135deg, #e8dcc8, #f5f0e8); border: 1px solid rgba(0,0,0,0.1); }
.theme-gray { background: linear-gradient(135deg, #1c1d20, #777b84); }

/* 显示设置 */
.setting-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.setting-row label {
  flex: 1;
  display: grid;
  gap: 0.3rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}

.setting-row select {
  min-height: 2.4rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  outline: none;
}

.setting-row select:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

/* 复选框 */
.setting-checks {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

/* ---------- 空状态 ---------- */
.empty {
  padding: 1.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

/* ---------- 工具类 ---------- */
.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero,
  .section-grid,
  .portal-grid,
  .info-layout {
    grid-template-columns: 1fr;
  }
  .info-stats-wide .mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .info-tools,
  .info-about,
  .info-tags,
  .info-members {
    grid-column: 1 / -1;
  }
  .nav { order: 3; width: 100%; justify-content: center; }
  .topbar { flex-wrap: wrap; }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .publish-form {
    grid-template-columns: 1fr;
  }
  .wide { grid-column: auto; }
  .profile-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .theme-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 1rem, 1100px);
    padding-top: 1rem;
  }
  .topbar { padding: 0.7rem; }
  .ghost-button { display: none; }
  .hero { min-height: auto; }
  h1 { font-size: 2.2rem; }
  .theme-options { gap: 0.6rem; }
  .theme-preview { width: 2.4rem; height: 2.4rem; }
  .dialog {
    width: min(100% - 1rem, 560px);
  }
}

/* ---------- 登录/注册弹窗优化 ---------- */
.auth-glass {
  position: relative;
}

.auth-header {
  text-align: center;
  margin-bottom: 0.5rem;
}
.auth-header .auth-avatar {
  display: inline-block;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 8px 24px var(--accent-glow);
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
}
.auth-header .auth-avatar span {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.auth-header .eyebrow {
  margin-bottom: 0.2rem;
}
.auth-header h2 {
  margin-bottom: 0.3rem;
  font-size: 1.6rem;
}
.auth-header .auth-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* 主按钮样式优化 */
.auth-glass .primary-button {
  min-height: 2.6rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 1rem;
  background: var(--accent-gradient);
  box-shadow: 0 6px 18px var(--accent-glow);
  border: 0;
  transition: all 0.3s ease;
}
.auth-glass .primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}
.auth-glass .primary-button:active {
  transform: translateY(0);
}

.auth-glass .glass-button {
  min-height: 2.6rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 1rem;
  background: var(--accent-gradient);
  box-shadow: 0 6px 18px var(--accent-glow);
  border: 0;
  transition: all 0.3s ease;
  color: #fff;
}
.auth-glass .glass-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}
.auth-glass .glass-button:active {
  transform: translateY(0);
}

/* ---------- 设置弹窗优化 ---------- */
.settings-card {
  max-height: 85vh;
  overflow-y: auto;
}

/* 协议链接样式 */
.terms-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.terms-link:hover {
  text-decoration: underline;
}

/* ============================================
   势逐七浪 - 登录/注册重做UI
   现代玻璃拟态设计
   ============================================ */

/* ---------- 登录/注册弹窗重做 ---------- */
.auth-dialog-card {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.36),
    0 12px 40px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.14);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.215, 0.61, 0.355, 1);
  min-width: 420px;
  max-width: 520px;
}

.auth-dialog-card::before {
  content: "";
  position: absolute;
  top: -70%;
  left: -70%;
  width: 240%;
  height: 240%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.06) 20%,
      rgba(255, 255, 255, 0.15) 45%,
      rgba(255, 255, 255, 0.22) 60%,
      rgba(255, 255, 255, 0.06) 85%,
      rgba(255, 255, 255, 0.00) 100%
    );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-20deg);
  opacity: 0.65;
}

.auth-dialog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    inset 0 0 90px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  z-index: 1;
}

.auth-dialog-card:hover {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.42),
    0 16px 48px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.20);
  transform: translateY(-3px) scale(1.01);
}

.auth-dialog-card > * {
  position: relative;
  z-index: 2;
}

/* ---------- 弹窗头部 ---------- */
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.auth-header .eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.auth-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  font-family: var(--font-display);
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.auth-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(91, 131, 183, 0.3);
  position: relative;
  overflow: hidden;
}

.auth-avatar span {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
  opacity: 0.6;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); opacity: 0.8; }
}

/* ---------- 标签切换 ---------- */
.auth-tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  margin: 0.5rem 0 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.auth-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 0;
}

.auth-tab span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-tab.active {
  color: #fff;
}

.auth-tab.active::before {
  opacity: 1;
}

.auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ---------- 输入面板 ---------- */
.auth-panel {
  display: grid;
  gap: 1rem;
}

.auth-panel.hidden { display: none; }

.input-group-glass {
  display: grid;
  gap: 0.9rem;
}

.input-group-glass label {
  position: relative;
  display: grid;
  gap: 0.4rem;
}

.input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.9rem;
  color: var(--dim);
}

.glass-input {
  min-height: 3rem;
  padding: 0.75rem 0.9rem 0.75rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.95rem;
  transition: all 0.25s ease;
  outline: none;
}

.glass-input::placeholder {
  color: var(--dim);
  opacity: 0.6;
}

.glass-input:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.glass-input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 0 0 4px var(--accent-glow);
  transform: translateY(-1px);
}

/* 密码切换按钮 */
.password-toggle {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 8px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.password-toggle:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.05);
}

/* 记住我 */
.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.remember-me input {
  width: 1.4rem;
  height: 1.4rem;
  accent-color: var(--accent);
}

/* ---------- 错误/成功提示 ---------- */
.auth-error,
.auth-success {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  text-align: center;
  margin: 0.3rem 0;
  transition: all 0.25s ease;
}

.auth-error {
  color: #b75f5f;
  background: rgba(183, 95, 95, 0.12);
  border: 1px solid rgba(183, 95, 95, 0.2);
}

.auth-success {
  color: var(--green);
  background: rgba(78, 138, 96, 0.15);
  border: 1px solid rgba(78, 138, 96, 0.25);
}

/* ---------- 按钮 ---------- */
.primary-button.glass-button {
  min-height: 3.4rem;
  padding: 0.9rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid var(--accent-strong);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 40px var(--accent-glow);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.primary-button.glass-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 56px var(--accent-glow);
}

.primary-button.glass-button:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.primary-button.glass-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  pointer-events: none;
}

.button-icon {
  font-size: 1.1rem;
}

/* ---------- 底部区域 ---------- */
.terms-agree {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
}

.terms-agree input {
  width: 1.3rem;
  height: 1.3rem;
  accent-color: var(--accent);
}

.terms-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.terms-link:hover {
  text-decoration: underline;
  color: var(--accent-strong);
}

/* ---------- 表单标题 ---------- */
.auth-form-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  color: var(--ink);
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 520px) {
  .auth-dialog-card {
    width: 90vw;
    padding: 2rem 1.5rem;
  }
  
  .auth-header h2 {
    font-size: 1.6rem;
  }
  
  .auth-avatar {
    width: 60px;
    height: 60px;
  }
  
  .auth-avatar span {
    font-size: 2rem;
  }
}
