/* =========================================================================
   chat.css — Novue | Live Mock Interview
   设计令牌（与 React 端 src/index.css 保持一致）
   ========================================================================= */

:root {
  --warm-milk: #FBF9F6;          /* 全局奶白底 */
  --off-black: #191919;          /* 主要文字色 */
  --clay-orange: #D97706;        /* 品牌橙 */
  --clay-orange-deep: #C35E2D;
  --muted-clay: #E6DFD5;         /* 浅米色描边 */
  --dark-clay: #C4B49F;          /* 深米色描边 */

  /* chat 页面专有 */
  --pill-bg: #EAE3D9;            /* 倒计时胶囊静态底色（比 warm-milk 深一点） */
  --pill-fg: #000000;            /* 默认文字色 */
  --pill-border: #000000;        /* 1px 黑色实线 */
  --pill-alarm: #DC2626;         /* 最后 10s 红色背景 */
  --pill-alarm-fg: #FFFFFF;      /* 红色态文字色 */

  --bubble-user: #F5EFE6;        /* 用户气泡：极浅灰橙 */
  --dock-bg: #FFFFFF;            /* 输入框死白 */
  --dock-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);  /* 全页唯一阴影 */

  --font-sans: "Inter", "Helvetica Neue", "Arial", sans-serif;
  --font-serif-hook: "Playfair Display", "Georgia", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--warm-milk);
  color: var(--off-black);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 整页奶白 + 同 React 端的细点阵背景，保留视觉一致性 */
  background-image: radial-gradient(var(--dark-clay) 0.5px, transparent 0.5px);
  background-size: 40px 40px;
  background-position: center;
  background-attachment: fixed;
}

::selection {
  background: var(--clay-orange);
  color: #fff;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---- 倒计时 <=10s 屏幕边缘红色呼吸灯 ---- */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  box-shadow: inset 0 0 80px rgba(239, 68, 68, 0);
  pointer-events: none;
  z-index: 9999;
  transition: box-shadow 0.5s ease;
}
body.timer-urgent::after {
  box-shadow: inset 0 0 80px rgba(239, 68, 68, 0.4);
  animation: borderPulse 1.5s infinite alternate;
}
@keyframes borderPulse {
  0%   { box-shadow: inset 0 0 60px rgba(239, 68, 68, 0.3); }
  100% { box-shadow: inset 0 0 100px rgba(239, 68, 68, 0.6); }
}

/* =========================================================================
   1. 静态导航栏 —— 三段式结构：左侧Logo透明 | 中间玻璃噪点胶囊 | 右侧透明
   ========================================================================= */
.static-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px 32px;
  display: flex;
  justify-content: center;
}
.static-nav__inner {
  width: 100%;
  max-width: 1280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* ---- 左侧 Logo 区（透明悬浮） ---- */
.static-nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.static-nav__logo img {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 6px;
}
.static-nav__logo span {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--off-black);
}
/* ---- 中间胶囊容器：玻璃磨砂 + 噪点纹理 + 立体描边投影 ---- */
.static-nav__pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px 32px;
  border-radius: 9999px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(0, 0, 0, 0.04),
    0 1px 4px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.05);
}
/* ---- 胶囊内单个 tab 链接 ---- */
.static-nav__tab {
  position: relative;
  padding: 4px 2px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 200ms, transform 200ms;
  white-space: nowrap;
}
.static-nav__tab:hover { color: var(--off-black); }
.static-nav__tab.is-active {
  color: var(--off-black);
  transform: scale(1.05);
}
/* ---- 横线指示器（真实元素，CSS transition 驱动，位于胶囊内） ---- */
.static-nav__indicator {
  position: absolute;
  bottom: 10px;
  height: 2px;
  background: var(--clay-orange);
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
}
/* ---- 右侧区域（透明悬浮） ---- */
.static-nav__right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.static-nav__login {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--dark-clay);
  color: var(--off-black);
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms;
}
.static-nav__login:hover { background: rgba(255, 255, 255, 0.5); }
.static-nav__login.is-logged-in {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-avatar-hr);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.static-nav__login.is-logged-in:hover { opacity: 0.85; background: var(--bg-avatar-hr); }

/* ---- 头像图片 ---- */
.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  inset: 0;
}
.nav-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-avatar-hr);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.nav-avatar-hidden {
  display: none;
}

