/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #0a0e1a;
  --color-surface: #111827;
  --color-surface-light: #1e2740;
  --color-blue: #00d4ff;
  --color-purple: #a855f7;
  --color-green: #22d3ee;
  --color-pink: #ff6b9d;
  --color-yellow: #fbbf24;
  --color-red: #ef4444;
  --color-text: #e8eaf0;
  --color-text-dim: #8892a8;
  --color-neon-blue: #00d4ff;
  --color-neon-purple: #a855f7;
  --color-neon-green: #34d399;
  --font-main: 'Exo 2', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

/* Gradient glow blobs */
body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
  z-index: 0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-surface);
  z-index: 100;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-purple), var(--color-green));
  width: 10%;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}
.progress-bar__text {
  position: fixed;
  top: 12px;
  right: 20px;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-family: var(--font-mono);
  z-index: 101;
}

/* ===== NAVIGATION BUTTONS ===== */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  background: var(--color-surface-light);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-blue);
  box-shadow: 0 0 20px rgba(0,212,255,0.2);
}
.nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  box-shadow: none;
}
.nav-btn--back { left: 16px; }
.nav-btn--next { right: 16px; }

/* ===== SLIDES CONTAINER ===== */
.slides {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
  transition: opacity 0.45s, transform 0.45s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.slide.exit-left {
  opacity: 0;
  transform: translateX(-60px);
}

.slide__content {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.slide__title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.slide__description {
  font-size: 1.1rem;
  color: var(--color-text-dim);
  text-align: center;
}

.slide__hint {
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 0.95rem;
  color: var(--color-neon-green);
  text-align: center;
}

/* ===== NEON TEXT ===== */
.neon-text { font-weight: 800; }
.neon-text--blue {
  color: var(--color-neon-blue);
  text-shadow: 0 0 20px rgba(0,212,255,0.4), 0 0 40px rgba(0,212,255,0.15);
}
.neon-text--purple {
  color: var(--color-neon-purple);
  text-shadow: 0 0 20px rgba(168,85,247,0.4), 0 0 40px rgba(168,85,247,0.15);
}
.neon-text--green {
  color: var(--color-neon-green);
  text-shadow: 0 0 20px rgba(52,211,153,0.4), 0 0 40px rgba(52,211,153,0.15);
}

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.btn--glow {
  background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
  color: #fff;
  border: none;
  box-shadow: 0 4px 25px rgba(0,212,255,0.3), 0 0 60px rgba(168,85,247,0.15);
}
.btn--glow:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 35px rgba(0,212,255,0.45), 0 0 80px rgba(168,85,247,0.25);
}
.btn--glow:active { transform: scale(0.97); }

.btn--green {
  background: rgba(52,211,153,0.15);
  border-color: var(--color-green);
  color: var(--color-green);
}
.btn--green:hover { background: rgba(52,211,153,0.25); }

.btn--purple {
  background: rgba(168,85,247,0.15);
  border-color: var(--color-purple);
  color: var(--color-purple);
}
.btn--purple:hover { background: rgba(168,85,247,0.25); }

.btn--danger {
  background: rgba(239,68,68,0.15);
  border-color: var(--color-red);
  color: var(--color-red);
}
.btn--danger:hover { background: rgba(239,68,68,0.25); }

.btn--blue {
  background: rgba(0,212,255,0.15);
  border-color: var(--color-blue);
  color: var(--color-blue);
}
.btn--blue:hover { background: rgba(0,212,255,0.25); }

/* ===== COVER SCREEN ===== */
.cover { text-align: center; }

.cover__badge {
  display: inline-block;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 50px;
  padding: 8px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover__title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.cover__subtitle {
  font-size: 1.3rem;
  color: var(--color-text-dim);
  margin-top: 4px;
}

.cover__decoration {
  position: relative;
  width: 200px;
  height: 60px;
}

/* Floating particles */
.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: particleFloat 3s ease-in-out infinite;
}
.particle--1 { background: var(--color-blue); left: 10%; animation-delay: 0s; }
.particle--2 { background: var(--color-purple); left: 30%; animation-delay: 0.5s; }
.particle--3 { background: var(--color-green); left: 50%; animation-delay: 1s; }
.particle--4 { background: var(--color-pink); left: 70%; animation-delay: 1.5s; }
.particle--5 { background: var(--color-yellow); left: 90%; animation-delay: 2s; }

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-20px) scale(1.4); opacity: 1; }
}

