/* ============================================================
   IX星穹书驿 —— 全站样式系统
   色彩体系依据论文 5.1.2 节定义，视觉语言：星轨 · 车窗 · 星门 · 星图
   ============================================================ */

:root {
  --primary-color: #6b46c1;      /* 主色调 - 星云紫 */
  --primary-light: #9f7aea;      /* 高亮色 - 星光紫 */
  --primary-dark: #44337a;       /* 深空色 */
  --accent-color: #d53f8c;       /* 强调色 - 星云粉 */
  --nebula-blue: #4c51bf;        /* 星云蓝 */
  --cosmic-purple: #553c9a;      /* 宇宙紫 */
  --deep-space: #1a202c;         /* 深空背景 */
  --text-primary: #e2e8f0;       /* 主要文字 */
  --text-secondary: #a0aec0;     /* 次要文字 */

  --grad-main: linear-gradient(135deg, #9f7aea 0%, #d53f8c 100%);
  --grad-soft: linear-gradient(135deg, rgba(159,122,234,.9), rgba(213,63,140,.9));
  --gold: #ecc94b;

  --glass-bg: linear-gradient(160deg, rgba(40,46,70,.66), rgba(26,32,44,.55));
  --glass-border: 1px solid rgba(159,122,234,.16);
  --radius: 18px;
  --radius-sm: 12px;

  --nav-h: 66px;
  --shadow-lg: 0 14px 44px rgba(5,8,20,.45);
  --glow-purple: 0 0 22px rgba(159,122,234,.45);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-primary);
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(107,70,193,.32), transparent 62%),
    radial-gradient(900px 520px at -12% 28%, rgba(213,63,140,.14), transparent 60%),
    radial-gradient(1000px 760px at 50% 112%, rgba(76,81,191,.26), transparent 62%),
    linear-gradient(180deg, #141a2b 0%, var(--deep-space) 42%, #241d3d 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}

/* 星空画布（main.js 动态注入） */
.star-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

::selection { background: rgba(159,122,234,.45); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(26,32,44,.5); }
::-webkit-scrollbar-thumb { background: rgba(107,70,193,.55); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(159,122,234,.75); }

/* 无障碍：跳转链接 */
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 999;
  padding: 8px 18px; background: var(--primary-color); border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.container { width: min(1200px, 92%); margin: 0 auto; }
main { min-height: calc(100vh - var(--nav-h)); }

/* ---------------- 通用组件 ---------------- */

/* 玻璃态面板（车窗意象） */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.05);
  isolation: isolate;
}

/* 按钮：主按钮带能量动效 */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 6px 22px rgba(213,63,140,.35);
}
.btn-primary:hover { box-shadow: 0 8px 30px rgba(213,63,140,.55); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid rgba(159,122,234,.55);
  color: var(--primary-light);
  background: rgba(159,122,234,.06);
}
.btn-ghost:hover { background: rgba(159,122,234,.16); box-shadow: var(--glow-purple); transform: translateY(-2px); }
.btn-lg { padding: 14px 38px; font-size: 17px; }
.btn-block { width: 100%; }

/* 点击能量汇聚效果（论文 5.3.1） */
.energy-effect {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: energy .65s ease-out forwards;
}
@keyframes energy { to { width: 320px; height: 320px; opacity: 0; } }

/* 标签 chip */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 16px; border-radius: 999px;
  font-size: 13.5px; letter-spacing: 1px;
  color: var(--text-secondary);
  border: 1px solid rgba(160,174,192,.25);
  background: rgba(26,32,44,.45);
  transition: all .25s;
  cursor: pointer;
}
.chip:hover { color: var(--primary-light); border-color: rgba(159,122,234,.5); }
.chip.active {
  background: var(--grad-main); color: #fff; border-color: transparent;
  box-shadow: 0 4px 16px rgba(213,63,140,.4);
}
.chip.tag {
  font-size: 12px; padding: 3px 11px;
  color: var(--primary-light);
  border-color: rgba(159,122,234,.35);
  background: rgba(107,70,193,.14);
}

/* 星等评分 */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; }