/* ---- 额度徽章 ---- */
.credits-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--off-black);
  background: var(--warm-milk);
  border: 1.5px solid var(--dark-clay);
  border-radius: 999px;
  white-space: nowrap;
}
.credits-badge.is-unlimited {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: #fff;
  border-color: transparent;
  font-size: 13px;
  padding: 0 12px;
  min-width: 32px;
}
.credits-badge.is-low {
  color: #DC2626;
  border-color: #DC2626;
  background: #FEF2F2;
}
.static-nav__cog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--off-black);
  cursor: pointer;
  transition: background 200ms, border-color 200ms, transform 300ms;
}
.static-nav__cog:hover {
  background: #fff;
  border-color: var(--dark-clay);
  transform: rotate(45deg);
}

/* ---- 设置弹窗 ---- */
.settings-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 55;
}
.settings-dropdown.show {
  display: block;
  animation: settings-dropdown-in 180ms ease-out;
}
/* 关闭动画：slide-up + fade-out */
.settings-dropdown.hide {
  display: block;
  animation: settings-dropdown-out 150ms ease-in forwards;
  pointer-events: none;
}
@keyframes settings-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes settings-dropdown-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}
.settings-dropdown__inner {
  background: #fff;
  border: 1px solid var(--muted-clay);
  border-radius: 16px;
  padding: 16px 0;
  min-width: 280px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ---- Toggle 开关 ---- */
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}
.settings-toggle__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--off-black);
  line-height: 1.4;
}
.settings-toggle__switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
}
.settings-toggle__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.settings-toggle__track {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 200ms;
}
.settings-toggle__switch input:checked + .settings-toggle__track {
  background: var(--clay-orange);
}
.settings-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 200ms;
}
.settings-toggle__switch input:checked + .settings-toggle__track + .settings-toggle__thumb {
  transform: translateX(18px);
}
/* Toggle 之间的分隔线 */
.settings-toggle + .settings-toggle {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--muted-clay);
}

/* ---- 通用设置项（语言、反馈、退出、注销） ---- */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--off-black);
  line-height: 1.4;
}
.settings-item--btn {
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  transition: background 150ms;
}
/* SVG 图标 */
.settings-item__icon {
  margin-right: 8px;
  flex-shrink: 0;
  color: inherit;
}
.settings-item--btn:hover {
  background: rgba(0, 0, 0, 0.03);
}
.settings-item--danger {
  color: #dc2626;
}
.settings-item--danger:hover {
  background: rgba(220, 38, 38, 0.06);
}
.settings-item__label {
  flex: 1;
}
/* 分隔线 */
.settings-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--muted-clay);
}
/* 语言下拉 */
.settings-select {
  padding: 6px 10px;
  border: 1px solid var(--muted-clay);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--off-black);
  cursor: pointer;
  outline: none;
  transition: border-color 150ms;
}
.settings-select:focus {
  border-color: var(--clay-orange);
}
/* Toggle 在设置面板内调整为水平 padding */
.settings-toggle {
  padding: 12px 24px;
}

/* =========================================================================
   2. 倒计时胶囊 + 多级悬浮提示
   ========================================================================= */
.countdown-cluster {
  position: fixed;
  top: 96px;
  right: 48px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.countdown-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 12px 32px;
  background: var(--pill-bg);
  color: var(--pill-fg);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  transition: background 80ms linear, color 80ms linear, border-color 80ms linear;
}
.countdown-pill.is-danger {
  background: var(--pill-alarm);
  color: var(--pill-alarm-fg);
  border-color: transparent;
  animation: countdown-pulse 1s ease-in-out infinite;
}
/* AI 思考暂停 → 柔和黄色 */
.countdown-pill.is-paused {
  background: #fef9c3;
  color: #854d0e;
  border-color: #facc15;
}
@keyframes countdown-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

/* ---- 暂停提示容器（胶囊下方） ---- */
.timer-pause-container {
  animation: countdown-hint-in 220ms ease-out;
}
.timer-pause-container[hidden] { display: none; }
@keyframes countdown-hint-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 主提示文字 */
.pause-text {
  position: relative;
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #854d0e;
  background: rgba(254, 249, 195, 0.6);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: default;
}

/* ---- 一级悬浮气泡：关闭该功能 ---- */
.disable-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--muted-clay);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  z-index: 41;
  font-size: 13px;
  color: var(--off-black);
  font-weight: 400;
  letter-spacing: 0.02em;
}
/* JS 状态锁控制：.show 替代 CSS :hover，消除间隙消失 Bug */
.disable-bubble.show {
  display: flex;
  align-items: center;
  gap: 10px;
}
.disable-action-btn {
  cursor: pointer;
  color: #dc2626;
  font-weight: 600;
  transition: opacity 150ms;
}
.disable-action-btn:hover {
  opacity: 0.7;
}

