/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #060633;
  --blue:   #0d1b8e;
  --blue2:  #1a2fb8;
  --gold:   #f5c518;
  --gold2:  #ffd85c;
  --white:  #ffffff;
  --grey:   #7a8ab8;
  --done:   #1e1e3a;
  --right:  #27ae60;
  --wrong:  #c0392b;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(0,0,0,.55);
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--navy);
  color: var(--white);
}

/* ── Screen management ──────────────────────────────────── */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, filter .1s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-right {
  background: var(--right);
  color: var(--white);
  font-size: 1.2rem;
  padding: 16px 48px;
}
.btn-right:hover { filter: brightness(1.15); }

.btn-wrong {
  background: var(--wrong);
  color: var(--white);
  font-size: 1.2rem;
  padding: 16px 48px;
}
.btn-wrong:hover { filter: brightness(1.15); }

/* ── START SCREEN ───────────────────────────────────────── */
.start-inner {
  text-align: center;
  padding: 40px 24px;
  max-width: 560px;
}

.flower-row {
  font-size: 2rem;
  letter-spacing: .2em;
  margin-bottom: 20px;
}

#start-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(245,197,24,.4);
  line-height: 1.2;
  margin-bottom: 14px;
}

#start-subtitle {
  font-size: 1.1rem;
  color: var(--grey);
  margin-bottom: 40px;
  line-height: 1.5;
}

/* ── BOARD SCREEN ───────────────────────────────────────── */
#screen-board {
  display: none;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}
#screen-board.active {
  display: flex;
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--blue);
  padding: 12px 20px;
  font-size: 1rem;
  border-bottom: 3px solid var(--gold);
}

#board-title {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
}

.score-display {
  font-size: 1rem;
  color: var(--white);
}
.score-display strong {
  color: var(--gold);
  font-size: 1.25rem;
}

/* The grid: 5 cols (categories) + 1 row of headers */
.board-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: auto repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  flex: 1;
  min-height: 0;
}

.category-header {
  background: var(--blue2);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 6px;
  font-size: clamp(.65rem, 1.5vw, .9rem);
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .04em;
  min-height: 60px;
}

.tile {
  background: var(--blue2);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 900;
  color: var(--gold);
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  min-height: 70px;
  box-shadow: var(--shadow);
  user-select: none;
}

.tile:hover:not(.tile-done) {
  background: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,.7);
}

.tile:active:not(.tile-done) {
  transform: translateY(0);
}

.tile-done {
  background: var(--done);
  color: var(--grey);
  cursor: default;
  box-shadow: none;
  font-size: 1.4rem;
}

/* ── ANSWER / QUESTION SCREENS ──────────────────────────── */
#screen-answer.active,
#screen-question.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-screen {
  background: var(--blue2);
  border: 3px solid var(--gold);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.card-meta span:first-child {
  font-size: .85rem;
  color: var(--grey);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.points-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: .95rem;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.answer-content,
.question-content {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.55;
  color: var(--white);
  width: 100%;
}

.question-content video {
  width: 100%;
  max-height: 280px;
  border-radius: 10px;
  object-fit: contain;
  margin-bottom: 16px;
  display: block;
}

.question-content p {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.55;
}

.answer-content img {
  max-width: 100%;
  max-height: 340px;
  border-radius: 10px;
  object-fit: contain;
}

.answer-content video {
  max-width: 100%;
  max-height: 340px;
  border-radius: 10px;
}

.verdict-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── END SCREEN ─────────────────────────────────────────── */
.end-inner {
  text-align: center;
  padding: 40px 24px;
  max-width: 560px;
  width: 100%;
}

.end-inner h2 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--gold);
  margin-bottom: 4px;
}

.final-score-label {
  color: var(--grey);
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 20px;
}

.final-score-value {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 32px;
  text-shadow: 0 2px 16px rgba(245,197,24,.5);
}

.end-inner h3 {
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.prize-list {
  list-style: none;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prize-list li {
  background: var(--done);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 1rem;
  color: var(--grey);
  transition: background .2s;
}

.prize-list li .prize-range {
  font-size: .75rem;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.prize-list li.prize-winner {
  background: var(--blue2);
  border-color: var(--gold);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(245,197,24,.35);
}

.prize-list li.prize-winner .prize-range {
  color: var(--gold2);
}

/* ── Responsive tweaks ──────────────────────────────────── */
@media (max-width: 600px) {
  .board-grid {
    gap: 4px;
    padding: 6px;
  }
  .tile { min-height: 54px; }
  .category-header { min-height: 50px; padding: 6px 4px; }
  .card-screen { padding: 24px 18px; }
  .verdict-buttons .btn { padding: 14px 28px; }
}
