/* Multimodo: menú de modos y modos con ruleta (Adultos/Cantina y Familiar).
   No cambia ningún estilo del juego tradicional (game.css). */

.modes-list { display: flex; flex-direction: column; gap: 10px; }
.mode-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 14px; background: rgba(242, 230, 208, .06);
  border: 1px solid rgba(231, 178, 60, .28);
}
.mode-item.mode-soon { opacity: .6; }
.mode-icon { font-size: 30px; width: 40px; text-align: center; }
.mode-text { flex: 1; min-width: 0; }
.mode-title { font-family: 'Oswald', sans-serif; font-weight: 600; color: var(--gold); }
.mode-sub { font-size: 13px; opacity: .8; }
.mode-badge {
  font-size: 12px; padding: 4px 8px; border-radius: 999px;
  background: rgba(242, 230, 208, .12); white-space: nowrap;
}
.mode-play { white-space: nowrap; }

.mode-topbar { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.mode-topbar-title { font-family: 'Anton', sans-serif; letter-spacing: 1px; font-size: 20px; color: var(--gold); }
.mode-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; line-height: 1.35; }
.mode-check input { margin-top: 3px; transform: scale(1.2); }
/* Serie 19 (15): la casilla de mayoría de edad, destacada (y más aún mientras falta marcarla). */
.mode-check.age-check { font-size: 1.08em; font-weight: 700; padding: 12px 14px; border: 2px solid var(--gold); border-radius: 12px; background: rgba(231, 178, 60, .10); }
.mode-check.age-check input { transform: scale(1.6); margin: 4px 6px 0 2px; }
.mode-check.age-check.age-missing { border-color: #ff8aa5; box-shadow: 0 0 0 3px rgba(255, 138, 165, .25); }
.mode-select select { margin-left: 6px; padding: 6px; border-radius: 8px; }
.mode-flag { display: inline-block; margin: 6px 0; padding: 4px 10px; border-radius: 999px; background: rgba(58, 157, 107, .25); }

.audio-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.audio-volume-wrap { display: flex; align-items: center; gap: 6px; }
.audio-volume { width: 130px; }

.active-rules { border: 2px dashed var(--gold); border-radius: 12px; padding: 10px; margin: 8px 0; }
.active-rules-title { font-weight: 700; color: var(--gold); }
.active-rule { margin-top: 4px; }

.mode-ring { display: flex; align-items: center; justify-content: space-around; gap: 8px; }
.mode-fighter { flex: 1; text-align: center; min-width: 0; }
.mode-fighter-tag { font-size: 12px; opacity: .75; }
.mode-fighter-name { font-weight: 800; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-vs { background: var(--rope); border-radius: 50%; padding: 10px; font-weight: 900; }
.mode-gestures { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.mode-gesture {
  font-size: 26px; width: 52px; height: 52px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(var(--rope-dark), var(--rope)); border: 1px solid rgba(231, 178, 60, .6);
}
.mode-gesture:focus-visible { outline: 3px solid var(--gold); }
.mode-ready { margin-top: 14px; color: var(--ok); font-weight: 800; }
.mode-reveal { font-size: 46px; margin-top: 6px; animation: mode-pop .35s ease-out; }
.mode-log { text-align: center; font-weight: 700; }
.mode-spin-btn { margin-top: 12px; width: 100%; }

.wheel-overlay, .card-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .8);
}
.wheel-title { font-family: 'Anton', sans-serif; font-size: 24px; color: var(--gold); margin-bottom: 8px; }
.wheel-wrap { position: relative; width: min(320px, 86vw); }
.wheel-canvas { width: 100%; height: auto; display: block; border-radius: 50%; box-shadow: 0 0 30px rgba(231, 178, 60, .45); }
.wheel-pointer {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 30px; color: var(--gold); text-shadow: 0 2px 4px #000; z-index: 2;
}
.wheel-result { margin-top: 14px; font-size: 22px; font-weight: 800; min-height: 30px; }

.big-card {
  width: min(440px, 100%); max-height: 92vh; overflow-y: auto; background: var(--canvas);
  border: 3px solid var(--cat, var(--gold)); border-radius: 22px; padding: 22px 18px;
  text-align: center; animation: mode-flip .45s ease-out;
}
.big-card-cat { font-family: 'Oswald', sans-serif; letter-spacing: 2px; color: var(--cat, var(--gold)); font-weight: 700; }
.big-card-player { font-family: 'Anton', sans-serif; font-size: 26px; color: var(--rope); margin: 6px 0; }
.big-card-text { font-size: clamp(20px, 5.4vw, 26px); line-height: 1.35; margin: 14px 0; }
.big-card-int { letter-spacing: 4px; color: var(--gold); }
.big-card-img { max-width: 100%; max-height: 180px; border-radius: 12px; margin: 8px auto; display: block; }

.mode-summary-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(242, 230, 208, .1); }

