/* ============================================================
   Stack Overflow or AI? — Styles
   Split-screen: orange (SO) vs purple (AI)
   ============================================================ */
:root {
  --so: #F48024;
  --so-bg: rgba(244, 128, 36, 0.08);
  --ai: #A855F7;
  --ai-bg: rgba(168, 85, 247, 0.08);
  --green: #22C55E;
  --red: #EF4444;
  --bg: #0C0A14;
  --bg-surface: #13101F;
  --bg-card: rgba(19, 16, 31, 0.9);
  --text: #E8E0F0;
  --text-dim: #8A7AA0;
  --text-muted: #5A4A70;
  --border: rgba(255,255,255,0.06);
  --radius: 10px;
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; display: flex; justify-content: center; }
#app { width: 100%; max-width: 640px; margin: 1rem; }

.screen { display: flex; flex-direction: column; min-height: 80vh; }
.glass-card { background: var(--bg-card); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); }

/* Menu */
.menu-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; flex: 1; text-align: center; }
.split-title { display: flex; align-items: center; gap: 1.5rem; font-size: 1.5rem; font-weight: 700; }
.so-side { color: var(--so); text-align: right; }
.vs { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; }
.ai-side { color: var(--ai); text-align: left; }
.subtitle { font-size: 0.8rem; color: var(--text-dim); }
.menu-actions { display: flex; flex-direction: column; gap: 0.4rem; min-width: 220px; }

/* Buttons */
.btn-primary { padding: 0.6rem 1.5rem; background: linear-gradient(135deg, var(--so), var(--ai)); color: #fff; font-weight: 700; font-family: var(--font); border: none; border-radius: var(--radius); cursor: pointer; font-size: 0.85rem; transition: transform 0.1s; }
.btn-primary:hover { transform: scale(1.02); }
.btn-secondary { padding: 0.5rem 1.2rem; background: rgba(255,255,255,0.04); color: var(--text-dim); font-family: var(--font); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.75rem; }
.btn-ghost { padding: 0.4rem 1rem; background: transparent; color: var(--text-dim); font-family: var(--font); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; font-size: 0.7rem; }
.btn-ghost:hover { color: var(--text); }

/* Game Bar */
.game-bar { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.75rem; color: var(--text-dim); }
#streak-display { color: var(--so); font-weight: 600; }
#score-display { font-weight: 600; }

/* Code Card */
.code-card { padding: 1rem; margin-bottom: 1rem; }
.card-header { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.badge { background: rgba(255,255,255,0.06); padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.6rem; color: var(--text-dim); font-weight: 600; }
.diff-badge { padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.6rem; font-weight: 600; }
.code-block { background: rgba(0,0,0,0.3); border-radius: 8px; padding: 0.75rem; font-family: var(--mono); font-size: 0.72rem; line-height: 1.6; overflow-x: auto; white-space: pre; color: var(--text); max-height: 300px; overflow-y: auto; }

/* Choice Buttons */
.choice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-so, .btn-ai { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 1rem; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; font-family: var(--font); font-size: 0.8rem; font-weight: 600; transition: all 0.2s; }
.btn-so { background: var(--so-bg); color: var(--so); border-color: rgba(244,128,36,0.2); }
.btn-so:hover { border-color: var(--so); background: rgba(244,128,36,0.15); }
.btn-ai { background: var(--ai-bg); color: var(--ai); border-color: rgba(168,85,247,0.2); }
.btn-ai:hover { border-color: var(--ai); background: rgba(168,85,247,0.15); }
.choice-icon { font-size: 1.5rem; }

/* Reveal */
.reveal-card { padding: 1.25rem; text-align: center; }
.reveal-header { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.reveal-tip { font-size: 0.75rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 1rem; text-align: left; background: rgba(255,255,255,0.02); border-radius: 8px; padding: 0.75rem; }

/* Results */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 1rem; font-size: 0.8rem; text-align: left; }
.r-label { color: var(--text-muted); }
.r-value { font-weight: 700; }
.stats-row { display: flex; gap: 1rem; font-size: 0.7rem; color: var(--text-dim); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal-inner { max-width: 380px; width: 90%; padding: 1.25rem; text-align: center; }
.modal-inner h2 { margin-bottom: 0.75rem; }
.score-entry { display: flex; justify-content: space-between; font-size: 0.7rem; padding: 0.2rem 0; border-bottom: 1px solid var(--border); }

@media (max-width: 480px) {
  .split-title { font-size: 1.1rem; gap: 1rem; }
  .choice-buttons { grid-template-columns: 1fr; }
}
