@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=IBM+Plex+Sans:wght@300;400;600;700&display=swap');

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

:root {
  --bg: #0a0e13;
  --bg2: #111820;
  --bg3: #1a2230;
  --text: #c8d6e5;
  --text-dim: #6b7d8f;
  --accent: #00d4aa;
  --accent2: #ff4757;
  --accent3: #ffa502;
  --border: #1e2d3d;
  --card: #0f1922;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ── TITLE SCREEN ── */
#title-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

#title-screen::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(0,212,170,0.03) 0%, transparent 60%);
  animation: pulse-bg 8s ease-in-out infinite;
}

@keyframes pulse-bg {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.title-icon { font-size: 4rem; margin-bottom: 1rem; position: relative; z-index: 1; }

.title-main {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  position: relative; z-index: 1;
}

.title-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-weight: 300;
  position: relative; z-index: 1;
}

.title-desc {
  max-width: 500px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  position: relative; z-index: 1;
}

.btn-start {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 3rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.2s;
  position: relative; z-index: 1;
}

.btn-start:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,212,170,0.3);
}

/* ── GAME SCREEN ── */
#game-screen { align-items: center; padding: 1rem; }

.game-header {
  width: 100%; max-width: 700px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.progress-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.progress-bar-container {
  flex: 1; height: 3px;
  background: var(--bg3);
  margin: 0 1rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.5s ease;
}

.cost-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent3);
  background: rgba(255,165,2,0.1);
  border: 1px solid rgba(255,165,2,0.2);
  padding: 0.5rem 1rem;
  text-align: center;
  width: 100%; max-width: 700px;
  margin-bottom: 1.5rem;
}

.scenario-text {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 700px;
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.choices-container {
  display: flex; flex-direction: column;
  gap: 1rem;
  width: 100%; max-width: 700px;
  padding: 0 0.5rem;
}

@media (min-width: 640px) {
  .choices-container { flex-direction: row; gap: 1.5rem; }
}

.choice-btn {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1.5rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

.choice-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  opacity: 0;
  transition: opacity 0.2s;
}

.choice-btn:first-child::before { background: var(--accent); }
.choice-btn:last-child::before { background: var(--accent2); }

.choice-btn:hover {
  background: var(--bg2);
  transform: translateY(-2px);
}

.choice-btn:first-child:hover { border-color: var(--accent); }
.choice-btn:first-child:hover::before { opacity: 1; }
.choice-btn:last-child:hover { border-color: var(--accent2); }
.choice-btn:last-child:hover::before { opacity: 1; }

.choice-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.choice-title {
  display: block;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.choice-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.fade-out { animation: fadeOut 0.3s ease forwards; }
.fade-in { animation: fadeIn 0.3s ease forwards; }

@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── RESULTS SCREEN ── */
#results-screen { align-items: center; padding: 2rem 1rem; }

.results-header { text-align: center; margin-bottom: 2rem; }

.results-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.results-subtitle { color: var(--text-dim); font-size: 0.95rem; }

.bias-bars {
  width: 100%; max-width: 600px;
  display: flex; flex-direction: column;
  gap: 0.75rem;
}

.bias-row { display: flex; align-items: center; gap: 0.75rem; }

.bias-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  width: 140px;
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .bias-row { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .bias-label { text-align: left; width: auto; }
}

.bias-bar-bg {
  flex: 1; width: 100%;
  height: 24px;
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}

.bias-bar-fill {
  height: 100%;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0%;
}

.bias-percent {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.bar-low { background: linear-gradient(90deg, #2d6a4f, #40916c); }
.bar-mid { background: linear-gradient(90deg, #e9c46a, #f4a261); }
.bar-high { background: linear-gradient(90deg, #e76f51, #e63946); }
.bar-extreme { background: linear-gradient(90deg, #d00000, #9d0208); }

.followup-indicator {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.verdict-note {
  max-width: 500px;
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1.6;
  font-style: italic;
}

.results-footer { margin-top: 2.5rem; text-align: center; }

.btn-restart {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-restart:hover { border-color: var(--text); color: var(--text); }

.btn-share {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  margin-right: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-share:hover { background: #fff; }
