/* ============================================
   挽回挑战合集 · 午夜暗涌设计系统
   Midnight Undertow — Dark Cinematic Aesthetic
   ============================================ */

:root {
  /* 主色调 - 深夜墨蓝 */
  --bg-deep: #050811;
  --bg-night: #0a0e1a;
  --bg-card: #11162480;
  --bg-card-solid: #131826;
  --bg-elevated: #1a2030;

  /* 强调色 - 琥珀金 */
  --gold: #e8b86d;
  --gold-bright: #f0c87a;
  --gold-dim: #d4a574;
  --gold-deep: #a8804a;
  --gold-glow: rgba(232, 184, 109, 0.35);

  /* 情感色 */
  --rose: #c97064;
  --rose-dim: #9a5048;
  --moon: #e8e8f0;
  --moon-dim: #a8a8bc;
  --ash: #6a6a7e;

  /* 状态色 */
  --danger: #e85d5d;
  --success: #5ec9a8;
  --warn: #e8b86d;

  /* 文字 */
  --text-primary: #e8e8f0;
  --text-secondary: #a8a8bc;
  --text-muted: #6a6a7e;
  --text-gold: #e8b86d;

  /* 边框 */
  --border-gold: rgba(232, 184, 109, 0.3);
  --border-faint: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.1);

  /* 字体 */
  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Consolas", "Courier New", monospace;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* 阴影 */
  --shadow-gold: 0 0 24px rgba(232, 184, 109, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-deep: 0 16px 48px rgba(0, 0, 0, 0.7);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* 深夜氛围背景 */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 184, 109, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 20% 110%, rgba(201, 112, 100, 0.06), transparent),
    radial-gradient(ellipse 50% 35% at 85% 80%, rgba(90, 110, 160, 0.05), transparent),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-night) 40%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

/* 噪点纹理叠层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 星点 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(232, 184, 109, 0.4), transparent),
    radial-gradient(1px 1px at 28% 62%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 47% 8%, rgba(232, 184, 109, 0.25), transparent),
    radial-gradient(1px 1px at 68% 38%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 82% 72%, rgba(232, 184, 109, 0.3), transparent),
    radial-gradient(1px 1px at 92% 22%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 55% 88%, rgba(232, 184, 109, 0.2), transparent);
  background-size: 100% 100%;
  animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.5; }
  to { opacity: 0.9; }
}

/* ============================================
   布局容器
   ============================================ */
.app {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 20px 48px;
}

@media (min-width: 768px) {
  .app {
    box-shadow: var(--shadow-deep);
    border-left: 1px solid var(--border-faint);
    border-right: 1px solid var(--border-faint);
  }
}

/* ============================================
   顶部导航
   ============================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--bg-deep) 60%, transparent);
  backdrop-filter: blur(12px);
}

.topbar .back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.topbar .back:hover { color: var(--gold); }

.topbar .brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 2px;
}

/* ============================================
   Hero 区
   ============================================ */
.hero {
  padding: 32px 0 28px;
  text-align: center;
  position: relative;
}

.hero .eyebrow {
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #f5d896 0%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  text-shadow: 0 2px 30px var(--gold-glow);
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
}

/* 全站统计条 */
.global-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 24px 0 8px;
  padding: 16px 0;
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
}
.global-stats .stat {
  flex: 1;
  text-align: center;
  position: relative;
}
.global-stats .stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-faint);
}
.global-stats .stat .num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  display: block;
}
.global-stats .stat .label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 2px;
}

/* ============================================
   合集卡片
   ============================================ */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 16px;
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head h2::before {
  content: "";
  width: 3px;
  height: 18px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 2px;
}
.section-head .more {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.collection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.collection-card {
  position: relative;
  display: block;
  padding: 20px 16px;
  background: linear-gradient(155deg, var(--bg-card-solid) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.collection-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}
.collection-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold), var(--shadow-card);
}
.collection-card .cc-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}
.collection-card .cc-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.collection-card .cc-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.collection-card .cc-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}
.collection-card .cc-count b {
  color: var(--gold-bright);
  font-weight: 700;
}

