/* OC浓度鉴定 - 样式 */
:root {
  --bg-primary: #0F172A;
  --bg-secondary: #0F172A;
  --bg-card: #1E293B;
  --text-primary: #f0f0f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #FF5C5C;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --border: #334155;
  --radius: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* 容器 */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
}

/* ===== 欢迎页 ===== */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.welcome-icon {
  font-size: 64px;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.start-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.start-btn:active { transform: translateY(0); }

.welcome-meta {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.free-badge {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

/* ===== 答题页 ===== */
.quiz-screen { padding-top: 20px; }

.progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.question-text {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 28px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.option-btn {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.4;
}

.option-btn:hover {
  border-color: var(--primary);
  background: rgba(255, 92, 92, 0.08);
}

.option-btn.selected {
  border-color: var(--primary);
  background: rgba(255, 92, 92, 0.15);
  color: var(--primary);
  font-weight: 600;
}

.option-btn:disabled {
  pointer-events: none;
}

/* ===== 加载页 ===== */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.loading-icon {
  font-size: 48px;
  margin-bottom: 24px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.loading-text {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.loading-bar {
  width: 240px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.loading-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.15s ease;
  width: 0%;
}

.loading-pct {
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== 结果页（Pencil 设计稿 1:1） ===== */
.result-screen { padding: 0; }

.result-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 32px 24px;
  gap: 12px;
  background: #0F172A;
}

.result-label {
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  letter-spacing: 2px;
}

.result-percentage {
  font-size: 96px;
  font-weight: 900;
  color: #60A5FA;
  letter-spacing: -2px;
  line-height: 1;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.result-bar {
  width: 300px;
  height: 10px;
  background: #1E293B;
  border-radius: 5px;
  overflow: hidden;
  margin: 0;
}

.result-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}

.result-rarity {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.result-title {
  font-size: 32px;
  font-weight: 900;
  color: #F8FAFC;
  text-align: center;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.3;
}

.result-title .result-code {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #60A5FA;
  letter-spacing: 2px;
  margin-bottom: 4px;
  opacity: 0.9;
}

.result-desc {
  font-size: 14px;
  color: #CBD5E1;
  text-align: left;
  line-height: 1.8;
  max-width: 340px;
  margin: 0;
  font-style: normal;
  padding: 0 8px;
}

.result-desc p {
  margin: 0 0 12px 0;
}

.result-desc p:last-child {
  margin-bottom: 0;
}

.result-desc p:first-child {
  text-align: center;
  font-style: italic;
  color: #94A3B8;
  font-size: 13px;
  margin-bottom: 16px;
}

.result-desc strong {
  color: #F8FAFC;
  font-weight: 700;
}

.egg-hint {
  margin: 12px auto 0;
  max-width: 480px;
  padding: 10px 14px;
  background: rgba(255,200,50,0.08);
  border: 1px solid rgba(255,200,50,0.25);
  border-radius: 8px;
  color: #FBBF24;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

/* 稀有度颜色 — 浓度条 */
.rarity-common { background: #6B7280; }
.rarity-advanced { background: #3B82F6; }
.rarity-rare { background: #A78BFA; }
.rarity-easter { background: linear-gradient(90deg, #F97316, #EF4444); }

/* 稀有度颜色 — pill 标签 */
.result-rarity.rarity-common { background: #6B728020; color: #9CA3AF; }
.result-rarity.rarity-advanced { background: #3B82F620; color: #60A5FA; }
.result-rarity.rarity-rare { background: #7C3AED33; color: #A78BFA; }
.result-rarity.rarity-easter {
  background: linear-gradient(90deg, #F9731633, #EF444433);
  color: #FCA5A5;
  border: 1px solid #EF444466;
  font-weight: 700;
}

/* 彩蛋模式整体基调 */
#resultScreen.is-easter-egg .result-percentage {
  color: #F97316;
  text-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

#resultScreen.is-easter-egg[data-egg="SCP-CN-OC-01"] .result-percentage {
  color: #DC2626;
  font-family: 'Courier New', monospace;
  font-size: 72px;
}

#resultScreen.is-easter-egg[data-egg="SCP-CN-OC-01"] .result-title {
  font-family: 'Courier New', monospace;
  color: #FCA5A5;
}

#resultScreen.is-easter-egg[data-egg="SCP-CN-OC-01"] .result-title .result-code {
  color: #DC2626;
}

/* 四宫格维度（Pencil 设计稿 1:1） */
.dim-grid-section {
  padding: 0 20px;
  margin-bottom: 0;
}

.dim-grid-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: #F8FAFC;
  margin-bottom: 12px;
}

.dim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dim-cell {
  background: #1E293B;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dim-cell-pct {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.dim-cell-pct.color-pink { color: #F472B6; }
.dim-cell-pct.color-blue { color: #60A5FA; }
.dim-cell-pct.color-yellow { color: #FBBF24; }
.dim-cell-pct.color-green { color: #34D399; }

.dim-cell-label {
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
}

.dim-cell-nick {
  font-size: 14px;
  font-weight: 700;
  color: #F8FAFC;
}

/* 操作按钮（Pencil 设计稿 1:1） */
.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 0 20px;
  margin-bottom: 0;
}

.share-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(90deg, #F97316, #EF4444);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-btn:hover { opacity: 0.9; }
.share-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.retest-btn {
  width: 100%;
  height: 48px;
  background: #1E293B;
  color: #94A3B8;
  border: 1px solid #334155;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.retest-btn:hover { border-color: #94A3B8; color: #F8FAFC; }

/* 交叉引导（Pencil 设计稿 1:1） */
.cross-sell {
  padding: 16px 20px;
  margin-bottom: 0;
}

.cross-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.cross-link:hover {
  border-color: #F97316;
  background: #1E293BCC;
}

.cross-emoji { font-size: 28px; }

.cross-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cross-title {
  font-size: 14px;
  font-weight: 600;
  color: #F8FAFC;
}

.cross-subtitle {
  font-size: 12px;
  color: #60A5FA;
}

/* 反商业叙事（欢迎页） */
.anti-commerce {
  margin-top: 20px;
  padding: 8px 16px;
  color: #64748B;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  max-width: 320px;
}

/* 作者的话折叠区（结果页） */
.author-note {
  margin: 0 20px 24px;
  padding: 16px 20px;
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 14px;
  color: #94A3B8;
  font-size: 13px;
  line-height: 1.7;
}

.author-note summary {
  cursor: pointer;
  color: #F8FAFC;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.author-note summary::-webkit-details-marker {
  display: none;
}

.author-note summary::after {
  content: '▼';
  font-size: 10px;
  color: #64748B;
  transition: transform 0.2s;
}

.author-note[open] summary::after {
  transform: rotate(180deg);
}

.author-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #334155;
}

.author-content p {
  margin: 0 0 10px 0;
}

.author-content p:last-child {
  margin-bottom: 0;
}

.author-content strong {
  color: #F8FAFC;
}

.author-sign {
  margin-top: 12px !important;
  text-align: right;
  color: #64748B;
  font-size: 12px;
  font-style: italic;
}

.author-credit {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px dashed #334155;
  color: #64748B;
  font-size: 11px;
  line-height: 1.7;
}

.author-credit a {
  color: #60A5FA;
  text-decoration: none;
  border-bottom: 1px dotted #60A5FA;
}

.author-credit a:hover {
  color: #93C5FD;
}

/* 品牌底部（Pencil 设计稿 1:1） */
.brand-footer {
  text-align: center;
  padding: 16px 20px 32px 20px;
  color: #475569;
  font-size: 11px;
}

/* 返回主页 */
.home-link {
  display: block;
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.home-link:hover { color: var(--text-primary); }

/* ===== 称号代号前缀（SBTI 风格） ===== */
.result-code {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
  color: #F97316;
  margin-right: 6px;
  letter-spacing: 1px;
}

/* ===== 描述段落排版 ===== */
.result-desc p {
  margin: 0 0 12px 0;
}
.result-desc p:last-child {
  margin-bottom: 0;
}
.result-desc strong {
  color: #F8FAFC;
  font-weight: 700;
}

/* ===== 稀有度颜色补充：彩蛋 ===== */
.rarity-easter {
  background: linear-gradient(90deg, #EF4444, #F97316);
}

.result-rarity.rarity-easter {
  background: #EF444425;
  color: #F97316;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ===== 彩蛋档案专属样式 ===== */
.result-screen.is-easter-egg .result-header {
  background: linear-gradient(135deg, #0F172A 0%, #1a0a0a 100%);
}

.result-screen.is-easter-egg .result-percentage {
  color: #F97316;
  text-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

.result-screen.is-easter-egg .result-code {
  color: #FBBF24;
}

/* SCP 专属风格（更严肃） */
.result-screen[data-egg="SCP-CN-OC-01"] .result-header {
  background: linear-gradient(135deg, #0F172A 0%, #1F1414 100%);
  border-top: 3px solid #EF4444;
}

.result-screen[data-egg="SCP-CN-OC-01"] .result-percentage {
  font-family: 'Courier New', monospace;
  color: #EF4444;
  font-size: 72px;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.result-screen[data-egg="SCP-CN-OC-01"] .result-title {
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.result-screen[data-egg="SCP-CN-OC-01"] .result-desc {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.8;
}

/* NO-OC 纯净人类：冷色调 */
.result-screen[data-egg="NO-OC"] .result-percentage {
  color: #94A3B8;
  text-shadow: 0 0 20px rgba(148, 163, 184, 0.3);
}

/* GOD-OC 浓度爆表：警告红 */
.result-screen[data-egg="GOD-OC"] .result-percentage {
  color: #EF4444;
  text-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
  animation: pulse-warning 1.5s ease-in-out infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

