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

/* ═══════════════════════════════════════
   VARIABLES & RESET
   ═══════════════════════════════════════ */

:root {
  --bg-deep: #0a0e17;
  --bg-surface: #111827;
  --bg-card: #1a2235;
  --bg-card-hover: #1f2a40;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --accent-amber: #fbbf24;
  --accent-purple: #a78bfa;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.3);
  --glow-green: 0 0 20px rgba(52, 211, 153, 0.3);
  --glow-red: 0 0 20px rgba(248, 113, 113, 0.3);
  --glow-purple: 0 0 20px rgba(167, 139, 250, 0.3);
}

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

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ═══════════════════════════════════════
   SCANLINE OVERLAY
   ═══════════════════════════════════════ */

.scanline {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 255, 0.015) 2px,
    rgba(0, 255, 255, 0.015) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════ */

.hub-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.8em;
  font-weight: 900;
  text-align: center;
  margin: 40px 0 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  animation: glitch-in 0.8s ease-out;
}

.hub-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05em;
  margin-bottom: 50px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1em;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--accent-cyan);
}

.briefing {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 12px 0 20px;
  font-size: 0.95em;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════
   GAME CARDS (HUB)
   ═══════════════════════════════════════ */

.game-cards {
  display: grid;
  gap: 20px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent-cyan)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.game-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  border-color: var(--card-accent, var(--accent-cyan));
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.game-card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 2.4em;
  margin-bottom: 12px;
}

.card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.92em;
  line-height: 1.6;
}

.card-difficulty {
  margin-top: 14px;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */

.btn {
  padding: 12px 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--bg-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #22d3ee, #34d399);
  color: #0a0e17;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  box-shadow: var(--glow-cyan);
}

.btn-phish {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--accent-red);
}

.btn-phish:hover {
  background: rgba(248, 113, 113, 0.1);
  box-shadow: var(--glow-red);
}

.btn-legit {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--accent-green);
}

.btn-legit:hover {
  background: rgba(52, 211, 153, 0.1);
  box-shadow: var(--glow-green);
}

.btn-back {
  border-color: var(--text-muted);
  color: var(--text-muted);
  padding: 8px 18px;
  font-size: 0.85em;
}

.btn-back:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-full {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

/* ═══════════════════════════════════════
   GAME HEADER & PROGRESS
   ═══════════════════════════════════════ */

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.game-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5em;
  font-weight: 700;
}

.round-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--text-muted);
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s;
}

.progress-dot.active {
  background: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.progress-dot.done {
  background: var(--accent-green);
}

/* ═══════════════════════════════════════
   EMAIL CLIENT (Phish or Legit)
   ═══════════════════════════════════════ */

.email-client {
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.email-toolbar {
  background: var(--bg-card);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.email-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.email-toolbar-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-left: 8px;
}

.email-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.email-from {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--accent-cyan);
  margin-bottom: 4px;
  word-break: break-all;
}

.email-subject {
  font-size: 1.2em;
  font-weight: 700;
}

.email-body {
  padding: 24px;
  font-size: 0.95em;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text-secondary);
}

.email-actions {
  padding: 20px 24px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   FEEDBACK OVERLAY
   ═══════════════════════════════════════ */

.feedback-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 14, 23, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fade-in 0.3s ease;
  padding: 20px;
}

.feedback-overlay.hidden {
  display: none;
}

.feedback-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  max-width: 560px;
  width: 100%;
  animation: slide-up 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.feedback-icon {
  font-size: 3em;
  margin-bottom: 16px;
}

.feedback-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 12px;
}

.feedback-text {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 0.98em;
}

.clue-list {
  list-style: none;
  margin: 16px 0;
}

.clue-item {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.9em;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.clue-item::before {
  content: '→';
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   CHOICES
   ═══════════════════════════════════════ */

.choices-grid {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.choice-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.93em;
  line-height: 1.5;
}

.choice-btn:hover:not(.disabled) {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.choice-btn.disabled {
  cursor: default;
}

.choice-btn.correct {
  border-color: var(--accent-green);
  background: rgba(52, 211, 153, 0.08);
}

.choice-btn.incorrect {
  border-color: var(--accent-red);
  background: rgba(248, 113, 113, 0.08);
}

.choice-feedback {
  margin-top: 10px;
  font-size: 0.85em;
  line-height: 1.6;
  color: var(--text-secondary);
}

.choice-feedback.best {
  color: var(--accent-green);
}

/* ═══════════════════════════════════════
   SCORE BARS (Digital Life)
   ═══════════════════════════════════════ */

.scores-panel {
  max-width: 500px;
  margin: 0 auto 20px;
}

.score-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.score-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8em;
  color: var(--text-secondary);
  min-width: 110px;
}

.score-track {
  flex: 1;
  height: 8px;
  background: var(--bg-deep);
  border-radius: 10px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.score-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}

.score-delta {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.85em;
}

.score-delta.positive { color: var(--accent-green); }
.score-delta.negative { color: var(--accent-red); }
.score-delta.neutral  { color: var(--text-muted); }

/* ═══════════════════════════════════════
   SCENARIO (Digital Life)
   ═══════════════════════════════════════ */

.scenario-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 28px;
  margin: 20px 0;
}

.scenario-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.scenario-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6em;
  font-weight: 700;
  color: var(--accent-cyan);
}

.scenario-emoji {
  font-size: 2em;
}

.scenario-title-text {
  font-size: 1.1em;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   OSINT (Social Lab)
   ═══════════════════════════════════════ */

.osint-scene {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 28px;
  margin: 20px 0;
}

.photo-mock {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;
  border: 1px solid var(--border);
  font-size: 0.9em;
  line-height: 1.8;
  color: var(--text-secondary);
}

.photo-mock-label {
  margin-bottom: 10px;
  color: var(--accent-purple);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
}

.found-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.found-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.found-item:hover:not(.revealed) {
  border-color: var(--accent-purple);
  background: rgba(167, 139, 250, 0.08);
}

.found-item.revealed {
  border-color: var(--accent-green);
  background: rgba(52, 211, 153, 0.08);
  cursor: default;
}

.found-item-icon {
  font-size: 1.8em;
  margin-bottom: 6px;
}

.found-item-label {
  font-size: 0.82em;
  color: var(--text-secondary);
}

.lesson-box {
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.lesson-box strong {
  color: var(--accent-cyan);
}

/* ═══════════════════════════════════════
   FINAL SCORE
   ═══════════════════════════════════════ */

.final-score {
  text-align: center;
  padding: 40px 20px;
}

.final-score-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 4em;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.final-score-label {
  color: var(--text-secondary);
  margin: 8px 0 24px;
}

.final-grade {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 30px;
}

.final-summary {
  max-width: 400px;
  margin: 0 auto 30px;
}

/* ═══════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════ */

.text-green  { color: var(--accent-green); }
.text-red    { color: var(--accent-red); }
.text-cyan   { color: var(--accent-cyan); }
.text-amber  { color: var(--accent-amber); }
.text-purple { color: var(--accent-purple); }
.text-muted  { color: var(--text-muted); }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
