/* =========================================
   Palabra Relámpago — styles.css
   Mobile-first playful design
   ========================================= */

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

/* ── CSS Variables ── */
:root {
  --bg: #f0f7ee;
  --surface: #ffffff;
  --primary: #6c63ff;
  --primary-dark: #574fd6;
  --hit: #27ae60;
  --hit-light: #2ecc71;
  --pass: #e67e22;
  --pass-light: #f39c12;
  --danger: #e74c3c;
  --warning: #f39c12;
  --text: #2d3436;
  --text-muted: #636e72;
  --card-bg: #ffffff;
  --shadow: 0 8px 32px rgba(108, 99, 255, 0.15);
  --shadow-lg: 0 16px 48px rgba(108, 99, 255, 0.2);
  --radius: 20px;
  --radius-lg: 28px;
  --font-display: 'Fredoka One', cursive;
  --font-body: 'Quicksand', sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* ── Screen System ── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  padding: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* ── Background Blobs ── */
.bg-blobs {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
}

.blob-1 {
  width: 300px; height: 300px;
  background: var(--primary);
  top: -80px; left: -80px;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-2 {
  width: 250px; height: 250px;
  background: var(--hit-light);
  bottom: 100px; right: -60px;
  animation: blobFloat 10s ease-in-out infinite reverse;
}

.blob-3 {
  width: 200px; height: 200px;
  background: var(--pass);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: blobFloat 12s ease-in-out infinite 2s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.97); }
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); }

/* ── Buttons ── */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  border-radius: var(--radius);
  padding: 16px 32px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(108, 99, 255, 0.5);
}

.btn-ghost {
  background: rgba(255,255,255,0.6);
  color: var(--text-muted);
  border: 2px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.85);
}

.btn-full {
  width: 100%;
}

/* ═══════════════════════════════════════════
   SCREEN 1 — HOME
═══════════════════════════════════════════ */

#screen-home {
  position: relative;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 32px;
  overflow: hidden;
}

.logo-container {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}

.logo-bolt {
  font-size: 70px;
  display: block;
  animation: boltPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(108,99,255,0.4));
}

@keyframes boltPulse {
  0%, 100% { transform: scale(1) rotate(-5deg); }
  50% { transform: scale(1.08) rotate(5deg); }
}

.logo-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  color: var(--primary);
  text-shadow: 0 2px 0 rgba(108,99,255,0.25), 0 4px 20px rgba(108,99,255,0.2);
  line-height: 1.1;
  margin-bottom: 6px;
}

.logo-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 48px;
}

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 300px;
  z-index: 1;
}

#btn-play {
  font-size: 1.3rem;
  padding: 20px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  letter-spacing: 0.05em;
}

.floating-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.float-card {
  position: absolute;
  width: 56px; height: 72px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  animation: floatCard linear infinite;
  opacity: 0.7;
}

@keyframes floatCard {
  0% { transform: translateY(0) rotate(var(--rot, 8deg)); }
  50% { transform: translateY(-20px) rotate(calc(var(--rot, 8deg) * -0.5)); }
  100% { transform: translateY(0) rotate(var(--rot, 8deg)); }
}

/* ═══════════════════════════════════════════
   SCREEN 2 — SETUP
═══════════════════════════════════════════ */

#screen-setup {
  padding: 0;
}

.setup-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 48px 28px 32px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.setup-header h2 {
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.setup-header p {
  opacity: 0.85;
  font-weight: 600;
}

.setup-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.setup-section-label {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.team-count-selector {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.count-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.count-btn:active { transform: scale(0.9); }

#teams-count {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
  flex: 1;
}

#team-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-emoji {
  font-size: 1.6rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.team-name-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 2px solid rgba(0,0,0,0.08);
  background: white;
  color: var(--text);
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.2s;
}

.team-name-input:focus {
  border-color: var(--team-color, var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color, var(--primary)) 15%, transparent);
}

.setup-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

/* ═══════════════════════════════════════════
   SCREEN 3 — PREP
═══════════════════════════════════════════ */

#screen-prep {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  text-align: center;
  gap: 20px;
}

.prep-round-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  color: white;
  font-family: var(--font-display);
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.prep-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 360px;
}

.prep-round-name {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.prep-divider {
  height: 3px;
  border-radius: 4px;
  margin: 16px 0;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08), transparent);
}

.prep-team-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.prep-team-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.prep-rules-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════════
   SCREEN 4 — GAME BOARD
═══════════════════════════════════════════ */

#screen-game {
  padding: 0;
  position: relative;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  background: white;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.game-round-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cards-counter {
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  color: var(--primary);
}

/* Timer */
.timer-area {
  display: flex;
  justify-content: center;
  padding: 20px 20px 8px;
}

.timer-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: rgba(0,0,0,0.06);
  stroke-width: 8;
}