/* ===== INFO CARDS (SCREEN 2) ===== */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
}

.info-card {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.info-card__icon { font-size: 2.5rem; margin-bottom: 12px; }
.info-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
}
.info-card__text {
  font-size: 0.95rem;
  color: var(--color-text-dim);
  line-height: 1.5;
}

/* ===== REACTION GAME (SCREEN 3) ===== */
.reaction-game { text-align: center; }
.reaction-game__field {
  width: 320px;
  height: 200px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  transition: background 0.2s;
  cursor: pointer;
  user-select: none;
  background: var(--color-surface);
  border: 2px solid rgba(255,255,255,0.06);
}
.reaction-game__field.waiting {
  background: #1a1030;
  border-color: var(--color-yellow);
}
.reaction-game__field.go {
  background: #0a2a1a;
  border-color: var(--color-green);
  cursor: pointer;
  animation: pulseGo 0.3s ease;
}
.reaction-game__field.result {
  background: var(--color-surface);
  border-color: var(--color-blue);
}
.reaction-game__field.tooEarly {
  background: #2a0a0a;
  border-color: var(--color-red);
}

@keyframes pulseGo {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.hidden { display: none !important; }

/* ===== ACCURACY GAME (SCREEN 4) ===== */
.accuracy-game { text-align: center; width: 100%; }
.accuracy-game__hud {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 1rem;
  font-family: var(--font-mono);
  padding: 10px 0;
}
.accuracy-game__field {
  width: 100%;
  height: 320px;
  background: var(--color-surface);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}
.accuracy-game__hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  font-size: 1rem;
}
.target {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-red) 30%, #7f1d1d 100%);
  border: 3px solid #fff;
  cursor: crosshair;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.15s;
  box-shadow: 0 0 15px rgba(239,68,68,0.5);
  animation: targetPop 0.2s ease;
}
.target:hover { transform: translate(-50%, -50%) scale(1.15); }

@keyframes targetPop {
  0% { transform: translate(-50%, -50%) scale(0); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* ===== MEMORY GAME (SCREEN 5) ===== */
.memory-game { text-align: center; }
.memory-game__sequence {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 20px;
}
.memory-game__sequence .seq-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: all 0.3s;
}

.memory-game__buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 300px;
  margin: 0 auto;
}

.memory-btn {
  width: 130px;
  height: 130px;
  border-radius: var(--radius);
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0.5;
}
.memory-btn.active { opacity: 1; }
.memory-btn.lit {
  opacity: 1;
  transform: scale(1.08);
  filter: brightness(1.3);
}
.memory-btn--red { background: #dc2626; border-color: #ef4444; }
.memory-btn--blue { background: #2563eb; border-color: #3b82f6; }
.memory-btn--green { background: #16a34a; border-color: #22c55e; }
.memory-btn--yellow { background: #ca8a04; border-color: #eab308; }

.memory-btn:hover:not(.lit) { opacity: 0.75; transform: scale(1.03); }
.memory-btn:active { transform: scale(0.95); }

.memory-game__status {
  margin-top: 16px;
  font-size: 1rem;
  color: var(--color-text-dim);
  min-height: 24px;
}
.memory-game__info {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-text-dim);
}

/* ===== SYSTEM GAME (SCREEN 6) ===== */
.system-game { text-align: center; width: 100%; }
.system-game__hud {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 16px;
}
.system-game__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.system-game__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-dim);
  letter-spacing: 0.06em;
}
.system-game__value {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
}
.system-game__lives { font-size: 1.5rem; letter-spacing: 2px; }

.system-game__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.system-game__actions .btn {
  font-size: 0.9rem;
  padding: 10px 20px;
}

.system-game__log {
  margin-top: 16px;
  max-height: 120px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-dim);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: left;
}
.system-game__log .log-entry { margin-bottom: 4px; }
.system-game__log .log-entry.good { color: var(--color-neon-green); }
.system-game__log .log-entry.bad { color: var(--color-red); }
.system-game__log .log-entry.info { color: var(--color-blue); }

