/* ─── Reset & Base ─────────────────────────────────────────────────────────── */

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

:root {
  --bg:          #0A0A0F;
  --bg-panel:    #12121A;
  --bg-card:     #1A1A28;
  --gold:        #C8A84B;
  --gold-light:  #E8C96A;
  --gold-dark:   #8B6E2A;
  --text:        #E8DCC8;
  --text-dim:    #9A8E7A;
  --border:      rgba(200, 168, 75, 0.25);
  --glow:        rgba(200, 168, 75, 0.15);
  --font-title:  'Cinzel', serif;
  --font-body:   'Crimson Text', serif;
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Stars background ─────────────────────────────────────────────────────── */

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(200,168,75,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 30%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 75%, rgba(200,168,75,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 50%, rgba(200,168,75,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 90%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 45%, rgba(200,168,75,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 5%,  rgba(255,255,255,0.3) 0%, transparent 100%);
}

/* ─── Screen system ────────────────────────────────────────────────────────── */

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: fadeIn 0.4s ease;
}

.screen.hidden {
  display: none;
}

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

/* ─── START SCREEN ─────────────────────────────────────────────────────────── */

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

.title-badge {
  font-family: var(--font-title);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 4px 16px;
  border-radius: 2px;
}

.main-title {
  font-family: var(--font-title);
  text-align: center;
  line-height: 1.1;
}

.title-teemo {
  display: block;
  font-size: clamp(2rem, 8vw, 3.5rem);
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.2em;
}

.title-akinator {
  display: block;
  font-size: clamp(2.8rem, 12vw, 5.5rem);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 0 40px rgba(200,168,75,0.5), 0 0 80px rgba(200,168,75,0.2);
}

.teemo-start-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 400px;
}

.teemo-splash-start {
  width: 100%;
  max-width: 340px;
  border-radius: 8px;
  border: 2px solid var(--border);
  box-shadow: 0 0 40px rgba(200,168,75,0.15);
  object-fit: cover;
  aspect-ratio: 16/9;
  display: block;
}

/* ─── Speech Bubble ────────────────────────────────────────────────────────── */

.speech-bubble {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  width: 100%;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--border);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--bg-card);
}

.start-bubble {
  max-width: 340px;
  text-align: center;
}

/* ─── Primary Button ───────────────────────────────────────────────────────── */

.btn-primary {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  border: none;
  border-radius: 4px;
  padding: 14px 36px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 20px rgba(200,168,75,0.4);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200,168,75,0.6);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.1em;
}

/* ─── GAME SCREEN ──────────────────────────────────────────────────────────── */

#screen-game {
  justify-content: flex-start;
  padding-top: 0;
}

.game-header {
  width: 100%;
  text-align: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.game-title {
  font-family: var(--font-title);
  font-size: clamp(1rem, 4vw, 1.4rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 20px rgba(200,168,75,0.3);
}

.game-main {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  width: 100%;
  max-width: 960px;
  padding: 32px 24px;
  flex: 1;
}

/* ─── Teemo column ─────────────────────────────────────────────────────────── */

.teemo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 260px;
  flex-shrink: 0;
}

.teemo-frame {
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(200,168,75,0.1);
  width: 100%;
}

.teemo-splash {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform 0.3s ease;
}

.teemo-frame:hover .teemo-splash {
  transform: scale(1.03);
}

.game-bubble {
  text-align: left;
  font-size: 0.95rem;
  min-height: 64px;
}

.game-bubble::before,
.game-bubble::after {
  top: auto;
  bottom: -10px;
  border-top-color: var(--border);
  border-bottom-color: transparent;
}

.game-bubble::after {
  bottom: -8px;
  border-top-color: var(--bg-card);
  border-bottom-color: transparent;
}

/* ─── Question column ──────────────────────────────────────────────────────── */

.question-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  max-width: 520px;
}

.question-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.q-label {
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.q-counter {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--gold);
}

.q-sep {
  color: var(--text-dim);
  margin: 0 2px;
}

.question-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: inset 0 1px 0 rgba(200,168,75,0.08);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.question-box.fading {
  opacity: 0;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.5;
}

/* ─── Guess reveal ─────────────────────────────────────────────────────────── */