/* ---- Adultos v2: elección oculta, marcador, rondas, final, acceso y Castigo abierto ---- */
.mode-hidden-pick { font-size: 22px; }
.mode-reveal.rolling { animation: none; opacity: .8; }
.mode-rounds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.mode-rounds-num { width: 80px; }
.mode-scoreboard h2 { margin-bottom: 4px; }
.mode-score-list { list-style: none; margin: 6px 0 0; padding: 0; }
.mode-score-row { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; }
.mode-score-row:nth-child(odd) { background: rgba(242, 230, 208, .05); }
.mode-score-active { outline: 1px solid rgba(231, 178, 60, .5); }
.mode-score-winner { background: rgba(231, 178, 60, .18) !important; font-weight: 800; }
.mode-score-pts { color: var(--gold); }
.mode-winner { font-family: 'Anton', sans-serif; font-size: 28px; color: var(--gold); text-align: center; margin: 8px 0 12px; }
.mode-sudden { border: 2px solid var(--gold); text-align: center; }
.mode-sudden-title { font-family: 'Oswald', sans-serif; font-weight: 700; color: var(--gold); }
.mode-login { border: 2px solid var(--gold); border-radius: 12px; padding: 12px; margin: 8px 0; text-align: center; }
.mode-login-title { font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.mode-locked { opacity: .9; }
.open-limits { text-align: left; margin: 8px 0; padding-left: 20px; font-size: 14px; }
.open-text { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border-radius: 10px; margin: 6px 0; }

/* En los modos con ruleta los controles de voz de la cabecera (del tradicional)
   no aplican: cada modo tiene los suyos. */
body:has(.modes-screen) .voice-controls { display: none; }

/* ---- Ambientación Cantina (Adultos) ---- */
.theme-cantina {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 46px),
    linear-gradient(180deg, #4a2a16, #2a170c);
  border-radius: 16px; padding: 0 8px 16px;
}
.theme-cantina .card { background: rgba(29, 17, 9, .88); border-color: rgba(231, 178, 60, .45); }
.papel-picado {
  height: 30px; margin: 0 -8px 8px;
  background:
    radial-gradient(circle at 10px 8px, transparent 5px, transparent 6px) 0 0 / 20px 30px,
    linear-gradient(90deg, #C81C47 0 16.6%, #E7B23C 16.6% 33.3%, #1F9E93 33.3% 50%, #3A9D6B 50% 66.6%, #A97F2C 66.6% 83.3%, #7D1030 83.3%);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 95% 100%, 90% 70%, 85% 100%, 80% 70%, 75% 100%, 70% 70%, 65% 100%, 60% 70%, 55% 100%, 50% 70%, 45% 100%, 40% 70%, 35% 100%, 30% 70%, 25% 100%, 20% 70%, 15% 100%, 10% 70%, 5% 100%, 0 70%);
}

/* ---- Serie 17 (10): Ambiente Antro (Adultos): neón morado, magenta y cian sobre negro ---- */
.theme-antro {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 0, 200, .28), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(0, 220, 255, .25), transparent 42%),
    linear-gradient(180deg, #14061f, #07030d);
  border-radius: 16px; padding: 0 8px 16px; color: #f4e9ff;
}
.theme-antro .card { background: rgba(18, 6, 30, .9); border-color: rgba(255, 60, 220, .55); box-shadow: 0 0 18px rgba(255, 0, 200, .25), inset 0 0 0 1px rgba(0, 220, 255, .15); }
.theme-antro h2, .theme-antro .mode-topbar-title { color: #ff5ae0; text-shadow: 0 0 10px rgba(255, 90, 224, .7); }
.theme-antro .btn-primary { background: linear-gradient(90deg, #b100ff, #ff2fb9); color: #fff; box-shadow: 0 0 16px rgba(255, 47, 185, .55); }
.luces-antro {
  height: 26px; margin: 0 -8px 8px; border-radius: 0 0 12px 12px;
  background: linear-gradient(90deg, #ff2fb9, #8a2be2, #00d8ff, #39ff88, #ffd400, #ff2fb9);
  background-size: 300% 100%; animation: luces-antro 6s linear infinite; filter: saturate(1.3) blur(.3px);
  box-shadow: 0 6px 22px rgba(255, 47, 185, .45);
}
@keyframes luces-antro { from { background-position: 0 0; } to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .luces-antro { animation: none; } }
.mode-ambiente { display: flex; gap: 8px; margin: 6px 0 12px; }
.mode-ambiente button { flex: 1; font-size: 16px; padding: 10px; }
.mode-ambiente button[aria-checked="true"] { outline: 3px solid var(--gold, #e7b23c); }
.theme-antro .mode-ambiente button[aria-checked="true"] { outline-color: #ff5ae0; box-shadow: 0 0 12px rgba(255, 90, 224, .6); }

/* ---- Familiar ---- */
.theme-familiar .mode-topbar-title { color: #6fd3c9; }

/* Familiar v2: feria (toldo a rayas, focos) y trivia. Sin nada de la cantina. */
.theme-feria {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 26px, transparent 26px 52px),
    linear-gradient(180deg, #2b1846, #18102b);
  border-radius: 16px; padding: 0 8px 16px;
}
.theme-feria .mode-topbar {
  margin: 0 -8px 8px; padding: 10px 8px 14px;
  background: repeating-linear-gradient(90deg, #C1121F 0 28px, #fff4e0 28px 56px);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 96% 100%, 92% 80%, 88% 100%, 84% 80%, 80% 100%, 76% 80%, 72% 100%, 68% 80%, 64% 100%, 60% 80%, 56% 100%, 52% 80%, 48% 100%, 44% 80%, 40% 100%, 36% 80%, 32% 100%, 28% 80%, 24% 100%, 20% 80%, 16% 100%, 12% 80%, 8% 100%, 4% 80%, 0 100%);
}
.theme-feria .mode-topbar-title { color: #fff; text-shadow: 0 2px 0 #1d1a14, 0 0 6px #1d1a14; }
.theme-feria .card { background: rgba(24, 16, 43, .9); border-color: rgba(255, 210, 63, .5); }
.wheel-feria .wheel-pointer { color: #FFD23F; text-shadow: 0 2px 0 #C1121F; }
.big-card-feria { border: 4px solid var(--cat, #FFD23F); box-shadow: 0 0 0 4px #fff4e0 inset, 0 10px 30px rgba(0, 0, 0, .45); }
.fam-effect { margin: 8px 0; font-weight: 700; font-size: 18px; }
.fam-castigo { margin: 10px 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 210, 63, .14); text-align: left; font-size: 15px; }
.fam-castigo-title { font-weight: 700; margin-bottom: 4px; }
.fam-free { font-size: 13px; opacity: .85; }
.fam-redirect { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.fam-redirect-btn, .fam-other, .fam-wildcard { min-height: 44px; }
.mode-wildcard { margin-left: 6px; }
.mode-pack h2 { margin-bottom: 4px; }
.mode-pack-price { font-weight: 700; color: #FFD23F; margin: 6px 0; }
.trivia-category { font-weight: 700; letter-spacing: 1px; opacity: .9; }
.trivia-options { display: grid; gap: 8px; margin: 10px 0; }
.trivia-option {
  min-height: 48px; padding: 10px 12px; border-radius: 12px; text-align: left; font: inherit; font-size: 17px;
  background: #fff4e0; color: #1d1a14; border: 3px solid transparent; cursor: pointer;
}
.trivia-option:focus-visible { outline: 3px solid #FFD23F; outline-offset: 2px; }
.trivia-option:disabled { cursor: default; opacity: .75; }
.trivia-option.trivia-correct { background: #06D6A0; border-color: #036b50; opacity: 1; font-weight: 700; }
.trivia-option.trivia-wrong { background: #ffb3b3; border-color: #9b1c1c; opacity: 1; }
.trivia-outcome { min-height: 24px; font-size: 18px; margin: 6px 0; }
.trivia-punishment { font-weight: 700; margin: 6px 0; }

@keyframes mode-pop { from { transform: scale(.4); } to { transform: scale(1); } }
@keyframes mode-flip { from { transform: perspective(800px) rotateY(90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .mode-reveal, .big-card { animation: none; }
}

/* P9: partida gratuita y desbloqueo de Familiar y Adultos. */
.mode-trial-note { font-size: .85em; margin-top: .25em; opacity: .9; }
.mode-unlock { white-space: nowrap; }

/* R-10 (Serie 5): icono de Familiar como imagen (mismo tamaño que los emojis de los demás modos). */
.familiar-icon { display: inline-flex; align-items: center; justify-content: center; }
.mode-icon.familiar-icon img { width: 34px; height: 34px; }
.inline-icon.familiar-icon img { width: 1.15em; height: 1.15em; vertical-align: -0.18em; }
.title-with-icon { display: flex; align-items: center; gap: 6px; }

/* 2.8.1: la piedra es una imagen propia (el emoji no existe en todas las fuentes, p. ej. Windows 10). */
.rock-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; }
.trivia-fact { margin-top: 8px; }

/* Serie 10 (P-05): ventana «Ya usaste tu ronda gratis» con la ficha de la tienda (mismo diseño y colores). */
.unlock-overlay { z-index: 60; overflow-y: auto; justify-content: flex-start; padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.unlock-sheet {
  width: min(560px, 100%); margin: auto 0; background: var(--canvas); border: 3px solid var(--gold); border-radius: 22px;
  padding: 20px 16px 16px; text-align: center; animation: mode-flip .45s ease-out; display: flex; flex-direction: column; gap: 12px;
}
.unlock-title { font-family: 'Anton', sans-serif; font-size: clamp(24px, 6vw, 32px); color: var(--gold); line-height: 1.15; }
.unlock-sub { font-size: 18px; font-weight: 700; }
.unlock-slot { text-align: left; }
.unlock-slot .shop-card { margin: 0; }
.unlock-close { align-self: center; min-width: 140px; }
/* P-01: «Jugar gratis» y «Desbloquear» debajo del nombre del modo, sin apretarlo. */
.mode-item.mode-two-actions { flex-wrap: wrap; }
.mode-item.mode-two-actions .mode-text { flex: 1 1 calc(100% - 52px); }
.mode-item.mode-two-actions .mode-play { flex: 1 1 140px; white-space: normal; }

/* Serie 12 (pedido del propietario): Familiar y Adultos usan EL DUELO DEL TRADICIONAL (game.css: .ring, .versus-row,
   .fighter, .gesture, .vs-badge, .selection-btn…). Solo cambian las máscaras (imágenes) y el recuadro de afuera.
   Las clases mode-* siguen en el DOM como marcas para las pruebas: aquí se neutraliza su estilo dentro del ring. */
.ring.mode-ring { display: block; }
.ring .mode-fighter { flex: 1; }
.ring img.fighter-mask { width: 46px; height: 46px; object-fit: contain; }
.ring img.ring-watermark { width: 200px; }
.ring .mode-gesture { font-size: 15px; width: 34px; height: 34px; border-radius: 9px; background: var(--canvas-2); border: 2px solid var(--teal); color: var(--teal); font-weight: 700; padding: 0; }
@media (min-width: 400px) { .ring .mode-gesture { width: 40px; height: 40px; font-size: 16px; } }
.ring .mode-ready { margin-top: 6px; font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 1px; font-weight: 600; }
.ring .gesture .mode-reveal { font-size: inherit; margin: 0; }
.ring .gesture .mode-reveal.rolling { opacity: 1; }
.ring .mode-log { font-weight: normal; }
/* El recuadro de afuera: el de cada modo, como estaba (Familiar turquesa sobre morado; Adultos madera con borde dorado). */
.ring.ring-familiar { border: 3px solid #2ec4b6; border-radius: 26px; background: radial-gradient(circle, #4a2a72 0%, #22123a 100%); box-shadow: 0 0 18px rgba(46, 196, 182, .4); }
.ring.ring-adultos { border: 3px solid var(--gold); border-radius: 14px; background: linear-gradient(#5a3418, #2a160a); box-shadow: 0 0 16px rgba(231, 178, 60, .4); }
