/* ============================================================
   七宗罪 × 七美德  —  高奢暗夜神话美学样式
   深邃星空墨底 (#080A12) × 烈焰赤红 (#FF3355) × 圣光鎏金 (#E9C45A)
   ============================================================ */

:root {
  --bg-deep:      #070913;
  --bg-card:      rgba(18, 24, 38, 0.72);
  --bg-card-hover: rgba(26, 34, 54, 0.88);
  --border-line:  rgba(233, 196, 90, 0.16);
  --sin-red:      #FF3355;
  --sin-glow:     rgba(255, 51, 85, 0.25);
  --vir-gold:     #E9C45A;
  --vir-glow:     rgba(233, 196, 90, 0.25);
  --text-main:    #F8FAFC;
  --text-muted:   #94A3B8;
  --text-gold:    #FCD34D;
  --serif-font:   "Cinzel", "Noto Serif SC", "Songti SC", serif;
  --sans-font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  background:
    radial-gradient(1000px 700px at 15% -5%, rgba(220, 38, 38, 0.18) 0%, transparent 60%),
    radial-gradient(900px 600px at 85% 105%, rgba(234, 179, 8, 0.16) 0%, transparent 60%),
    linear-gradient(165deg, #0B0E1B 0%, #06080F 100%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--sans-font);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* 顶部流光氛围 */
.ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-left { top: -150px; left: -150px; background: var(--sin-red); }
.glow-right { bottom: -150px; right: -150px; background: var(--vir-gold); }

/* 主容器 */
.app-container {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 20px 60px;
}

/* 顶部状态栏 */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 6px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--vir-gold);
  letter-spacing: 0.1em;
}
.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  font-family: var(--serif-font);
}

/* 双人对决挑战横幅提示 */
.duel-banner {
  display: none;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(234, 179, 8, 0.22));
  border: 1px solid var(--vir-gold);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0 20px;
  animation: pulseGlow 2.5s infinite alternate;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 12px rgba(234, 179, 8, 0.2); }
  100% { box-shadow: 0 0 24px rgba(255, 51, 85, 0.35); }
}
.duel-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #FDE047;
  display: flex;
  align-items: center;
  gap: 6px;
}
.duel-banner-desc {
  font-size: 12px;
  color: #E2E8F0;
  margin-top: 4px;
}

/* 页面切换动画 */
.page-view {
  display: none;
  animation: fadeIn 0.45s ease both;
}
.page-view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= 首页 Hero ================= */
.hero-box {
  text-align: center;
  padding: 30px 10px 24px;
}
.badge-kicker {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 99px;
  font-family: var(--serif-font);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--vir-gold);
  background: rgba(233, 196, 90, 0.1);
  border: 1px solid rgba(233, 196, 90, 0.2);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--serif-font);
  font-weight: 900;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1.15;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--sin-red) 0%, #FFA4B2 38%, var(--vir-gold) 75%, #FFF2CC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 51, 85, 0.3));
}
.hero-desc {
  color: #CBD5E1;
  font-size: 15px;
  line-height: 1.8;
  margin: 18px auto 26px;
  max-width: 520px;
}
.hero-meta-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 32px;
}
.hero-meta-row b {
  color: var(--vir-gold);
  font-family: var(--serif-font);
  font-size: 18px;
}

/* 按钮通用 */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 700;
  color: #1A0C08;
  background: linear-gradient(135deg, #FFE17D 0%, #E9C45A 50%, #C8992D 100%);
  border: none;
  border-radius: 99px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(233, 196, 90, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(233, 196, 90, 0.52);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
}
.btn-ghost:hover {
  border-color: var(--vir-gold);
  color: var(--vir-gold);
}

/* ================= 沉浸式一屏答题流 (零滚动条，居中舒适排版，完全对齐图2) ================= */
body.in-quiz {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  touch-action: manipulation;
}

body.in-quiz .site-header {
  display: none !important;
}

body.in-quiz .ambient-glow {
  opacity: 0.18;
}

body.in-quiz .app-container {
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding: 16px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

body.in-quiz #quizView {
  height: auto !important;
  max-height: 100% !important;
  width: 100% !important;
  max-width: 500px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 !important;
}

.quiz-card {
  background: rgba(18, 20, 29, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px 20px 22px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), 0 0 24px rgba(233, 196, 90, 0.08);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.quiz-top-bar,
.quiz-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: #94A3B8;
}
.q-progress-text,
.q-count {
  font-family: var(--serif-font);
  color: var(--vir-gold);
  font-weight: 700;
  font-size: 14px;
}
.quiz-duel-tag {
  font-size: 11px;
  color: #FDE047;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.35);
  font-weight: 700;
}

.progress-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-bar-fill {
  height: 100%;
  width: 2%;
  background: linear-gradient(90deg, var(--sin-red), var(--vir-gold));
  border-radius: 99px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(233, 196, 90, 0.4);
}

.question-text-box {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 14px;
  padding: 0 4px;
}
.question-title {
  font-family: var(--serif-font);
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* 选项列表（参考图2：大面积、居中醒目、高度适宜） */
.options-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}
.opt-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #F1F5F9;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
}
.opt-btn:hover {
  background: rgba(233, 196, 90, 0.1);
  border-color: rgba(233, 196, 90, 0.6);
  transform: translateY(-1px);
}
.opt-btn:active,
.opt-btn.active {
  background: rgba(233, 196, 90, 0.2);
  border-color: var(--vir-gold);
  box-shadow: 0 0 16px rgba(233, 196, 90, 0.3);
  color: #FFF;
}
.opt-num {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(233, 196, 90, 0.4);
  background: rgba(233, 196, 90, 0.08);
  font-size: 13px;
  font-family: var(--serif-font);
  font-weight: 700;
  color: var(--vir-gold);
}