.timer-ring-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 282.74; /* 2 * PI * 45 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.9s linear, stroke 0.5s ease;
}

.timer-ring-progress.ring-warning {
  stroke: var(--warning);
}

.timer-ring-progress.ring-danger {
  stroke: var(--danger);
}

.timer-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
}

.timer-wrapper {
  position: relative;
  display: inline-block;
}

.timer-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  transition: color 0.5s ease;
  line-height: 1;
}

.timer-text.timer-warning { color: var(--warning); }
.timer-text.timer-danger {
  color: var(--danger);
  animation: timerPulse 0.5s ease-in-out infinite alternate;
}

@keyframes timerPulse {
  from { transform: translate(-50%, -50%) rotate(90deg) scale(1); }
  to { transform: translate(-50%, -50%) rotate(90deg) scale(1.15); }
}

/* Team display */
.current-team-display {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0 20px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.score-badge {
  background: var(--primary);
  color: white;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

/* Word Card */
.word-card-wrapper {
  padding: 12px 24px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.word-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}

.word-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--hit-light), var(--pass));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.word-card.card-animate {
  animation: cardSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px) rotate(3deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}

#game-card-word {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.01em;
  transition: font-size 0.2s;
}

/* Game Controls */
.game-controls {
  display: flex;
  gap: 14px;
  padding: 12px 20px 28px;
}

.btn-game {
  flex: 1;
  padding: 20px 16px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: white;
  transition: transform 0.12s, box-shadow 0.12s;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-game::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity 0.15s;
}

.btn-game:active::after { opacity: 1; }
.btn-game:active { transform: scale(0.96); }

.btn-hit-game {
  background: linear-gradient(135deg, var(--hit), var(--hit-light));
  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-pass-game {
  background: linear-gradient(135deg, #d35400, var(--pass));
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.btn-game-label {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-top: 4px;
}

/* Times Up Overlay */
.times-up-overlay {
  position: fixed;
  inset: 0;
  background: rgba(231, 76, 60, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
}

.times-up-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.times-up-emoji {
  font-size: 80px;
  animation: timesUpBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.times-up-text {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: white;
  margin-top: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

@keyframes timesUpBounce {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ═══════════════════════════════════════════
   SCREEN 5 — RESULTS
═══════════════════════════════════════════ */

#screen-results {
  padding: 0;
}

.results-header {
  background: linear-gradient(135deg, #2d3436, var(--text));
  color: white;
  padding: 48px 28px 32px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  text-align: center;
}

.results-header h2 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.results-body {
  padding: 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#scores-table {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.score-header-row {
  display: grid;
  grid-template-columns: 1fr repeat(4, auto);
  gap: 4px;
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr repeat(4, auto);
  gap: 4px;
  padding: 14px 16px;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.2s;
}

.score-row:last-child { border-bottom: none; }

.score-row-first {
  background: linear-gradient(90deg, rgba(108,99,255,0.06), transparent);
}

.score-cell {
  text-align: center;
  font-weight: 700;
  min-width: 36px;
}

.score-cell-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.total-col {
  color: var(--primary);
  font-size: 1.1rem;
}

.rank-badge {
  font-size: 1.2rem;
}

.results-actions {
  padding: 0 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ═══════════════════════════════════════════
   SCREEN 6 — PODIUM
═══════════════════════════════════════════ */

#screen-podium {
  position: relative;
  overflow: hidden;
  align-items: center;
  text-align: center;
  padding: 40px 28px 32px;
  gap: 20px;
  background: linear-gradient(145deg, #1a1033, #2d1b69, #1a1033);
}

.podium-stars {
  font-size: 1.5rem;
  letter-spacing: 8px;
  opacity: 0.9;
}

.podium-trophy {
  font-size: 90px;
  animation: trophyBounce 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 8px 24px rgba(241, 196, 15, 0.4));
}

@keyframes trophyBounce {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.podium-winner-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  width: 100%;
  max-width: 320px;
}

#podium-winner-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: #f1c40f;
  text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
  margin-bottom: 6px;
}

#podium-winner-score {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 1.1rem;
}

.podium-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 24px;
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
}

#podium-ranking {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.podium-rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
}

.podium-winner-row {
  background: rgba(241, 196, 15, 0.15);
  border-color: rgba(241, 196, 15, 0.3);
}

.podium-medal { font-size: 1.4rem; }

.podium-team-name {
  flex: 1;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
}

.podium-team-score {
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  font-size: 0.9rem;
}

.podium-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: auto;
}

#btn-play-again {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-size: 1.1rem;
}

#btn-home-from-podium {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.2);
}

/* Confetti */
#confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confettiFall var(--duration, 3s) var(--delay, 0s) ease-in forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════
   INSTRUCTIONS MODAL
═══════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  padding: 0;
}

.modal-backdrop.active {
  display: flex;
}

.modal-sheet {
  background: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 0 0 32px;
  animation: sheetUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 40px; height: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
  margin: 12px auto 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 0;
}

.modal-header h2 {
  font-size: 1.4rem;
  color: var(--text);
}

.modal-close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close-btn:hover { background: #dfe6e9; }

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.round-info-card {
  border-radius: var(--radius);
  padding: 16px 20px;
  color: white;
}

.round-info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.round-info-card p {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.5;
}

.instructions-tip {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ═══════════════════════════════════════════
   SAFE AREA (iOS notch support)
═══════════════════════════════════════════ */

@supports (padding: max(0px)) {
  .game-controls {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
  #screen-home,
  #screen-setup .setup-actions,
  .podium-actions {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
}

/* ═══════════════════════════════════════════
   RESPONSIVENESS
═══════════════════════════════════════════ */

@media (min-height: 700px) {
  .word-card { min-height: 200px; }
}

@media (min-height: 800px) {
  .timer-svg { width: 130px; height: 130px; }
  .timer-text { font-size: 2.4rem; }
}