/* ---- 二级悬浮气泡：? 问号 → 设置引导 ---- */
.help-question-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  transition: background 150ms;
}
.help-question-mark:hover {
  background: #d1d5db;
}
.settings-guide-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--muted-clay);
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  font-size: 12px;
  color: var(--off-black);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 42;
}
.help-question-mark:hover .settings-guide-bubble {
  display: block;
}

/* =========================================================================
   3. 聊天主体滚动区
   ========================================================================= */
.chat-scroll {
  position: relative;
  /* nav 高度 + 倒计时往下走 + 底部输入区 */
  padding: 140px 48px 220px;
  min-height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  outline: none;
}
.chat-list {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 56px;  /* 与 React 端一致的大间距 */
}

/* 隐藏滚动条但保持滚动能力 */
.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

/* ---- 单条消息：通用容器 ---- */
.msg {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 100%;
}
.msg.is-user {
  flex-direction: row-reverse;
}
.msg__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.msg__avatar.is-hr {
  background: var(--off-black);
  color: #fff;
}
.msg__body {
  max-width: 75%;
  padding: 0;
  font-size: 20px;
  line-height: 1.7;
  color: var(--off-black);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-weight: 300;
}
.msg.is-user .msg__body {
  max-width: 75%;
  padding: 20px 24px;
  background: var(--bubble-user);
  border-radius: 20px 20px 4px 20px;
  font-style: italic;
  font-weight: 300;
}
.msg.is-ai .msg__body {
  padding-top: 8px;
  max-width: 85%;
}

/* AI 末尾输入中三个点 */
.msg__typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
}
.msg__typing span {
  width: 8px; height: 8px;
  background: #d1d5db;
  border-radius: 50%;
  animation: msg-typing 1.2s infinite ease-in-out;
}
.msg__typing span:nth-child(2) { animation-delay: 0.2s; }
.msg__typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes msg-typing {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* =========================================================================
   4. "回到底部" 悬浮按钮
   ========================================================================= */
.scroll-to-bottom {
  position: fixed;
  left: 50%;
  bottom: 200px;
  transform: translateX(-50%) translateY(20px);
  z-index: 30;
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--off-black);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.scroll-to-bottom.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.scroll-to-bottom:hover { background: #000; }

/* =========================================================================
   5. 死白输入区
   ========================================================================= */
.input-dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
  padding: 32px;
  display: flex;
  justify-content: center;
  background: linear-gradient(to top, var(--warm-milk) 30%, rgba(251, 249, 246, 0) 100%);
}
.input-dock__inner {
  width: 100%;
  max-width: 896px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: var(--dock-bg);
  padding: 20px 16px 20px 32px;
  border-radius: 40px;
  box-shadow: var(--dock-shadow);  /* 唯一阴影 */
}
.input-dock__textarea {
  flex: 1;
  height: 48px;
  min-height: 48px;
  max-height: 180px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.5;
  font-style: italic;
  font-weight: 300;
  color: var(--off-black);
  padding: 6px 0;
  overflow-y: auto;
}
.input-dock__textarea::placeholder {
  color: #9ca3af;
  font-style: italic;
}
.input-dock__textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.input-dock__send {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--clay-orange);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 120ms ease, opacity 200ms;
}
.input-dock__send:hover { background: var(--clay-orange-deep); }
.input-dock__send:active { transform: scale(0.92); }
.input-dock__send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================================
   6. INTERVIEW END 弹窗
   ========================================================================= */