.quiz-nav-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 14px;
}
.btn-prev {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-prev:hover {
  color: var(--vir-gold);
  border-color: var(--vir-gold);
}
.btn-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ================= 结果页 Result ================= */
.result-head-box {
  text-align: center;
  padding: 16px 0 22px;
}
.persona-title {
  font-family: var(--serif-font);
  font-weight: 900;
  font-size: clamp(28px, 6.5vw, 44px);
  margin: 6px 0 6px;
  background: linear-gradient(120deg, var(--sin-red), var(--vir-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(233, 196, 90, 0.3));
}
.persona-motto {
  font-size: 14px;
  color: var(--vir-gold);
  letter-spacing: 0.05em;
}

/* 核心觉醒神话大卡牌 */
.awakening-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 24px 20px;
  border: 2px solid var(--vir-gold);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  margin-bottom: 24px;
  overflow: hidden;
}
.awakening-card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.4;
  pointer-events: none;
}
.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-rarity-pill {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
}
.card-hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.card-avatar-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  font-size: 38px;
  flex-shrink: 0;
}
.card-name-box h3 {
  font-family: var(--serif-font);
  font-size: 24px;
  font-weight: 800;
}
.card-motto-quote {
  font-size: 13px;
  color: #CBD5E1;
  font-style: italic;
  margin-top: 4px;
}
.card-desc-text {
  font-size: 13px;
  color: #94A3B8;
  margin-top: 14px;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

/* 罪与德之首并列榜 */
.champions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
.champ-card {
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.champ-sin {
  border-color: rgba(255, 51, 85, 0.4);
  box-shadow: 0 0 20px rgba(255, 51, 85, 0.15);
}
.champ-vir {
  border-color: rgba(233, 196, 90, 0.4);
  box-shadow: 0 0 20px rgba(233, 196, 90, 0.15);
}
.champ-tag {
  font-size: 11px;
  color: var(--text-muted);
}
.champ-val {
  font-family: var(--serif-font);
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0;
}
.champ-sin .champ-val { color: var(--sin-red); }
.champ-vir .champ-val { color: var(--vir-gold); }
.champ-score {
  font-size: 13px;
  color: var(--text-main);
}

/* 雷达图展示卡片 */
.radar-box-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 18px 12px 14px;
  margin-bottom: 24px;
  text-align: center;
}
.radar-header-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* 深度判词与明细 */
.detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 20px;
  padding: 22px 18px;
  margin-bottom: 24px;
}
.panel-headline {
  font-family: var(--serif-font);
  font-size: 14px;
  color: var(--vir-gold);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.analysis-body {
  font-size: 14px;
  line-height: 1.85;
  color: #E2E8F0;
  margin-bottom: 20px;
}

/* 14 维度进度条 */
.bars-list {
  display: grid;
  gap: 9px;
}
.bar-item {
  display: grid;
  grid-template-columns: 48px 1fr 34px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.bar-track {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 1s ease;
}
.bar-fill.sin { background: linear-gradient(90deg, #991B1B, var(--sin-red)); }
.bar-fill.virtue { background: linear-gradient(90deg, #B45309, var(--vir-gold)); }

/* 双人对决专属展示区 */
.duel-result-panel {
  display: none;
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.12), rgba(234, 179, 8, 0.12));
  border: 2px solid var(--vir-gold);
  border-radius: 20px;
  padding: 24px 18px;
  margin-bottom: 24px;
  box-shadow: 0 10px 32px rgba(234, 179, 8, 0.2);
}
.duel-header-badge {
  text-align: center;
  font-size: 12px;
  color: var(--vir-gold);
  letter-spacing: 0.2em;
  margin-bottom: 6px;
}
.duel-main-title {
  font-family: var(--serif-font);
  font-size: 26px;
  font-weight: 900;
  color: #FDE047;
  text-align: center;
  margin-bottom: 10px;
}
.duel-motto {
  font-size: 14px;
  color: #F8FAFC;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 18px;
}
.duel-cards-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.duel-mini-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}
.duel-mini-card.me { border-color: var(--sin-red); }
.duel-mini-card.partner { border-color: var(--vir-gold); }

/* 底部操作区 */
.action-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.btn-share-duel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 22px;
  background: rgba(233, 196, 90, 0.12);
  border: 1.5px solid var(--vir-gold);
  color: var(--vir-gold);
  border-radius: 99px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-share-duel:hover {
  background: var(--vir-gold);
  color: #1A0C08;
}

/* Toast 提示 */
.toast-msg {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  background: var(--vir-gold);
  color: #1A0C08;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.toast-msg.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