.guess-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: popIn 0.3s ease;
}

.guess-reveal.hidden {
  display: none;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.guess-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 20px rgba(200,168,75,0.4);
  object-fit: cover;
}

.guess-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* ─── Answer buttons ───────────────────────────────────────────────────────── */

.answer-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-answer {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 2px solid;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 100px;
  justify-content: center;
  background: transparent;
}

.btn-answer-icon {
  font-size: 1.1em;
}

.btn-yes {
  color: #5DDB7C;
  border-color: #5DDB7C;
}

.btn-yes:hover {
  background: rgba(93, 219, 124, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(93, 219, 124, 0.3);
}

.btn-no {
  color: #E05A5A;
  border-color: #E05A5A;
}

.btn-no:hover {
  background: rgba(224, 90, 90, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(224, 90, 90, 0.3);
}

.btn-unknown {
  color: var(--text-dim);
  border-color: rgba(154,142,122,0.5);
}

.btn-unknown:hover {
  background: rgba(154, 142, 122, 0.1);
  transform: translateY(-2px);
  color: var(--text);
  border-color: var(--text-dim);
}

.btn-answer:active {
  transform: translateY(0) scale(0.97);
}

.btn-answer:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ─── Progress bar ─────────────────────────────────────────────────────────── */

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(200,168,75,0.12);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
  box-shadow: 0 0 8px rgba(200,168,75,0.4);
}

.progress-label {
  font-family: var(--font-title);
  font-size: 0.65rem;
  color: var(--gold-dark);
  min-width: 32px;
  text-align: right;
}

/* ─── RESULT SCREENS ───────────────────────────────────────────────────────── */

.result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.result-badge {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 8px 28px;
  border-radius: 4px;
  text-transform: uppercase;
}

.correct-badge {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(200,168,75,0.7);
  border: 2px solid var(--gold);
  background: rgba(200,168,75,0.08);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(200,168,75,0.3); }
  50%       { box-shadow: 0 0 40px rgba(200,168,75,0.6); }
}

.giveup-badge {
  color: var(--text-dim);
  border: 2px solid rgba(154,142,122,0.3);
}

.result-champion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.result-splash {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 50px rgba(200,168,75,0.3);
  object-fit: cover;
  aspect-ratio: 16/9;
}

.result-champion-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-icon {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid var(--gold);
}

.result-name {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--gold);
  font-weight: 700;
}

.result-bubble {
  max-width: 460px;
  text-align: center;
  font-size: 1.05rem;
}

.result-bubble::before,
.result-bubble::after {
  top: -10px;
  bottom: auto;
  border-bottom-color: var(--border);
  border-top-color: transparent;
}

.result-bubble::after {
  top: -8px;
  border-bottom-color: var(--bg-card);
  border-top-color: transparent;
}

.teemo-frame-sad {
  width: 260px;
}

.teemo-sad {
  filter: grayscale(30%) brightness(0.8);
}

/* ─── Particles ────────────────────────────────────────────────────────────── */

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: particle-fall var(--dur, 1.5s) var(--delay, 0s) ease-in forwards;
  opacity: 0;
}

@keyframes particle-fall {
  0%   { opacity: 1; transform: translateY(-20px) scale(1) rotate(0deg); }
  80%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(100vh) scale(0.3) rotate(360deg); }
}

/* ─── Typewriter cursor ────────────────────────────────────────────────────── */

.typing::after {
  content: '|';
  animation: blink 0.7s step-start infinite;
  color: var(--gold);
  font-weight: 400;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .game-main {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 16px;
  }

  .teemo-col {
    width: 100%;
    max-width: 360px;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .teemo-frame {
    width: 140px;
    flex-shrink: 0;
  }

  .game-bubble {
    flex: 1;
  }

  .game-bubble::before,
  .game-bubble::after {
    display: none;
  }

  .question-col {
    width: 100%;
    max-width: 100%;
  }

  .answer-buttons {
    gap: 8px;
  }

  .btn-answer {
    padding: 10px 16px;
    min-width: 80px;
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .teemo-col {
    flex-direction: column;
  }

  .teemo-frame {
    width: 100%;
  }
}
