/* =============================================
   MULTIPLICATION SOCCER - Kid-Friendly Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --green-dark:   #1a7a2e;
  --green-mid:    #22a83d;
  --green-light:  #2ecc71;
  --yellow:       #f9c22b;
  --orange:       #ff7e2e;
  --red:          #e74c3c;
  --blue:         #3498db;
  --purple:       #9b59b6;
  --white:        #ffffff;
  --light-bg:     #f0fdf4;
  --card-bg:      #ffffff;
  --shadow:       0 4px 20px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 50%, var(--green-light) 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* ── LANDING PAGE ── */
.hero-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 40px 50px;
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  color: var(--green-dark);
  margin-bottom: 8px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 28px;
}

.how-to-play {
  background: var(--light-bg);
  border-radius: 16px;
  padding: 20px 24px;
  text-align: left;
  margin-bottom: 28px;
}

.how-to-play h3 {
  font-family: 'Fredoka One', cursive;
  color: var(--green-dark);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.how-to-play li {
  margin-bottom: 8px;
  font-size: 0.98rem;
  color: #333;
  line-height: 1.5;
}

.btn-start-big {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  padding: 16px 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34,168,61,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-block;
  text-decoration: none;
}

.btn-start-big:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(34,168,61,0.5);
  color: var(--white);
}

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

/* ── GAME SCREEN ── */
#gameWrapper {
  min-height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ── HEADER BAR ── */
