/* HSLatin Game Page Styles */

:root {
  --game-bg: #f5f0e8;
  --navy: #0C2340;
  --gold: #AE9142;
  --gold-hover: #957b36;
  --correct: #22c55e;
  --incorrect: #ef4444;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'Crimson Text', Georgia, serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--game-bg);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav (inherits from main.css home-nav) ── */
.game-header-wrap {
  background: var(--navy);
}
body .game-header-wrap .home-nav {
  justify-content: space-between;
}

/* ── Main ── */
.game-main {
  flex: 1;
  padding: 2rem 1rem;
}
.container { max-width: 860px; margin: 0 auto; }

/* ── Game Title ── */
.game-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.game-subtitle {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 0;
}
#screen-select .text-center {
  margin-bottom: 2rem !important;
}

/* ── Game Cards ── */
#screen-select .row > [class*="col"] {
  margin-bottom: 1rem;
}
.game-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 2.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.game-card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.game-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.game-card p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

/* ── EK Reference Accordion ── */
.ek-reference { margin-top: 2rem; }
.ek-reference-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.ek-reference .accordion-button {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--card-bg);
}
.ek-reference .accordion-button:not(.collapsed) {
  color: var(--navy);
  background: #f0ece4;
  box-shadow: none;
}
.ek-reference .accordion-button:focus { box-shadow: 0 0 0 0.2rem rgba(174,145,66,0.3); }
.ek-reference .accordion-item { margin-bottom: 0.5rem; border-radius: 8px; overflow: hidden; }
.ek-reference .accordion-body { font-size: 0.95rem; line-height: 1.6; }
.ek-code {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}

/* ── Filter Panel ── */
.filter-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.filter-panel {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}
.filter-panel .form-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}
.filter-panel .form-check-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.filter-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}
.pool-warning {
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #856404;
}

/* ── Gold Button ── */
.btn-gold {
  background: var(--gold);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
}
.btn-gold:hover { background: var(--gold-hover); color: #fff; }
.btn-gold.btn-gold-lg {
  padding: 0.5rem 3rem;
  display: block;
  margin: 0 auto;
}

/* ── Play Header ── */
.play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.play-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
}

/* ── Vocabulary Match ── */
.match-board {
  display: flex;
  gap: 2rem;
  justify-content: center;
}
.match-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
}
.match-tile {
  background: var(--card-bg);
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.match-tile:hover { border-color: var(--gold); }
.match-tile.selected { border-color: var(--gold); background: #fdf6e3; }
.match-tile.matched {
  border-color: var(--correct);
  background: #f0fdf4;
  cursor: default;
  opacity: 0.85;
}
.match-tile.wrong {
  border-color: var(--incorrect);
  background: #fef2f2;
}
.match-tile .match-latin-text { font-style: italic; }
.match-status {
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  min-height: 1.5em;
}

/* ── Multiple Choice ── */
.quiz-prompt {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.quiz-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card-bg);
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: var(--font-body);
}
.choice-btn:hover { border-color: var(--gold); }
.choice-btn.correct { border-color: var(--correct); background: #f0fdf4; }
.choice-btn.incorrect { border-color: var(--incorrect); background: #fef2f2; }
.choice-btn.disabled { pointer-events: none; }
.quiz-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.quiz-feedback.correct { background: #f0fdf4; color: #166534; }
.quiz-feedback.incorrect { background: #fef2f2; color: #991b1b; }

/* ── Fill in the Blank ── */
.fill-sentence {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-style: italic;
}
.fill-hint {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
}
.fill-input-row {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
}
.fill-answer {
  font-family: var(--font-body);
  font-size: 1.05rem;
}
.fill-answer.correct { border-color: var(--correct); background: #f0fdf4; }
.fill-answer.incorrect { border-color: var(--incorrect); background: #fef2f2; }
.fill-feedback {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.fill-feedback.correct { color: #166534; }
.fill-feedback.incorrect { color: #991b1b; }

/* ── Footer ── */
.game-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .game-title { font-size: 1.5rem; }
  .match-board { flex-direction: column; gap: 1rem; }
  .match-column { min-width: unset; }
  .fill-input-row { max-width: 100%; }
  .game-nav-links { gap: 0.75rem; }
  .game-nav-links a { font-size: 0.8rem; }
}
