/* ============================================================
   导航内嵌样式（仅导航）—— 供红岩等独立页面引用
   不复用全站 style.css，避免与页面内部 .stat/.sub/.tag 等类冲突
   ============================================================ */
:root {
  --red: #C8102E;
  --ink: #1D1D1F;
  --gray-2: #6E6E73;
  --gray-3: #86868B;
  --gray-nav: #424245;
  --surface: #F5F5F7;
  --hairline: #D2D2D7;
  --white: #FFFFFF;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body { padding-top: 48px; }   /* 让位固定导航 */

/* ---------- 按钮基础重置（与 style.css 第 39 行保持一致）----------
   缺失此段时，本文件的 <button> 会保留浏览器默认的 2px outset 边框，
   渲染成一圈「半灰半白」的立体描边（AI 悬浮球、导航登录按钮、胶囊按钮等
   都会受影响），而引用 style.css 的 45 个页面因有该重置故表现正常。
   各组件若有自己的 border/background 会在此之后覆盖，不受影响。 */
button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ---------- 链接基础重置（与全站 style.css 第 40 行保持一致）----------
   缺失此段时，浏览器会给 <a> 默认 underline + 蓝色，
   红文页的 footer 链接会渲染成原始的"蓝下划线"，与全站不一致。
   由于本文件旧版 .footer-col a 的 specificity (0,1,1) 在 4 个红文页
   裸 a{} 内联规则的 specificity (0,0,1) 配合 position 优先级
   可能反被覆盖，故加 body 提升特异性到 (0,1,2)，并加显式
   font-size / text-decoration 兜底，确保 footer 一定与全站一致。 */
a { text-decoration: none; color: inherit; }

/* ---------- 导航栏（毛玻璃吸顶，与全站一致） ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 48px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow .3s ease;
}
/* .nav.scrolled { box-shadow: 0 1px 0 rgba(0, 0, 0, .08); } — 老大要求去掉这条硬横线，保留 transition 以便日后加回柔和阴影 */

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.star { width: 16px; height: 16px; }

.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font-size: 13px; font-family: var(--font); color: var(--gray-nav);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-user-area { display: flex; align-items: center; }

/* ---------- 导航栏用户区（登录按钮 + 已登录头像下拉，与全站 style.css 一致） ---------- */
.nav-login-btn {
  padding: 8px 20px;
  border-radius: 980px;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: background .2s ease, transform .2s ease;
}
.nav-login-btn:hover { background: #A80D27; transform: scale(1.03); }
.nav-login-btn:active { transform: scale(.97); }

.nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 980px;
  transition: background .2s ease;
}
.nav-user:hover { background: rgba(0,0,0,.05); }
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: none;
  cursor: pointer;
}
.nav-nick { font-size: 14px; color: var(--ink); font-weight: 500; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 用户区下拉箭头覆盖子菜单的 9px caret，与全站一致 */
.nav-user .nav-caret { font-size: 11px; color: var(--gray-3); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: 60;
}
.nav-dropdown[hidden] { display: none; }
.nav-search {
  color: var(--gray-nav); width: 15px; height: 15px; display: flex;
}
.nav-search svg { width: 15px; height: 15px; }
.nav-search:hover { color: var(--ink); }

.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span {
  width: 18px; height: 1.5px; background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  position: fixed; top: 48px; left: 0; right: 0; z-index: 99;
  display: none; flex-direction: column;
  padding: 8px 44px 20px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.nav-drawer a {
  padding: 12px 0; font-size: 15px; font-family: var(--font);
  color: var(--ink);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer.open { display: flex; }

/* ---------- 主导航下拉模块（红色文学等） ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 3px; cursor: pointer;
  font-size: 13px; font-family: var(--font);
  color: var(--gray-nav); transition: color .2s ease;
}
.nav-trigger:hover { color: var(--ink); }
.nav-caret { font-size: 9px; line-height: 1; transition: transform .2s ease; }
.nav-item.open .nav-caret { transform: rotate(180deg); }
.nav-submenu {
  position: absolute; top: calc(100% + 14px); left: 0;
  min-width: 248px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  padding: 8px;
  display: flex; flex-direction: column;
  z-index: 120;
}
.nav-submenu[hidden] { display: none; }
.nav-group-label {
  font-size: 12px; font-weight: 600; color: var(--gray-3);
  padding: 8px 12px 4px; letter-spacing: .04em;
}
.nav-sep { height: 1px; background: var(--hairline); margin: 6px 4px; }
.nav-submenu .nav-dropdown-item { width: 100%; }

/* 移动端抽屉内的展开子模块 */
.nav-drawer .nav-sub { border-bottom: 1px solid rgba(0,0,0,.06); }
.nav-drawer .nav-sub-toggle {
  width: 100%; text-align: left; background: none;
  padding: 12px 0; font-size: 15px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  font-family: inherit; cursor: pointer;
}
.nav-drawer .nav-sub-toggle .nav-caret { font-size: 10px; transition: transform .2s ease; }
.nav-drawer .nav-sub.open .nav-caret { transform: rotate(180deg); }
.nav-drawer .nav-sub-list { padding: 0 0 8px; }
.nav-drawer .nav-sub-list a {
  display: block; padding: 10px 0 10px 28px;
  font-size: 14px; color: var(--gray-2);
}
.nav-drawer .nav-sub-list .nav-group-label { padding: 8px 0 2px 16px; }

/* ---------- 复用：下拉项（与全站 .nav-dropdown-item 一致） ---------- */
.nav-dropdown-item {
  text-align: left; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: var(--ink); transition: background .15s ease;
  text-decoration: none; display: block;
}
.nav-dropdown-item:hover { background: var(--surface); }

@media (max-width: 820px) {
  .nav { padding: 0 18px; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-drawer { padding: 8px 18px 20px; }
}

/* ============================================================
   登录/注册弹窗 + 我的成绩 + Toast（复用 .quiz-modal/.quiz-card，
   与全站 style.css 一致；子页不引 style.css，故在此补齐，
   使两本书子页的登录位置响应与主页完全一致）
   ============================================================ */

/* 弹窗遮罩与卡片 */
.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .48);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.quiz-modal[hidden] { display: none; }
.quiz-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--white);
  border-radius: 28px;
  padding: 48px;
}
.quiz-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 28px;
  line-height: 1;
  color: var(--gray-3);
  background: none; border: none; cursor: pointer;
  transition: color .2s ease;
}
.quiz-close:hover { color: var(--ink); }