.game-header {
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.game-title-small {
  font-family: 'Fredoka One', cursive;
  color: var(--white);
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.round-badge {
  background: var(--yellow);
  color: #222;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  padding: 6px 18px;
  border-radius: 50px;
}

.score-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.score-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 6px 18px;
  min-width: 80px;
}

.score-player .p-name {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.score-player .p-score {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  color: var(--white);
  line-height: 1;
}

.score-player.p1-color { border: 3px solid #ff8a80; }
.score-player.p2-color { border: 3px solid #80d8ff; }

.score-vs {
  font-family: 'Fredoka One', cursive;
  color: var(--yellow);
  font-size: 1.2rem;
}

/* ── MAIN GAME AREA ── */
.game-main {
  flex: 1;
  display: flex;
  gap: 0;
  padding: 16px;
  align-items: flex-start;
}

/* ── CANVAS ── */
#gameCanvas {
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: block;
  width: 100%;
  max-width: 580px;
}

/* ── SIDE PANEL ── */
.side-panel {
  flex: 1;
  max-width: 340px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: 16px;
}

/* ── TURN BANNER ── */
.turn-banner {
  background: var(--white);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.turn-banner .who {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.turn-banner .role-tag {
  display: inline-block;
  font-family: 'Fredoka One', cursive;
  font-size: 0.9rem;
  padding: 2px 14px;
  border-radius: 50px;
  color: var(--white);
}

.role-tag.shooter { background: #e74c3c; }
.role-tag.goalie  { background: #3498db; }

/* ── COUNTDOWN ── */
#countdownBox {
  background: var(--yellow);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  display: none;
}

.countdown-label {
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  color: #555;
  margin-bottom: 4px;
}

.countdown-num {
  font-family: 'Fredoka One', cursive;
  font-size: 4rem;
  color: var(--green-dark);
  line-height: 1;
}

/* ── QUESTION CARD ── */
.question-card {
  background: var(--white);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.question-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.question-display {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  color: var(--green-dark);
  line-height: 1.1;
  margin-bottom: 16px;
}

.question-display .q-num {
  color: var(--orange);
}

.question-display .q-answer {
  color: #bbb;
}

.question-display .q-answer.revealed {
  color: #e53935;
  font-size: 3.4rem;
  animation: popAnswer 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popAnswer {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── TIMER BAR ── */
.timer-section {
  margin-bottom: 12px;
}

.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.timer-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: #666;
}

.timer-num {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
  min-width: 2.8ch;
  text-align: right;
  display: inline-block;
}

.timer-bar-bg {
  background: #e8e8e8;
  border-radius: 50px;
  height: 12px;
  overflow: hidden;
}

.timer-bar-fill {
  background: linear-gradient(90deg, var(--green-light), var(--yellow), var(--red));
  height: 100%;
  border-radius: 50px;
  transition: width 0.09s linear;
  width: 100%;
}

/* ── ANSWER INPUT ── */
#answerInput {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem;
  text-align: center;
  border: 3px solid #ddd;
  border-radius: 14px;
  padding: 10px;
  width: 100%;
  transition: border-color 0.2s;
  outline: none;
  color: #333;
  background: #fafafa;
  margin-bottom: 10px;
}

#answerInput:focus {
  border-color: var(--green-mid);
  background: var(--white);
}

#answerInput:disabled {
  background: #f0f0f0;
  color: #bbb;
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--orange), #f39c12);
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255,126,46,0.4);
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(255,126,46,0.5);
}

.btn-submit:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

/* ── FEEDBACK ── */
#feedbackBox {
  border-radius: 14px;
  padding: 12px 16px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  text-align: center;
  display: none;
}

.feedback-correct  { background: #d4edda; color: #155724; }
.feedback-wrong    { background: #f8d7da; color: #721c24; }
.feedback-waiting  { background: #fff3cd; color: #856404; }
.feedback-goal     { background: #d4edda; color: #155724; }
.feedback-block    { background: #cce5ff; color: #004085; }

/* ── ROLE SELECTION ── */
#roleSelection {
  background: var(--white);
  border-radius: 24px;
  max-width: 620px;
  margin: 40px auto;
  padding: 40px 40px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}

.role-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.role-subtitle {
  color: #777;
  margin-bottom: 28px;
  font-size: 1rem;
}

.player-role-card {
  border-radius: 18px;
  padding: 24px 20px;
  margin-bottom: 12px;
}

.player-role-card.p1 { background: #fff0f0; border: 3px solid #ff8a80; }
.player-role-card.p2 { background: #e3f2fd; border: 3px solid #80d8ff; }

.player-role-card h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.p1 h3 { color: #c62828; }
.p2 h3 { color: #1565c0; }

.role-select {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid #ddd;
  padding: 8px 14px;
  width: 100%;
  background: #fff;
  color: #333;
  font-weight: 700;
  cursor: pointer;
}

.role-select:focus { outline: none; border-color: var(--green-mid); }

/* ── Operation picker ── */
.op-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.op-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 7px 16px;
  border-radius: 50px;
  border: 2px solid #ddd;
  background: #f5f5f5;
  color: #555;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.op-btn:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}
.op-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn-begin {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  padding: 14px 48px;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34,168,61,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-begin:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(34,168,61,0.5);
}

/* ── END GAME OVERLAY ── */
#endGameOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.end-card {
  background: var(--white);
  border-radius: 24px;
  padding: 44px 50px;
  text-align: center;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.end-trophy { font-size: 4.5rem; margin-bottom: 8px; }

.end-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}

.end-winner {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--orange);
  margin-bottom: 20px;
}

.end-scores {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 28px;
}

.end-score-box {
  border-radius: 14px;
  padding: 14px 24px;
  flex: 1;
}

.end-score-box.p1 { background: #fff0f0; border: 2px solid #ff8a80; }
.end-score-box.p2 { background: #e3f2fd; border: 2px solid #80d8ff; }

.end-score-box .ep-name {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #555;
}

.end-score-box .ep-score {
  font-family: 'Fredoka One', cursive;
  font-size: 2.8rem;
  color: #222;
  line-height: 1;
}

.btn-play-again {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  padding: 14px 44px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34,168,61,0.4);
  transition: transform 0.15s;
}

.btn-play-again:hover {
  transform: translateY(-2px) scale(1.03);
}

/* ── ROUND RESULT FLASH ── */
#roundResultFlash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--white);
  border-radius: 20px;
  padding: 28px 44px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 500;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
  opacity: 0;
}

#roundResultFlash.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.flash-icon { font-size: 3rem; }
.flash-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  margin: 6px 0;
}
.flash-detail { font-size: 0.95rem; color: #666; }

/* ── MODE CARDS (index.html) ── */
.mode-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border-radius: 18px;
  padding: 18px 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 3px 14px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}

.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  color: #333;
}

.mode-online { border-color: #1e88e5; }
.mode-pass   { border-color: #f9a825; }
.mode-local  { border-color: #43a047; }

.mode-icon { font-size: 2.2rem; flex-shrink: 0; }
.mode-info { flex: 1; text-align: left; }
.mode-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  margin-bottom: 2px;
}
.mode-desc { font-size: 0.85rem; color: #666; line-height: 1.4; }
.mode-arrow { font-size: 1.4rem; color: #bbb; flex-shrink: 0; }

/* ── PASS-AND-PLAY HANDOFF OVERLAY ── */
.handoff-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,122,46,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
}

.handoff-card {
  text-align: center;
  color: var(--white);
  padding: 40px;
}

.handoff-icon { font-size: 4rem; margin-bottom: 10px; }
.handoff-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.handoff-sub {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 20px;
}
.handoff-countdown {
  font-family: 'Fredoka One', cursive;
  font-size: 5rem;
  color: var(--yellow);
  line-height: 1;
}

/* ── SPINNER ── */
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(34,168,61,0.2);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── ROLE PICK BUTTONS (online lobby) ── */
.role-pick-btn {
  border: 3px solid #ddd;
  border-radius: 18px;
  background: var(--white);
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  padding: 20px 32px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  color: #333;
  min-width: 110px;
}

.role-pick-btn:hover:not(:disabled) {
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.role-pick-btn[data-role="shooter"] { border-color: #e53935; }
.role-pick-btn[data-role="shooter"]:hover:not(:disabled) { background: #fff0f0; }
.role-pick-btn[data-role="goalie"]  { border-color: #1e88e5; }
.role-pick-btn[data-role="goalie"]:hover:not(:disabled)  { background: #e3f2fd; }
.role-pick-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── ONLINE COUNTDOWN BOX (reuse styles) ── */
#onlineCountdownBox {
  background: var(--yellow);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   PROFILE / USERNAME
───────────────────────────────────────────────────────────── */
.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f8f8;
  border: 2px solid #eee;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.profile-label {
  font-weight: 800;
  font-size: 0.88rem;
  color: #555;
  white-space: nowrap;
}
.profile-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.profile-input {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 6px 12px;
  flex: 1;
  min-width: 0;
  background: #fff;
  color: #333;
}
.profile-input:focus { outline: none; border-color: var(--green-mid); }
.profile-saved-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green-mid);
  white-space: nowrap;
}

/* ── mode-tt card colour ── */
.mode-tt { background: linear-gradient(135deg, #fff8e1, #fff3cd); border-left: 4px solid var(--yellow); }
.mode-tt:hover { border-left-color: var(--orange); }

/* ─────────────────────────────────────────────────────────────
   TIME TRIAL
───────────────────────────────────────────────────────────── */
.tt-label {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 6px;
}

.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--green-dark);
  color: #fff;
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 10px;
}
.tt-progress {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
}
.tt-clock {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
  color: var(--yellow);
}

.tt-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.tt-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0e0e0;
  border: 2px solid #ccc;
  display: inline-block;
  transition: background 0.25s, border-color 0.25s;
}
.tt-dot-correct { background: var(--green-mid); border-color: var(--green-dark); }
.tt-dot-wrong   { background: var(--red);       border-color: #c62828; }

.tt-question-card { margin-bottom: 0; }

.tt-result-box {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  border-radius: 16px;
  padding: 20px 16px;
  margin: 16px 0;
  text-align: center;
  color: #fff;
}
.tt-result-time {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tt-result-label {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.85;
  margin-top: 4px;
}
.tt-rank-banner {
  background: linear-gradient(135deg, #fff3cd, #ffe082);
  border: 2px solid var(--yellow);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 1rem;
  color: #7b5800;
  text-align: center;
}

/* Feedback banner inside question card */
.feedback-banner {
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 8px;
  text-align: center;
}
.feedback-correct { background: #e8f5e9; color: #2e7d32; }
.feedback-wrong   { background: #ffebee; color: #c62828; }

/* ─────────────────────────────────────────────────────────────
   LEADERBOARD
───────────────────────────────────────────────────────────── */
.lb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.lb-tab {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  border: 2px solid #ddd;
  background: #f5f5f5;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lb-tab:hover { border-color: var(--green-mid); color: var(--green-mid); }
.lb-tab.active { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Nunito', sans-serif;
}
.lb-table thead th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-bottom: 2px solid #eee;
}
.lb-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.12s;
}
.lb-table tbody tr:hover { background: #f8f8f8; }
.lb-table tbody tr.lb-top { background: #fffde7; }
.lb-rank { font-size: 1.1rem; text-align: center; width: 40px; padding: 8px 4px; }
.lb-name { font-weight: 800; font-size: 0.95rem; padding: 8px 6px; color: #333; }
.lb-time {
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
  padding: 8px 6px;
}
.lb-date { font-size: 0.78rem; color: #aaa; padding: 8px 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .game-main { flex-direction: column; }
  .side-panel { max-width: 100%; min-width: unset; margin-left: 0; margin-top: 12px; }
  #gameCanvas { max-width: 100%; }
  .hero-title { font-size: 2.2rem; }
  .hero-card { padding: 28px 22px; }
}