/* ============================================
   挑战卡片
   ============================================ */
.challenge-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.challenge-card {
  position: relative;
  display: block;
  padding: 18px;
  background: linear-gradient(135deg, var(--bg-card-solid) 0%, rgba(19, 24, 38, 0.6) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.challenge-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}
.challenge-card.is-cleared {
  border-color: rgba(94, 201, 168, 0.3);
}
.challenge-card .cc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.challenge-card .cc-code {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold-dim);
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.challenge-card .cc-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.challenge-card .cc-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-extreme { background: rgba(232, 93, 93, 0.15); color: var(--danger); border: 1px solid rgba(232, 93, 93, 0.3); }
.badge-hard { background: rgba(232, 184, 109, 0.15); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-normal { background: rgba(94, 201, 168, 0.12); color: var(--success); border: 1px solid rgba(94, 201, 168, 0.3); }
.badge-cleared { background: rgba(94, 201, 168, 0.15); color: var(--success); border: 1px solid rgba(94, 201, 168, 0.3); }
.badge-progress { background: rgba(232, 184, 109, 0.12); color: var(--gold-dim); border: 1px solid rgba(232, 184, 109, 0.2); }

.challenge-card .cc-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.challenge-card .cc-hook {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}
.challenge-card .cc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
}
.challenge-card .cc-meta span b {
  color: var(--gold-dim);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ============================================
   挑战详情 / Boss 档案
   ============================================ */
.boss-panel {
  padding: 28px 20px;
  background: linear-gradient(160deg, var(--bg-card-solid) 0%, var(--bg-elevated) 60%, var(--bg-card-solid) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  text-align: center;
  margin: 8px 0 20px;
  position: relative;
  overflow: hidden;
}
.boss-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.boss-panel .bp-code {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--gold-dim);
  margin-bottom: 10px;
  font-weight: 600;
}
.boss-panel .bp-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.boss-panel .bp-hook {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.boss-panel .bp-stats {
  display: flex;
  justify-content: space-around;
  padding: 16px 0;
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: 20px;
}
.boss-panel .bp-stats .s-item .s-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-bright);
  display: block;
}
.boss-panel .bp-stats .s-item .s-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 2px;
}
.boss-panel .bp-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
  padding: 0 4px;
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  letter-spacing: 1px;
  min-height: 48px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1208;
  box-shadow: 0 4px 20px var(--gold-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--gold-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}
.btn-ghost:hover {
  background: rgba(232, 184, 109, 0.08);
  border-color: var(--gold);
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 36px; }

/* ============================================
   闯关页 - 聊天对话
   ============================================ */
.game-screen { display: none; }
.game-screen.active { display: block; }

/* 状态栏 */
.game-statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--bg-deep) 70%, transparent);
  backdrop-filter: blur(10px);
}
.game-statusbar .gs-level {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-statusbar .gs-progress {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.game-statusbar .gs-progress .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  border-radius: 2px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px var(--gold-glow);
}
.game-statusbar .gs-lives {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.game-statusbar .gs-lives .heart { color: var(--rose); }

/* 对话区 */
.dialog-area {
  padding: 16px 0 24px;
  min-height: 40vh;
}
.dialog-area .da-title {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-bottom: 18px;
  position: relative;
}
.dialog-area .da-title::before,
.dialog-area .da-title::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--border-faint);
  vertical-align: middle;
  margin: 0 10px;
}

.bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 12px;
  opacity: 0;
  animation: bubbleIn 0.4s forwards;
  word-break: break-word;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bubble.them {
  background: var(--bg-elevated);
  border: 1px solid var(--border-faint);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}