/* 弹窗眉标 */
.kicker {
  font-size: 15px;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 2px;
}
.kicker.sm { font-size: 14px; }

/* 主按钮（登录 / 获取验证码） */
.pill-btn {
  margin-top: 4px;
  padding: 14px 40px;
  border-radius: 980px;
  background: var(--red);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.pill-btn:hover { background: #A80D27; transform: scale(1.02); }
.pill-btn:active { transform: scale(.98); }

/* 登录 / 注册卡片 */
.rcs-auth-card { max-width: 400px; }
.rcs-auth-title { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 6px 0 18px; }
.rcs-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.rcs-tab {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none; cursor: pointer;
  background: var(--surface);
  color: var(--gray-2);
  transition: background .15s ease, color .15s ease;
}
.rcs-tab.active { background: var(--red); color: var(--white); }
.rcs-auth-form { display: flex; flex-direction: column; gap: 14px; }
.rcs-field { display: flex; flex-direction: column; gap: 6px; }
.rcs-field label { font-size: 13px; font-weight: 600; color: var(--gray-2); }
.rcs-field input {
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
}
.rcs-field input:focus { border-color: var(--red); }
.rcs-error { font-size: 13px; color: #C0271D; background: #FDEBEE; padding: 8px 12px; border-radius: 10px; }
.rcs-submit { margin-top: 4px; width: 100%; }
.rcs-switch { text-align: center; font-size: 13px; color: var(--gray-2); margin-top: 16px; }
.rcs-switch a { color: var(--red); font-weight: 600; }
.rcs-code-row { display: flex; gap: 8px; align-items: stretch; }
.rcs-code-row input { flex: 1; min-width: 0; }
.rcs-send-code { white-space: nowrap; padding: 0 14px; font-size: 13px; }
.rcs-sms-line { text-align: center; font-size: 13px; color: var(--gray-2); margin-top: -6px; }
.rcs-sms-line a { color: var(--red); font-weight: 600; }

/* 我的成绩面板 */
.rcs-scores-body { margin-top: 4px; }
.rcs-scores-loading, .rcs-scores-empty { font-size: 14px; color: var(--gray-2); text-align: center; padding: 28px 0; }
.rcs-best { font-size: 15px; color: var(--ink); margin-bottom: 14px; text-align: center; }
.rcs-best b { color: var(--red); font-size: 18px; }
.rcs-scores-list { list-style: none; display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; }
.rcs-scores-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.rcs-scores-list li:last-child { border-bottom: none; }
.sc-score { font-weight: 600; color: var(--ink); }
.sc-book { flex: 1; margin: 0 10px; font-size: 13px; color: var(--gray-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-date { font-size: 13px; color: var(--gray-3); }

/* Toast */
.rcs-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  z-index: 400;
  background: rgba(29,29,31,.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.rcs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 说明栏（统一：史料依据 / 真实性说明 / 版权提示） ---------- */
.note {
  margin: 28px 0 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--gray-2);
}
.note b { color: var(--ink); font-weight: 600; }

/* 红色文学页底部元信息行（统一格式，与 .note 风格呼应） */
.lit-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--gray-3);
}
.lit-footer a { color: var(--red); text-decoration: none; font-weight: 600; }
.lit-footer a:hover { text-decoration: underline; }

/* ---------- 页脚（与全站统一，变量名与 style.css 一致） ---------- */
.footer {
  background: var(--surface);
  padding: 48px 64px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 56px;
}
.footer-brand {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.footer-logo .star { width: 18px; height: 18px; }
.footer-brand p {
  margin: 0;
  font-size: 12px;
  color: var(--gray-3);
}
.footer-col {
  flex: 0 1 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
body .footer-col a {
  font-size: 12px;
  color: var(--gray-nav);
  text-decoration: none;
  transition: color .2s ease;
}
body .footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-divider { height: 1px; background: var(--hairline); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--gray-3);
}
.footer-meta { color: var(--gray-3); }
.ai-foot-note { width: 100%; margin: 0; font-size: .74rem; line-height: 1.5; color: #9a8f84; }
.icp-beian-note { width: 100%; margin: 0; font-size: .74rem; color: #9a8f84; }
.icp-beian-note a { color: inherit; text-decoration: underline; }