.end-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(25, 25, 25, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: end-modal-fade 200ms ease-out;
}
.end-modal[hidden] { display: none; }
@keyframes end-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.end-modal__card {
  width: 100%;
  max-width: 640px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-color: rgba(251, 249, 246, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    0 30px 80px rgba(0, 0, 0, 0.25);
  animation: end-modal-pop 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes end-modal-pop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.end-modal__title {
  margin: 0 0 20px;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 44px;
  letter-spacing: 0.04em;
  color: #dc2626;
  text-transform: uppercase;
  line-height: 1;
}
.end-modal__subtitle {
  margin: 0 0 36px;
  font-size: 18px;
  font-weight: 600;
  color: #ef4444;
  line-height: 1.5;
}
.end-modal__progress-track {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.end-modal__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--clay-orange);
  border-radius: 999px;
  transition: width 250ms ease-out;
}
.end-modal__progress-text {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--clay-orange);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.end-modal__step-text {
  margin: 0 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  font-style: italic;
  min-height: 20px;
  transition: opacity 300ms ease;
}

/* =========================================================================
   7. 深色模式 (Dark Mode) — body.dark
   ========================================================================= */
body.dark {
  --warm-milk: #121214;
  --off-black: #E4E4E7;
  --clay-orange: #0098ff;
  --clay-orange-deep: #007acc;
  --muted-clay: #2D2D34;
  --dark-clay: #3D3D44;

  --pill-bg: #1E1E24;
  --pill-fg: #E4E4E7;
  --pill-border: #2D2D34;
  --pill-alarm: #DC2626;
  --pill-alarm-fg: #FFFFFF;

  --bubble-user: #1E1E24;
  --dock-bg: #1E1E24;
  --dock-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  background-image: radial-gradient(#3D3D44 0.5px, transparent 0.5px);
}

body.dark .static-nav__pill {
  background-color: rgba(30, 30, 36, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.06),
    inset 0 -1px 1px rgba(0, 0, 0, 0.2),
    0 1px 4px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.25);
}
body.dark .static-nav__tab { color: #9ca3af; }
body.dark .static-nav__tab:hover { color: #E4E4E7; }
body.dark .static-nav__tab.is-active { color: #E4E4E7; }
body.dark .static-nav__login {
  border-color: #3D3D44;
  color: #E4E4E7;
}
body.dark .static-nav__login:hover { background: #1E1E24; }
body.dark .static-nav__cog { color: #E4E4E7; }
body.dark .static-nav__cog:hover {
  background: #1E1E24;
  border-color: #3D3D44;
}

body.dark .settings-dropdown__inner {
  background: #1E1E24;
  border-color: #2D2D34;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
body.dark .settings-toggle__label { color: #E4E4E7; }
body.dark .settings-toggle__track { background: #3D3D44; }
body.dark .settings-toggle__switch input:checked + .settings-toggle__track {
  background: #0098ff;
}
body.dark .settings-item--btn:hover { background: rgba(255, 255, 255, 0.04); }
body.dark .settings-item--danger { color: #f87171; }
body.dark .settings-item--danger:hover { background: rgba(248, 113, 113, 0.08); }
body.dark .settings-divider { background: #2D2D34; }
body.dark .settings-select {
  background: #1E1E24;
  border-color: #3D3D44;
  color: #E4E4E7;
}
body.dark .settings-select:focus { border-color: #0098ff; }

body.dark .countdown-pill.is-paused {
  background: #332D0A;
  color: #FDE047;
  border-color: #854D0E;
}
body.dark .pause-text {
  color: #FDE047;
  background: rgba(51, 45, 10, 0.7);
  border-color: rgba(133, 77, 14, 0.5);
}
body.dark .disable-bubble {
  background: #1E1E24;
  border-color: #2D2D34;
  color: #E4E4E7;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
body.dark .disable-action-btn { color: #f87171; }
body.dark .help-question-mark {
  background: #3D3D44;
  color: #9ca3af;
}
body.dark .help-question-mark:hover { background: #4D4D54; }
body.dark .settings-guide-bubble {
  background: #1E1E24;
  border-color: #2D2D34;
  color: #E4E4E7;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.dark .msg__typing span { background: #3D3D44; }

body.dark .msg__avatar.is-hr {
  background: #3D3D44;
  color: #E4E4E7;
}

body.dark .scroll-to-bottom { background: #E4E4E7; color: #121214; }
body.dark .scroll-to-bottom:hover { background: #fff; }

body.dark .input-dock {
  background: linear-gradient(to top, #121214 30%, rgba(18, 18, 20, 0) 100%);
}
body.dark .input-dock__textarea { color: #E4E4E7; }
body.dark .input-dock__textarea::placeholder { color: #6b7280; }
body.dark .input-dock__send { background: #0098ff; }
body.dark .input-dock__send:hover { background: #007acc; }

body.dark .chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
}

body.dark .end-modal {
  background: rgba(0, 0, 0, 0.7);
}
body.dark .end-modal__card {
  background-color: rgba(30, 30, 36, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.45);
}
body.dark .end-modal__progress-track { background: #2D2D34; }

/* =========================================================================
   8. 订阅卡片 —— 横版并排 + 纯净排版 + hover 倾斜微交互 + 极简黑按钮
   ========================================================================= */
.sub-page {
  min-height: 100vh;
  padding: 120px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--warm-milk);
}
.sub-page__title {
  font-family: "Playfair Display", serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--off-black);
  margin-bottom: 8px;
  text-align: center;
}
.sub-page__subtitle {
  font-size: 18px;
  color: #6b7280;
  margin-bottom: 56px;
  text-align: center;
  max-width: 640px;
  line-height: 1.6;
}

/* ---- 横版并排容器 ---- */
.sub-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 1120px;
}

/* ---- 单张卡片 ---- */
.sub-card {
  flex: 1 1 240px;
  max-width: 260px;
  min-width: 220px;
  background: #FFFFFF;
  border: 1px solid var(--muted-clay);
  border-radius: 20px;
  padding: 32px 28px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
/* 核心：卡片倾斜 1.5°，内容反向回正 -1.5° */
.sub-card:hover {
  transform: scale(1.04) rotate(1.5deg);
  box-shadow:
    0 20px 50px rgba(239, 68, 68, 0.10),
    0 8px 20px rgba(239, 68, 68, 0.05);
  border-color: var(--clay-orange);
}
.sub-card:hover .sub-card__inner {
  transform: rotate(-1.5deg);
}
.sub-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---- 纯净文字排版 ---- */
.sub-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--off-black);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.sub-card__price {
  font-size: 40px;
  font-weight: 900;
  color: var(--off-black);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.sub-card__unit {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 20px;
  line-height: 1.3;
}
.sub-card__desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: auto;
  padding-bottom: 20px;
  flex-grow: 1;
}

/* ---- 极简黑底白字按钮 ---- */
.sub-card__btn {
  display: block;
  width: 100%;
  padding: 14px 0;
  background: #000000;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
  margin-top: auto;
}
.sub-card__btn:hover {
  background: #222222;
  transform: scale(1.03);
}
.sub-card__btn:active {
  transform: scale(0.97);
}

/* ---- 推荐卡片高亮 ---- */
.sub-card--featured {
  border-color: var(--clay-orange);
  border-width: 2px;
}
.sub-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #000000;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ---- 暗色模式 ---- */
body.dark .sub-page {
  background: #121214;
}
body.dark .sub-page__title,
body.dark .sub-card__name,
body.dark .sub-card__price {
  color: #E4E4E7;
}
body.dark .sub-card {
  background: #1E1E24;
  border-color: #2D2D34;
}
body.dark .sub-card:hover {
  border-color: var(--clay-orange);
  box-shadow:
    0 20px 50px rgba(0, 152, 255, 0.15),
    0 8px 20px rgba(0, 152, 255, 0.08);
}
body.dark .sub-card__desc,
body.dark .sub-card__unit {
  color: #9ca3af;
}
body.dark .sub-card__btn {
  background: #E4E4E7;
  color: #121214;
}
body.dark .sub-card__btn:hover {
  background: #FFFFFF;
}
body.dark .sub-card__badge {
  background: var(--clay-orange);
  color: #FFFFFF;
}

/* ---- 暗色模式：双栏对比板块 ---- */
body.dark .comparison-section {
  background: #121214;
}
body.dark .comparison-section h2,
body.dark .comparison-section h3 {
  color: #E4E4E7;
}
body.dark .comparison-section p {
  color: #9ca3af;
}
body.dark .comparison-section strong {
  color: #007acc;
}
body.dark .comparison-section .border-muted-clay {
  border-color: #2D2D34;
}

/* =========================================================================
   9. 响应式
   ========================================================================= */
@media (max-width: 768px) {
  .static-nav { padding: 12px 16px; }
  .static-nav__pill { display: none; }
  .countdown-cluster { top: 88px; right: 16px; gap: 6px; }
  .countdown-pill { min-width: 110px; padding: 10px 22px; font-size: 18px; }
  .pause-text { font-size: 10px; padding: 3px 8px; }
  .disable-bubble { font-size: 11px; padding: 8px 12px; }
  .chat-scroll { padding: 130px 16px 220px; }
  .chat-list { gap: 40px; }
  .msg__body, .msg.is-user .msg__body { font-size: 17px; }
  .end-modal__title { font-size: 32px; }
  .end-modal__card { padding: 40px 24px; }
}