.bubble.me {
  margin-left: auto;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1208;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.bubble .speaker {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.bubble.me .speaker { color: rgba(26, 18, 8, 0.6); }

/* 打字光标 */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--gold);
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* 选项区 */
.options-area {
  padding: 8px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0;
  animation: optIn 0.4s forwards;
  position: relative;
  font-family: var(--font-sans);
}
.option-btn:nth-child(1) { animation-delay: 0.05s; }
.option-btn:nth-child(2) { animation-delay: 0.15s; }
.option-btn:nth-child(3) { animation-delay: 0.25s; }
.option-btn:nth-child(4) { animation-delay: 0.35s; }
@keyframes optIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.option-btn:hover {
  border-color: var(--border-gold);
  background: var(--bg-elevated);
  transform: translateX(4px);
}
.option-btn .opt-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  font-size: 11px;
  color: var(--gold);
  margin-right: 10px;
  font-family: var(--font-mono);
  vertical-align: middle;
}
.option-btn:hover .opt-mark {
  background: var(--gold);
  color: #1a1208;
}
.option-btn.correct {
  border-color: var(--success);
  background: rgba(94, 201, 168, 0.08);
}
.option-btn.wrong {
  border-color: var(--danger);
  background: rgba(232, 93, 93, 0.08);
}

/* ============================================
   结算页
   ============================================ */
.result-screen {
  text-align: center;
  padding: 32px 0;
}
.result-screen .rs-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.result-screen .rs-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.result-screen.win .rs-title { color: var(--gold); }
.result-screen.lose .rs-title { color: var(--rose); }
.result-screen .rs-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* 通关海报 */
.poster {
  background: linear-gradient(160deg, #0d1018 0%, #161b2a 50%, #0d1018 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  padding: 28px 22px;
  margin: 0 auto 24px;
  max-width: 360px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-gold), var(--shadow-card);
}
.poster::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(232, 184, 109, 0.06) 50%, transparent 60%);
  animation: shimmer 4s infinite;
}
@keyframes shimmer {
  0% { transform: translate(-30%, -30%); }
  100% { transform: translate(30%, 30%); }
}
.poster .p-header {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold-dim);
  margin-bottom: 16px;
  position: relative;
}
.poster .p-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 6px;
  position: relative;
}
.poster .p-rarity {
  display: inline-block;
  font-size: 11px;
  padding: 3px 12px;
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  color: var(--gold);
  margin-bottom: 18px;
  position: relative;
}
.poster .p-stats {
  display: flex;
  justify-content: space-around;
  padding: 14px 0;
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: 16px;
  position: relative;
}
.poster .p-stats .ps-item .ps-num {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-bright);
}
.poster .p-stats .ps-item .ps-label {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.poster .p-no {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  position: relative;
}
.poster .p-footer {
  margin-top: 14px;
  font-size: 10px;
  color: var(--ash);
  position: relative;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

/* ============================================
   筛选标签
   ============================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-tag {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 20px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-faint);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-tag.active {
  background: rgba(232, 184, 109, 0.12);
  border-color: var(--border-gold);
  color: var(--gold);
}

/* ============================================
   攻略页
   ============================================ */
.guide-block {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
}
.guide-block .gb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.guide-block .gb-level {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--gold);
  font-size: 15px;
}
.guide-block .gb-toggle {
  color: var(--text-muted);
  font-size: 12px;
}
.guide-block .gb-body {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-faint);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.guide-block.open .gb-body { display: block; }
.guide-block .gb-path {
  padding: 8px 12px;
  background: rgba(94, 201, 168, 0.06);
  border-left: 2px solid var(--success);
  border-radius: 4px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--success);
}

/* ============================================
   成就
   ============================================ */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.ach-item {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-faint);
  border-radius: var(--r-md);
  opacity: 0.4;
  transition: opacity 0.3s;
}
.ach-item.unlocked {
  opacity: 1;
  border-color: var(--border-gold);
  box-shadow: 0 0 12px rgba(232, 184, 109, 0.1);
}
.ach-item .ai-icon { font-size: 24px; margin-bottom: 6px; }
.ach-item .ai-name { font-size: 10px; color: var(--text-secondary); line-height: 1.3; }

/* ============================================
   通用
   ============================================ */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* 关卡过渡黑场 */
.transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.transition-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.transition-overlay .to-text {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 4px;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  box-shadow: var(--shadow-card);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 32px 0 16px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--border-faint);
  margin-top: 32px;
}
.footer a { color: var(--gold-dim); text-decoration: none; }