/* 区块标题 */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 26px;
}
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 26px; font-weight: 700; letter-spacing: 3px;
  background: linear-gradient(90deg, #e9e2ff, #c084fc 55%, #f472b6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-title .ico { -webkit-text-fill-color: initial; display: inline-flex; }
.section-sub { color: var(--text-secondary); font-size: 14px; letter-spacing: 1px; }

/* 滚动浮现 */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.revealed { opacity: 1; transform: none; }

/* ---------------- 顶部导航（星穹导航站） ---------------- */
.stellar-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(16,20,34,.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(159,122,234,.14);
  transition: background .3s, box-shadow .3s;
}
.stellar-nav.scrolled { background: rgba(14,17,30,.92); box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.nav-container {
  max-width: 1280px; height: 100%; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand .logo { width: 34px; height: 34px; display: block; filter: drop-shadow(0 0 8px rgba(159,122,234,.6)); }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: 2px; }
.brand-name em {
  font-style: normal; margin-right: 2px;
  background: var(--grad-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-name .cn { color: #fff; }

.nav-links { display: flex; gap: 6px; margin-left: 8px; }
.nav-links a {
  position: relative;
  padding: 8px 16px; border-radius: 10px;
  font-size: 15.5px; letter-spacing: 2px; color: var(--text-secondary);
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: #fff; background: rgba(159,122,234,.12); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 2px; height: 2px;
  background: var(--grad-main); border-radius: 2px;
  box-shadow: 0 0 8px rgba(213,63,140,.8);
}

.nav-search { position: relative; margin-left: auto; }
.nav-search .search-box {
  display: flex; align-items: center;
  background: rgba(26,32,44,.75);
  border: 1px solid rgba(159,122,234,.22);
  border-radius: 999px; overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.nav-search .search-box:focus-within { border-color: var(--primary-light); box-shadow: var(--glow-purple); }
.nav-search input {
  width: 210px; padding: 9px 6px 9px 18px;
  background: transparent; border: none; outline: none;
  font-size: 13.5px; color: var(--text-primary);
}
.nav-search input::placeholder { color: #718096; }
.nav-search .search-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 36px; margin-right: 2px;
  background: var(--grad-main);
  border-radius: 999px;
  color: #fff;
}
.nav-search .search-btn svg { width: 16px; height: 16px; }
.search-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 320px; max-height: 380px; overflow-y: auto;
  background: rgba(20,25,42,.97);
  border: 1px solid rgba(159,122,234,.3);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: none; z-index: 120;
}
.search-dropdown.show { display: block; }
.search-dropdown .sd-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid rgba(159,122,234,.08);
}
.search-dropdown .sd-item:hover { background: rgba(107,70,193,.18); }
.search-dropdown .sd-item .cover { width: 38px; flex-shrink: 0; border-radius: 5px; }
.search-dropdown .sd-empty { padding: 18px; text-align: center; color: var(--text-secondary); font-size: 13.5px; }

.user-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-chip {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: rgba(107,70,193,.18);
  border: 1px solid rgba(159,122,234,.3);
  cursor: pointer;
  font-size: 14px;
}
.user-chip:hover { box-shadow: var(--glow-purple); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff; font-weight: 700;
  background: var(--grad-main);
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(159,122,234,.4);
}
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 170px; padding: 8px;
  background: rgba(20,25,42,.97);
  border: 1px solid rgba(159,122,234,.3);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.user-menu.show { display: block; }
.user-menu a, .user-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-primary); text-align: left;
}
.user-menu a:hover, .user-menu button:hover { background: rgba(107,70,193,.22); }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- 页脚 ---------------- */
.cosmic-footer {
  margin-top: 70px;
  background: rgba(13,16,28,.85);
  border-top: 1px solid rgba(159,122,234,.12);
  backdrop-filter: blur(12px);
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 46px 24px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.footer-brand h4 { font-size: 19px; letter-spacing: 2px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-secondary); font-size: 14px; max-width: 320px; }
.footer-col h5 { font-size: 15px; letter-spacing: 2px; margin-bottom: 16px; color: #cbd5e0; }
.footer-col a {
  display: block; padding: 5px 0;
  color: var(--text-secondary); font-size: 14px;
  transition: color .2s, transform .2s;
}
.footer-col a:hover { color: var(--primary-light); transform: translateX(4px); }
.footer-bottom {
  border-top: 1px solid rgba(159,122,234,.1);
  text-align: center; padding: 18px;
  color: #718096; font-size: 13px; letter-spacing: 1px;
}

/* ---------------- 书籍封面（程序化生成） ---------------- */
.cover {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--c1, #2d3a66), var(--c2, #44337a));
  box-shadow: 0 10px 26px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.1);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 10px;
  color: #f5f3ff;
}
.cover.light { color: #3b3222; }
.cover::before { /* 书脊 */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px;
  background: rgba(0,0,0,.28);
  box-shadow: 2px 0 6px rgba(0,0,0,.25);
}
.cover .c-orn { position: absolute; inset: 0; opacity: .8; pointer-events: none; }
.cover .c-head { display: flex; justify-content: space-between; font-size: 8.5px; opacity: .75; letter-spacing: 1px; position: relative; }
.cover .c-body { position: relative; text-align: center; padding: 0 4px; }
.cover .c-title { font-size: 17px; font-weight: 800; letter-spacing: 3px; line-height: 1.4; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.cover .c-title.v { writing-mode: vertical-rl; display: inline-block; letter-spacing: 6px; }
.cover .c-author { font-size: 10.5px; margin-top: 7px; opacity: .85; letter-spacing: 2px; }
.cover .c-foot { position: relative; text-align: center; font-size: 8px; opacity: .55; letter-spacing: 2px; }

/* ---------------- 首页 Hero ---------------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 60px) 0 120px;
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 30px;
  position: relative; z-index: 2;
}
.hero-title {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 900; letter-spacing: 6px; line-height: 1.25;
  text-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.hero-title .grad {
  background: linear-gradient(90deg, #b794f4, #d53f8c);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 18px 0 34px; color: var(--text-secondary); font-size: 17px; letter-spacing: 3px; }

/* 行星与光轨 */
.hero-scene { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-planet {
  position: absolute; left: 50%; top: 46%;
  width: 560px; height: 560px; transform: translate(-58%, -34%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #9d8ade 0%, #6b46c1 32%, #3c2f6e 62%, #1d1834 92%);
  box-shadow: inset -50px -70px 130px rgba(0,0,0,.6), 0 0 140px rgba(159,122,234,.28);
  opacity: .9;
}
.hero-planet::after { /* 环带 */
  content: ""; position: absolute; left: -18%; top: 46%;
  width: 136%; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(237,220,255,.16);
  border-top-color: rgba(237,220,255,.34);
  transform: rotate(-14deg);
}
.hero-trail { position: absolute; left: 50%; top: 47%; transform: translate(-56%, -50%); }
.hero-trail .comet {
  offset-path: path("M -420 40 A 470 150 0 1 0 470 40");
  animation: cometRun 9s linear infinite;
}
.hero-trail .comet::before {
  content: ""; display: block; width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 14px 4px rgba(255,255,255,.9), 0 0 34px 14px rgba(213,63,140,.55);
}
@keyframes cometRun { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* 主视觉书籍轮播 */
.hero-books { position: relative; height: 330px; perspective: 900px; }
.hero-book {
  position: absolute; top: 50%; left: 50%;
  width: 158px;
  border-radius: 14px;
  transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .8s, filter .8s;
  cursor: pointer;
  transform-style: preserve-3d;
}
.hero-book .cover { box-shadow: 0 20px 44px rgba(0,0,0,.55), 0 0 30px rgba(159,122,234,.18); }
.hero-book:hover { filter: brightness(1.12); }
.hero-book.pos-0 { transform: translate(-50%, -50%) translateX(-150px) translateZ(60px) scale(1.04); z-index: 3; }
.hero-book.pos-1 { transform: translate(-50%, -50%) translateZ(0) scale(.92); z-index: 2; opacity: .92; }
.hero-book.pos-2 { transform: translate(-50%, -50%) translateX(150px) translateZ(60px) scale(1.04); z-index: 3; }
.hero-book.pos-side { transform: translate(-50%, -50%) scale(.8); opacity: 0; z-index: 1; pointer-events: none; }
.hero-book.float { animation: floaty 5.2s ease-in-out infinite; }
@keyframes floaty { 0%,100% { margin-top: 0; } 50% { margin-top: -12px; } }

/* ---------------- 悬浮车窗模块 ---------------- */
.window-panes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  margin-top: -64px;
  position: relative; z-index: 5;
}
.window-pane {
  position: relative; overflow: hidden;
  padding: 38px 26px 32px;
  text-align: center;
  cursor: pointer;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s;
}
.window-pane::before { /* 鼠标跟随光效 */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(159,122,234,.22), transparent 65%);
  opacity: 0; transition: opacity .3s;
}
.window-pane:hover::before { opacity: 1; }
.window-pane:hover { transform: translateY(-8px); border-color: rgba(159,122,234,.42); box-shadow: var(--shadow-lg), var(--glow-purple); }
.pane-icon {
  width: 62px; height: 62px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--grad-main);
  box-shadow: 0 8px 24px rgba(213,63,140,.45);
  color: #fff;
}
.pane-icon svg { width: 26px; height: 26px; }
.window-pane h3 { font-size: 19px; letter-spacing: 3px; margin-bottom: 10px; }
.window-pane p { color: var(--text-secondary); font-size: 13.5px; letter-spacing: 1px; }

/* ---------------- 星轨书单 ---------------- */
.book-track-section { padding: 86px 0 30px; }
.track-tabs { display: flex; gap: 12px; flex-wrap: wrap; }
.book-scroll-wrap { position: relative; }
.book-scroll {
  display: flex; gap: 22px;
  overflow-x: auto; padding: 18px 4px 26px;
  scroll-behavior: auto;
  scrollbar-width: none;
}
.book-scroll::-webkit-scrollbar { display: none; }
.star-book {
  flex: 0 0 176px;
  position: relative;
  transition: transform .35s ease;
  transform: translateZ(0);
  will-change: transform;
}
.star-book:hover { transform: translateY(-10px); }
.star-book .cover { transition: box-shadow .35s; }
.star-book:hover .cover { box-shadow: 0 16px 36px rgba(0,0,0,.55), var(--glow-purple); }
.star-book .b-title { margin-top: 12px; font-size: 15px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star-book .b-author { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }
.star-book .b-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.star-book .b-meta .score { font-size: 13px; color: var(--gold); font-weight: 700; }
/* 悬浮简短书评 */
.star-book .b-peek {
  position: absolute; left: 0; right: 0; top: 0; height: calc(100% - 88px);
  display: flex; align-items: flex-end;
  padding: 12px;
  border-radius: 9px;
  background: linear-gradient(180deg, transparent 20%, rgba(10,12,24,.94) 55%);
  color: #e9d8ff; font-size: 12px; line-height: 1.6;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
  z-index: 2;
}
.star-book:hover .b-peek { opacity: 1; }

/* ---------------- 思想星云 ---------------- */
.nebula-section { padding: 66px 0 30px; }
.nebula-panel { position: relative; height: 400px; overflow: hidden; }
.nebula-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.nebula-topic {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(24,28,46,.88);
  border: 1px solid rgba(159,122,234,.35);
  cursor: pointer;
  text-align: center;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  z-index: 3;
}
.nebula-topic:hover { transform: translate(-50%, -50%) scale(1.08); box-shadow: var(--glow-purple); border-color: var(--primary-light); z-index: 5; }
.nebula-topic .t { font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.nebula-topic .m { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; }
.nebula-topic.hot { border-color: rgba(213,63,140,.6); box-shadow: 0 0 24px rgba(213,63,140,.25); }

/* ---------------- 页面通用头部 ---------------- */
.page-hero { padding: calc(var(--nav-h) + 54px) 0 30px; text-align: center; }
.page-hero h1 {
  font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; letter-spacing: 8px;
  background: linear-gradient(90deg, #e9d8ff, #c084fc 50%, #f472b6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-hero p { margin-top: 10px; color: var(--text-secondary); letter-spacing: 3px; font-size: 14.5px; }

/* ---------------- 星穹书库 ---------------- */
.library-tools { padding: 6px 0 26px; }
.tools-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 18px 20px;
}
.tools-bar .chips { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.mini-search {
  display: flex; align-items: center;
  background: rgba(26,32,44,.7); border: 1px solid rgba(159,122,234,.25);
  border-radius: 999px; overflow: hidden;
}
.mini-search input { width: 190px; padding: 8px 14px; background: transparent; border: none; outline: none; font-size: 13.5px; }
.mini-search button { width: 36px; height: 32px; background: var(--grad-main); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 999px; margin-right: 2px; }
.mini-search button svg { width: 14px; height: 14px; }

.library-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 24px;
  padding-bottom: 30px;
}
.book-card {
  display: flex; gap: 16px; padding: 18px;
  transition: transform .35s, box-shadow .35s, border-color .35s;
}
.book-card:hover { transform: translateY(-6px); border-color: rgba(159,122,234,.42); box-shadow: var(--shadow-lg), var(--glow-purple); }
.book-card .cover { width: 108px; flex-shrink: 0; }
.book-card .bc-body { min-width: 0; display: flex; flex-direction: column; }
.book-card h3 { font-size: 16.5px; letter-spacing: 1px; }
.book-card .bc-author { font-size: 12.5px; color: var(--text-secondary); margin: 4px 0 8px; }
.book-card .bc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.book-card .bc-desc {
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.book-card .bc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.book-card .bc-foot .score { font-size: 13.5px; color: var(--gold); font-weight: 700; }
.book-card .bc-foot .go { font-size: 13px; color: var(--primary-light); letter-spacing: 1px; transition: transform .25s; }
.book-card .bc-foot .go:hover { transform: translateX(4px); }
.library-empty { text-align: center; padding: 60px 0; color: var(--text-secondary); letter-spacing: 2px; }

/* ---------------- 书籍详情页 ---------------- */
.detail-layout {
  display: grid; grid-template-columns: 250px minmax(0,1fr) 300px;
  gap: 24px; align-items: start;
  padding: calc(var(--nav-h) + 34px) 0 40px;
}
/* 左：书架 */
.bookshelf { position: sticky; top: calc(var(--nav-h) + 16px); padding: 22px 18px; }
.bookshelf .cover { width: 100%; }
.orbit-progress { margin-top: 16px; }
.orbit-progress .op-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 1px; }
.orbit-track { height: 7px; border-radius: 6px; background: rgba(159,122,234,.15); position: relative; overflow: visible; }
.orbit-fill { height: 100%; border-radius: 6px; background: var(--grad-main); box-shadow: 0 0 10px rgba(213,63,140,.7); transition: width .4s; position: relative; }
.orbit-fill::after { content: ""; position: absolute; right: -3px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #d53f8c; }
.chapter-list h4 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; letter-spacing: 2px; margin: 20px 0 12px; color: #cbd5e0; }
.chapter-list li button {
  display: block; width: 100%; text-align: left;
  padding: 9px 13px; border-radius: 9px;
  font-size: 13.5px; color: var(--text-secondary);
  border-left: 2px solid transparent;
  transition: all .25s;
}
.chapter-list li button:hover { color: #fff; background: rgba(107,70,193,.16); }
.chapter-list li button.current {
  color: #fff;
  background: linear-gradient(90deg, rgba(107,70,193,.5), rgba(107,70,193,.12));
  border-left-color: var(--accent-color);
}
.shelf-actions { margin-top: 18px; display: grid; gap: 10px; }

/* 中：车窗阅读区 */
.reading-window { position: relative; padding: 30px 34px 96px; }
.reading-window::before { /* 车窗框 */
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(159,122,234,.2);
  border-radius: 14px;
  pointer-events: none;
}
.reading-nebula { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; z-index: -1; opacity: .5;
  background:
    radial-gradient(420px 220px at 85% 12%, rgba(213,63,140,.16), transparent 60%),
    radial-gradient(520px 300px at 12% 80%, rgba(76,81,191,.22), transparent 60%);
}
.reading-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.reading-head h1 { font-size: 27px; letter-spacing: 3px; }
.reading-head .rh-author { color: var(--text-secondary); font-size: 14px; margin-top: 6px; letter-spacing: 2px; }
.reading-ctrl { display: flex; gap: 8px; }
.reading-ctrl button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(159,122,234,.3);
  background: rgba(26,32,44,.6);
  color: var(--text-primary); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.reading-ctrl button:hover { border-color: var(--primary-light); box-shadow: var(--glow-purple); }
.reading-body { margin-top: 26px; font-size: var(--reading-fs, 16px); line-height: 2; }
.reading-body h2 {
  font-size: 20px; letter-spacing: 2px; margin: 6px 0 18px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(159,122,234,.18);
}
.reading-body p { margin-bottom: 16px; color: #d6dcea; text-align: justify; }
.reading-window.theme-warm { background: linear-gradient(165deg, rgba(243,229,196,.97), rgba(233,214,175,.95)); }
.reading-window.theme-warm::before { border-color: rgba(120,90,40,.3); }
.reading-window.theme-warm .reading-head h1,
.reading-window.theme-warm .reading-body h2 { color: #3a2d1a; }
.reading-window.theme-warm .reading-body p { color: #4a3b28; }
.reading-window.theme-warm .reading-ctrl button { background: rgba(255,250,240,.85); color: #5a4630; border-color: rgba(120,90,40,.35); }
.reading-nav { display: flex; justify-content: space-between; margin-top: 26px; }
.reading-nav button {
  padding: 9px 22px; border-radius: 999px; font-size: 13.5px; letter-spacing: 2px;
  border: 1px solid rgba(159,122,234,.35); color: var(--primary-light);
  transition: all .25s;
}
.reading-nav button:hover:not(:disabled) { background: rgba(107,70,193,.2); }
.reading-nav button:disabled { opacity: .35; cursor: not-allowed; }
.reading-window.theme-warm .reading-nav button { color: #7a5a20; border-color: rgba(120,90,40,.4); }
/* 底部浮动工具栏 */
.float-toolbar {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(16,20,34,.85);
  border: 1px solid rgba(159,122,234,.3);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}
.float-toolbar button {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: #e2e8f0;
  transition: all .25s;
}
.float-toolbar button:hover, .float-toolbar button.on { background: var(--grad-main); box-shadow: 0 0 16px rgba(213,63,140,.5); }
.float-toolbar svg { width: 18px; height: 18px; }
.toolbar-tip {
  position: absolute; bottom: 76px; left: 50%; transform: translateX(-50%);
  padding: 8px 18px; border-radius: 10px; font-size: 13px; white-space: nowrap;
  background: rgba(16,20,34,.95); border: 1px solid rgba(159,122,234,.35);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.toolbar-tip.show { opacity: 1; }

/* 右：星轨评论流 */
.comments-panel { position: sticky; top: calc(var(--nav-h) + 16px); padding: 20px 16px; }
.comments-panel h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; letter-spacing: 2px; margin-bottom: 16px; }
.comment-list { max-height: 430px; overflow-y: auto; padding-right: 4px; display: grid; gap: 12px; }
.comment-item {
  padding: 13px 14px; border-radius: 12px;
  background: rgba(26,32,44,.55);
  border: 1px solid rgba(159,122,234,.14);
}
.comment-item.meteor-in { animation: meteorIn .9s ease; }
@keyframes meteorIn {
  0% { opacity: 0; transform: translateX(46px); }
  60% { opacity: 1; transform: translateX(-4px); }
  100% { transform: none; }
}
.comment-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.comment-top .avatar { width: 30px; height: 30px; font-size: 13px; }
.comment-top .c-name { font-size: 13.5px; font-weight: 600; }
.comment-top .c-time { margin-left: auto; font-size: 11.5px; color: #718096; }
.comment-item p { font-size: 13px; color: #cbd5e0; line-height: 1.7; }
.comment-ops { display: flex; gap: 16px; margin-top: 9px; }
.comment-ops button { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #718096; transition: color .2s; }
.comment-ops button:hover { color: var(--primary-light); }
.comment-ops button.liked { color: var(--accent-color); }
.comment-ops svg { width: 13px; height: 13px; }
.comment-form { margin-top: 16px; }
.comment-form textarea {
  width: 100%; min-height: 74px; resize: vertical;
  padding: 11px 13px; border-radius: 11px;
  background: rgba(26,32,44,.7);
  border: 1px solid rgba(159,122,234,.25);
  outline: none; font-size: 13px; line-height: 1.6;
}
.comment-form textarea:focus { border-color: var(--primary-light); }
.comment-form .btn { margin-top: 10px; padding: 8px 20px; font-size: 13.5px; }
.related h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; letter-spacing: 2px; margin: 22px 0 14px; }
.related-map { position: relative; padding-left: 18px; display: grid; gap: 14px; }
.related-map::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 12px; width: 1px; background: linear-gradient(180deg, rgba(159,122,234,.6), rgba(213,63,140,.5)); }
.related-item { display: flex; gap: 12px; align-items: center; padding: 9px; border-radius: 12px; transition: background .25s; position: relative; }
.related-item::before { content: ""; position: absolute; left: -17px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--primary-light); box-shadow: 0 0 8px var(--primary-light); }
.related-item:hover { background: rgba(107,70,193,.15); }
.related-item .cover { width: 46px; }
.related-item .r-t { font-size: 13.5px; font-weight: 600; }
.related-item .r-a { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }

/* ---------------- 书评页 ---------------- */
.compass { padding: 22px; margin-bottom: 34px; }
.compass-modes { display: flex; gap: 12px; flex-wrap: wrap; }
.compass-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.compass-search { margin-top: 16px; }
.reviews-layout {
  display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 26px;
  align-items: start; padding-bottom: 30px;
}
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.review-card { position: relative; overflow: hidden; padding: 24px; display: flex; flex-direction: column; gap: 14px; transition: transform .35s, box-shadow .35s; }
.review-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-main); }
.review-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg), var(--glow-purple); }
.rc-head { display: flex; gap: 16px; }
.rc-head .cover { width: 86px; flex-shrink: 0; }
.rc-head h3 { font-size: 18px; letter-spacing: 1px; }
.rc-head .rc-author { color: var(--text-secondary); font-size: 13px; margin: 4px 0 8px; }
.rc-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.rc-title { font-size: 15.5px; font-weight: 700; color: #e9d8ff; cursor: pointer; transition: color .2s; }
.rc-title:hover { color: var(--primary-light); }
.rc-excerpt { font-size: 13.5px; color: var(--text-secondary); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rc-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(159,122,234,.12); }
.rc-foot .avatar { width: 28px; height: 28px; font-size: 12px; }
.rc-foot .rucer { font-size: 13px; }
.rc-foot .r-time { font-size: 12px; color: #718096; }
.rc-acts { margin-left: auto; display: flex; gap: 14px; }
.rc-acts button { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: #718096; transition: color .2s, transform .2s; }
.rc-acts button:hover { color: var(--primary-light); }
.rc-acts button.liked { color: var(--accent-color); }
.rc-acts button.liked svg { animation: heartPop .45s ease; }
@keyframes heartPop { 40% { transform: scale(1.5); } }
.rc-acts svg { width: 14px; height: 14px; }

/* 最新信号列表 */
.signal-list { display: grid; gap: 20px; }
.signal-card { display: flex; gap: 18px; padding: 20px; transition: transform .3s, box-shadow .3s; }
.signal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.signal-card .cover { width: 92px; flex-shrink: 0; }
.signal-card h3 { font-size: 17px; }
/* 瀑布流书评长廊 */
.masonry { columns: 2 320px; column-gap: 22px; }
.masonry .review-card, .masonry .signal-card { break-inside: avoid; margin-bottom: 22px; }
/* 车窗投影标题 */
.window-title {
  position: relative; margin-bottom: 12px; padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(107,70,193,.35), rgba(213,63,140,.22));
  border: 1px solid rgba(159,122,234,.3);
  box-shadow: inset 0 0 24px rgba(159,122,234,.12);
}
.window-title h4 { font-size: 15.5px; letter-spacing: 1px; }

/* 侧栏：本周超新星 / 热门星域 */
.side-panel { padding: 20px; margin-bottom: 24px; }
.side-panel h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; letter-spacing: 2px; margin-bottom: 18px; }
.supernova-item { display: flex; align-items: center; gap: 13px; padding: 10px 6px; border-radius: 12px; transition: background .25s; }
.supernova-item:hover { background: rgba(107,70,193,.14); }
.rank-badge {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; color: #1a202c;
  background: linear-gradient(135deg, #f6e05e, #ed8936);
}
.rank-badge.r2 { background: linear-gradient(135deg, #e2e8f0, #a0aec0); }
.rank-badge.r3 { background: linear-gradient(135deg, #f6ad55, #c05621); color: #fff; }
.rank-badge.rx { background: rgba(159,122,234,.2); color: var(--primary-light); }
.supernova-item .avatar { width: 36px; height: 36px; font-size: 15px; }
.supernova-item .s-name { font-size: 14px; font-weight: 600; }
.supernova-item .s-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------------- 社区页 ---------------- */
/* 断裂轨道式标签 */
.rail-tabs {
  display: flex; justify-content: center; gap: 54px;
  position: relative; padding: 26px 0 8px; margin-bottom: 34px;
}
.rail-tabs::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 34px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(159,122,234,.55) 18%, rgba(213,63,140,.45) 55%, transparent 96%);
  mask-image: linear-gradient(90deg, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
}
.rail-tab {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 14px;
  color: var(--text-secondary); font-size: 15px; letter-spacing: 2px;
  transition: all .3s;
}
.rail-tab svg { width: 24px; height: 24px; }
.rail-tab:hover { color: #fff; background: rgba(107,70,193,.16); }
.rail-tab.active {
  color: #fff;
  background: linear-gradient(160deg, rgba(107,70,193,.4), rgba(107,70,193,.1));
  border: 1px solid rgba(159,122,234,.4);
  box-shadow: 0 0 24px rgba(107,70,193,.35);
}
.community-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.community-head h2 { font-size: 24px; letter-spacing: 3px; }
.topic-list { display: grid; gap: 18px; padding-bottom: 26px; }
.topic-card { padding: 22px 24px; transition: transform .3s, box-shadow .3s, border-color .3s; }
.topic-card:hover { transform: translateY(-4px); border-color: rgba(159,122,234,.4); box-shadow: var(--shadow-lg); }
.topic-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topic-top h3 { font-size: 17.5px; letter-spacing: 1px; cursor: pointer; transition: color .2s; }
.topic-top h3:hover { color: var(--primary-light); }
.topic-card .t-excerpt { color: var(--text-secondary); font-size: 13.5px; margin-top: 10px; line-height: 1.75; }
.topic-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12.5px; color: #718096; }
.topic-foot .avatar { width: 26px; height: 26px; font-size: 12px; }
.topic-stats { margin-left: auto; display: flex; gap: 18px; }
.topic-stats span { display: inline-flex; align-items: center; gap: 5px; }
.topic-stats svg { width: 13px; height: 13px; }

/* 活动星图 */
.galaxy-wrap { position: relative; padding: 10px 0 0; }
.galaxy-map { width: 100%; height: 360px; display: block; }
.galaxy-star { cursor: pointer; }
.galaxy-star .core { fill: #cbd5e0; transition: fill .3s, filter .3s; filter: drop-shadow(0 0 4px rgba(203,213,224,.8)); }
.galaxy-star:hover .core, .galaxy-star.lit .core { fill: #f687b3; filter: drop-shadow(0 0 10px rgba(246,135,179,1)) brightness(1.2); }
.galaxy-star.lit .halo { animation: haloPulse 2.2s ease-in-out infinite; }
@keyframes haloPulse { 0%,100% { opacity: .35; } 50% { opacity: .9; } }
.galaxy-star text { fill: var(--text-secondary); font-size: 12px; letter-spacing: 1px; pointer-events: none; }
.galaxy-star:hover text, .galaxy-star.lit text { fill: #f8c6dd; }
.event-detail { margin-top: 18px; padding: 22px; }
.event-detail h3 { font-size: 18px; letter-spacing: 1px; }
.event-detail .e-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0; color: var(--text-secondary); font-size: 13px; }
.event-detail p { color: #cbd5e0; font-size: 13.5px; line-height: 1.8; }
.event-detail .e-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.event-detail .joined-count { font-size: 13px; color: var(--primary-light); }

/* ---------------- 登录/注册（星门） ---------------- */
.gate-page main {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: calc(var(--nav-h) + 30px) 16px 50px;
  position: relative;
}
.gate-glow { /* 星门能量汇聚 */
  position: absolute; left: 50%; top: 50%;
  width: 640px; height: 640px; transform: translate(-50%, -52%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159,122,234,.16) 0%, rgba(213,63,140,.08) 42%, transparent 68%);
  animation: gateBreath 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gateBreath { 0%,100% { transform: translate(-50%,-52%) scale(1); opacity: .8; } 50% { transform: translate(-50%,-52%) scale(1.12); opacity: 1; } }
.gate-panel {
  position: relative;
  width: min(430px, 94vw);
  padding: 42px 38px 34px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(159,122,234,.5) 0%, rgba(107,70,193,.42) 45%, rgba(213,63,140,.44) 100%);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 24px 70px rgba(5,8,20,.55), inset 0 1px 0 rgba(255,255,255,.28), 0 0 60px rgba(159,122,234,.25);
}
.gate-panel.switch-out { animation: panelOut .45s ease forwards; }
.gate-panel.switch-in { animation: panelIn .5s ease; }
@keyframes panelOut { to { opacity: 0; transform: translateX(-40px) scale(.96); } }
@keyframes panelIn { from { opacity: 0; transform: translateX(40px) scale(.96); } }
.gate-panel.dissolve { animation: dissolve 1.2s ease forwards; pointer-events: none; }
@keyframes dissolve {
  30% { transform: scale(1.03); opacity: 1; filter: brightness(1.4); }
  100% { transform: scale(.6); opacity: 0; filter: brightness(2.4) blur(6px); }
}
.gate-title { text-align: center; font-size: 25px; font-weight: 800; letter-spacing: 4px; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.gate-sub { text-align: center; color: rgba(255,255,255,.75); font-size: 12.5px; margin: 8px 0 26px; letter-spacing: 1px; }
.gate-field { position: relative; margin-bottom: 16px; }
.gate-field .f-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.65); display: flex; }
.gate-field .f-ico svg { width: 16px; height: 16px; }
.gate-field input {
  width: 100%; padding: 12px 16px 12px 42px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(26,20,44,.35);
  color: #fff; font-size: 14px; letter-spacing: 1px;
  outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
}
.gate-field input::placeholder { color: rgba(255,255,255,.55); letter-spacing: 2px; }
.gate-field input:focus { border-color: rgba(255,255,255,.65); box-shadow: 0 0 18px rgba(255,255,255,.22); background: rgba(26,20,44,.5); }
.field-error { color: #ffe0ee; background: rgba(213,63,140,.3); border: 1px solid rgba(255,180,210,.4); font-size: 12px; border-radius: 8px; padding: 6px 11px; margin-top: 7px; display: none; }
.field-error.show { display: block; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.gate-aux { display: flex; justify-content: flex-end; margin: -4px 0 16px; }
.blink-link { font-size: 13px; color: #ffe8f4; animation: starBlink 2.4s ease-in-out infinite; }
@keyframes starBlink { 0%,100% { opacity: .55; text-shadow: none; } 50% { opacity: 1; text-shadow: 0 0 12px rgba(255,255,255,.9); } }
.gate-divider { display: flex; align-items: center; gap: 14px; color: rgba(255,255,255,.6); font-size: 12.5px; margin: 20px 0 14px; }
.gate-divider::before, .gate-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.25); }
.social-planets { display: flex; justify-content: center; gap: 20px; }
.social-planets .planet {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 15px; font-weight: 700;
  transition: transform .25s, box-shadow .25s;
}
.social-planets .planet::after { /* 星环 */
  content: ""; position: absolute; left: -16%; right: -16%; top: 42%; height: 8px;
  border: 1.5px solid rgba(255,255,255,.45); border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}
.social-planets .planet:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 0 20px rgba(255,255,255,.35); }
.gate-switch { text-align: center; margin-top: 24px; font-size: 13.5px; color: rgba(255,255,255,.8); }
.gate-switch a { color: #ffd6ec; font-weight: 700; }
.gate-switch a:hover { text-decoration: underline; }

/* 初始星域选择（星座图） */
.constellation-picker { margin: 6px 0 4px; }
.constellation-picker .cp-label { font-size: 14px; font-weight: 700; letter-spacing: 2px; margin: 18px 0 12px; }
.cp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cp-node {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 6px; border-radius: 13px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  font-size: 12.5px; letter-spacing: 1px; color: rgba(255,255,255,.85);
  cursor: pointer;
  transition: all .3s;
}
.cp-node svg { width: 21px; height: 21px; }
.cp-node::before { /* 星座连线装饰 */
  content: ""; position: absolute; top: 8px; right: 10px;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  box-shadow: -9px 7px 0 -1.5px rgba(255,255,255,.35);
}
.cp-node:hover { border-color: rgba(255,255,255,.6); transform: translateY(-2px); }
.cp-node.lit {
  background: linear-gradient(150deg, rgba(255,255,255,.3), rgba(255,255,255,.12));
  border-color: #fff;
  box-shadow: 0 0 20px rgba(255,255,255,.4);
  color: #fff;
}
.cp-node.lit::after {
  content: "✦"; position: absolute; top: -7px; right: -4px;
  color: #ffe479; font-size: 15px; text-shadow: 0 0 8px #ffe479;
}
/* 星徽上传 */
.star-badge-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 6px; }
.badge-ring {
  position: relative;
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: all .3s;
  background: rgba(255,255,255,.07);
}
.badge-ring:hover { border-color: #fff; box-shadow: 0 0 22px rgba(255,255,255,.4); }
.badge-ring .preview { width: 100%; height: 100%; object-fit: cover; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.badge-ring .plus { text-align: center; color: rgba(255,255,255,.8); font-size: 11px; letter-spacing: 1px; }
.badge-ring .plus svg { width: 26px; height: 26px; margin: 0 auto 4px; display: block; }
.gate-check { display: flex; align-items: center; gap: 9px; margin: 16px 0 18px; font-size: 13px; color: rgba(255,255,255,.85); }
.gate-check input { width: 16px; height: 16px; accent-color: #d53f8c; }
.gate-check a { color: #ffe479; }
.gate-success {
  text-align: center; font-size: 14.5px; letter-spacing: 2px;
  color: #fff; margin-top: 16px; min-height: 22px;
  text-shadow: 0 0 14px rgba(255,255,255,.7);
}

/* ---------------- 个人页（我的星轨） ---------------- */
.profile-head { position: relative; overflow: hidden; padding: 34px 36px; margin-top: calc(var(--nav-h) + 30px); }
.profile-constellation { position: absolute; inset: 0; opacity: .9; pointer-events: none; }
.profile-main { position: relative; display: flex; gap: 28px; align-items: flex-start; }
.profile-avatar-ring {
  width: 108px; height: 108px; border-radius: 50%; padding: 4px; flex-shrink: 0;
  background: conic-gradient(from 20deg, #ecc94b, #d53f8c, #9f7aea, #ecc94b);
  box-shadow: 0 0 30px rgba(236,201,75,.3);
}
.profile-avatar-ring .avatar { width: 100%; height: 100%; font-size: 40px; }
.profile-avatar-ring .avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-name { font-size: 26px; font-weight: 800; letter-spacing: 3px; }
.p-bio { color: var(--text-secondary); font-size: 14px; margin-top: 8px; letter-spacing: 1px; }
.p-stats { display: flex; gap: 34px; margin-top: 18px; }
.p-stats b { font-size: 24px; color: var(--primary-light); font-weight: 800; }
.p-stats span { display: block; font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.p-badges { position: relative; display: flex; flex-direction: column; gap: 12px; margin-left: auto; }
.p-badge {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(26,32,44,.75);
  border: 1px solid rgba(159,122,234,.3);
  font-size: 14px; letter-spacing: 2px;
  transition: transform .25s, box-shadow .25s;
}
.p-badge:hover { transform: translateX(-6px); box-shadow: var(--glow-purple); }
.p-badge .b-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--grad-main); display: flex; align-items: center; justify-content: center; color: #fff; }
.p-badge .b-ico svg { width: 14px; height: 14px; }

.profile-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 26px; }
.chart-card { padding: 22px 24px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chart-head h3 { display: flex; align-items: center; gap: 9px; font-size: 17px; letter-spacing: 2px; }
.chart-head select {
  padding: 6px 12px; border-radius: 9px; font-size: 13px;
  background: rgba(26,32,44,.8); border: 1px solid rgba(159,122,234,.3); color: var(--text-primary); outline: none;
}
#lineChart { width: 100%; height: 240px; display: block; }
.word-cloud { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: center; height: 240px; padding: 10px; overflow: hidden; }
.word-cloud span { font-weight: 700; letter-spacing: 2px; cursor: default; transition: transform .25s, text-shadow .25s; }
.word-cloud span:hover { transform: scale(1.16); text-shadow: 0 0 18px rgba(159,122,234,.9); }

/* 抽屉式内容管理 */
.manage-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 0; margin-top: 26px; overflow: hidden; }
.manage-drawer { padding: 22px 0; background: rgba(16,20,34,.5); border-right: 1px solid rgba(159,122,234,.12); }
.manage-drawer button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 14px 24px; font-size: 14.5px; letter-spacing: 2px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all .25s;
}
.manage-drawer button svg { width: 16px; height: 16px; }
.manage-drawer button:hover { color: #fff; }
.manage-drawer button.active {
  color: #d6bcfa;
  background: linear-gradient(90deg, rgba(107,70,193,.4), transparent);
  border-left-color: var(--accent-color);
}
.manage-content { padding: 24px 26px; min-height: 420px; }
.manage-content .mc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.manage-content .mc-head h3 { font-size: 18px; letter-spacing: 2px; }
.manage-content .mc-head .count { font-size: 13px; color: var(--text-secondary); }
.my-review-item { padding: 17px 19px; border-radius: 14px; background: rgba(26,32,44,.5); border: 1px solid rgba(159,122,234,.12); margin-bottom: 15px; transition: border-color .25s; }
.my-review-item:hover { border-color: rgba(159,122,234,.35); }
.mr-top { display: flex; justify-content: space-between; gap: 12px; }
.mr-top h4 { font-size: 15.5px; }
.mr-top .stars svg { width: 13px; height: 13px; }
.mr-book { font-size: 12.5px; color: var(--text-secondary); margin: 4px 0 9px; }
.mr-text { font-size: 13.5px; color: #cbd5e0; line-height: 1.75; }
.mr-foot { display: flex; align-items: center; margin-top: 11px; font-size: 12px; color: #718096; }
.mr-foot .mr-stats { margin-left: auto; display: flex; gap: 16px; }
.mr-foot span { display: inline-flex; align-items: center; gap: 5px; }
.mr-foot svg { width: 12.5px; height: 12.5px; }

.collection-card { padding: 20px 22px; border-radius: 14px; background: rgba(26,32,44,.5); border: 1px solid rgba(159,122,234,.12); margin-bottom: 18px; transition: border-color .25s, transform .25s; }
.collection-card:hover { border-color: rgba(159,122,234,.4); transform: translateY(-3px); }
.cc-head { display: flex; justify-content: space-between; align-items: center; }
.cc-head h4 { font-size: 16px; letter-spacing: 1px; }
.cc-head .cc-count { font-size: 12.5px; color: var(--text-secondary); }
.cc-covers { display: flex; gap: 10px; margin: 15px 0; }
.cc-covers .cover { width: 64px; transition: transform .3s; }
.cc-covers .cover:hover { transform: translateY(-6px) rotate(-2deg); }
.cc-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #718096; }

/* ---------------- 弹层 / 提示 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,10,20,.72);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-mask.show { display: flex; animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box {
  width: min(680px, 94vw); max-height: 84vh; overflow-y: auto;
  padding: 34px 36px;
  animation: modalUp .4s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes modalUp { from { opacity: 0; transform: translateY(40px) scale(.96); } }
.modal-close { position: sticky; top: 0; float: right; width: 34px; height: 34px; border-radius: 50%; background: rgba(159,122,234,.15); color: var(--text-primary); font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .25s; }
.modal-close:hover { background: var(--grad-main); }
.toast-wrap { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 10px; justify-items: center; }
.toast {
  padding: 12px 26px; border-radius: 999px;
  background: rgba(20,25,42,.95);
  border: 1px solid rgba(159,122,234,.45);
  box-shadow: var(--shadow-lg), var(--glow-purple);
  font-size: 14px; letter-spacing: 1.5px;
  animation: toastIn .4s cubic-bezier(.2,.9,.3,1.3);
}
.toast.out { animation: toastOut .4s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-18px) scale(.92); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) scale(.94); } }

/* ---------------- 响应式（论文 5.4） ---------------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-books { display: none; }
  .hero-scene .hero-planet { left: 70%; opacity: .5; }
  .window-panes { grid-template-columns: 1fr; gap: 20px; margin-top: 30px; }
  .detail-layout { grid-template-columns: 240px minmax(0,1fr); }
  .detail-layout .comments-panel { grid-column: 1 / -1; position: static; }
  .reviews-layout { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .profile-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-container { gap: 12px; padding: 0 14px; }
  .nav-links, .nav-search, .user-actions .btn { display: none; }
  .user-actions { margin-left: auto; }
  .user-actions .user-chip { display: flex; }
  .hamburger { display: flex; margin-left: 4px; }
  .nav-links.open {
    display: grid; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    padding: 14px 20px 20px;
    background: rgba(14,17,30,.98);
    border-bottom: 1px solid rgba(159,122,234,.2);
    backdrop-filter: blur(20px);
  }
  .detail-layout { grid-template-columns: 1fr; }
  .bookshelf { position: static; }
  .reading-window { padding: 24px 18px 92px; }
  .manage-layout { grid-template-columns: 1fr; }
  .manage-drawer { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid rgba(159,122,234,.12); padding: 0; }
  .manage-drawer button { width: auto; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 14px 18px; }
  .manage-drawer button.active { border-bottom-color: var(--accent-color); background: none; }
  .profile-main { flex-direction: column; }
  .p-badges { margin-left: 0; flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; padding: 36px 20px 22px; }
  .rail-tabs { gap: 10px; }
  .rail-tab { padding: 12px 16px; font-size: 13.5px; }
  .cp-grid { grid-template-columns: repeat(2, 1fr); }
  .book-card { flex-direction: column; }
  .book-card .cover { width: 100%; max-width: 190px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .p-stats { gap: 22px; }
}

/* 高对比度模式（论文 5.6 可访问性） */
@media (prefers-contrast: high) {
  :root { --text-primary: #ffffff; --text-secondary: #cccccc; }
  .glass, .stellar-nav { background: rgba(10,12,22,.95); }
}
/* 减弱动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
  html { scroll-behavior: auto; }
}