/* ===== ESPORTS (SCREEN 7) ===== */
.esports { width: 100%; }
.esports__roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.role-card {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.role-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.role-card__icon { font-size: 2.2rem; margin-bottom: 8px; }
.role-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent);
}
.role-card p {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  line-height: 1.4;
}

.esports__timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 20px;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-left: 2px solid var(--color-purple);
  padding-left: 20px;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-purple);
  box-shadow: 0 0 10px rgba(168,85,247,0.5);
}
.timeline-item__content {
  font-size: 0.95rem;
  color: var(--color-text-dim);
}

/* ===== CODING (SCREEN 8) ===== */
.coding { width: 100%; text-align: center; }

.coding__grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.coding__item {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
}
.coding__emoji { font-size: 1.4rem; }

.coding__flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.flow-step {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.flow-step__icon { font-size: 1.6rem; }
.flow-step__text { font-size: 0.85rem; color: var(--color-text-dim); }
.flow-arrow {
  font-size: 1.5rem;
  color: var(--color-blue);
  font-weight: 700;
}

/* ===== BUILDER (SCREEN 9) ===== */
.builder { width: 100%; }
.builder__section { margin-bottom: 20px; }
.builder__label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.builder__options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.builder__btn {
  background: var(--color-surface);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.builder__btn:hover {
  border-color: var(--color-blue);
  background: rgba(0,212,255,0.08);
}
.builder__btn.selected {
  border-color: var(--color-blue);
  background: rgba(0,212,255,0.15);
  color: var(--color-blue);
  box-shadow: 0 0 15px rgba(0,212,255,0.2);
}

.builder__result-box {
  background: var(--color-surface);
  border: 2px solid var(--color-green);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 30px rgba(52,211,153,0.15);
  animation: fadeInUp 0.5s ease;
}
.builder__result-box h3 {
  color: var(--color-neon-green);
  margin-bottom: 8px;
  font-size: 1.2rem;
}
.builder__result-box p {
  font-size: 1rem;
  line-height: 1.6;
}

/* ===== FINAL SCREEN (SCREEN 10) ===== */
.final-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 600px;
}
.final-stat {
  background: var(--color-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}
.final-stat__value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--color-blue);
}
.final-stat__label {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  margin-top: 4px;
}

.final-summary {
  text-align: center;
}
.final-summary p {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-text-dim);
}

/* ===== EXPLANATION BOX ===== */
.explanation {
  width: 100%;
  animation: fadeInUp 0.4s ease;
}
.explanation__box {
  background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(168,85,247,0.06));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--radius);
  padding: 24px;
}
.explanation__box h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--color-blue);
}
.explanation__box p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-dim);
  margin-bottom: 8px;
}
.explanation__code {
  font-family: var(--font-mono);
  font-size: 0.85rem !important;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--color-neon-green) !important;
  white-space: pre-wrap;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== GAME WON/LOST OVERLAYS ===== */
.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,26,0.92);
  border-radius: var(--radius);
  z-index: 10;
  gap: 12px;
}
.game-overlay__title {
  font-size: 2rem;
  font-weight: 800;
}
.game-overlay__title.win { color: var(--color-neon-green); }
.game-overlay__title.lose { color: var(--color-red); }
.game-overlay__sub { color: var(--color-text-dim); font-size: 1rem; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-surface-light); border-radius: 3px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .slide { padding: 50px 20px 60px; }
  .cover__title { font-size: 2.2rem; }
  .slide__title { font-size: 1.6rem; }
  .cards-row { grid-template-columns: 1fr; }
  .esports__roles { grid-template-columns: 1fr 1fr; }
  .coding__flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .nav-btn { width: 40px; height: 40px; font-size: 0.9rem; }
  .nav-btn--back { left: 8px; }
  .nav-btn--next { right: 8px; }
  .reaction-game__field { width: 260px; height: 160px; }
  .memory-btn { width: 100px; height: 100px; }
  .accuracy-game__field { height: 240px; }
}