/* =====================================================================
   Bingo Gana — morado con amarillo dorado brillante
   Misma estructura visual que Bingo Rossana (pastel con bordes de neón y formas
   muy redondeadas), pero en morado y oro: superficies lilas, bordes de neón
   violeta y dorado, botones principales en oro brillante. Claro por defecto; el
   modo oscuro es "Noche morada", donde el neón dorado brilla más. Se carga
   DESPUÉS de los estilos de index.html y de Tailwind, por eso usa !important
   donde pisa utilidades.
   ===================================================================== */
:root {
  --g-violet: #8b5cf6;
  --g-violet-d: #6d3fd9;
  --g-neon-v: #a78bfa;   /* neón violeta */
  --g-gold: #ffd21f;     /* oro brillante */
  --g-gold-d: #f5b800;   /* oro profundo  */
  --g-gold-l: #fff0a0;   /* oro claro     */
  --g-neon-m: #5ef0c0;   /* menta (solo estados "ok") */
  --g-neon-p: #ff7eb6;   /* rosa (solo estados "error") */
  --g-ink: #3a2766;
  --g-mut: #7e6aa8;
  --g-bg0: #f3ecff;
  --g-bg1: #fff7d9;
  --g-panel: #ffffff;
  --g-cell: #f1e8ff;
  --g-field: #ffffff;
  --g-line: #e0d3fb;
  --g-g: .55;            /* intensidad del resplandor */
}
:root[data-theme="dark"] {
  --g-ink: #f6efff;
  --g-mut: #bfaee6;
  --g-bg0: #190b37;
  --g-bg1: #2c1360;
  --g-panel: #25114d;
  --g-cell: #3a2272;
  --g-field: #1d0e3f;
  --g-line: #54389a;
  --g-g: .95;
}

/* ---- Fondo: lila con nubes doradas y violetas ---- */
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background:
    radial-gradient(55% 40% at 5% 0%, rgba(255,210,31,.30) 0%, transparent 70%),
    radial-gradient(55% 40% at 100% 20%, rgba(139,92,246,.30) 0%, transparent 70%),
    radial-gradient(60% 40% at 50% 100%, rgba(255,210,31,.26) 0%, transparent 70%),
    linear-gradient(180deg, var(--g-bg0) 0%, var(--g-bg1) 100%) !important;
  background-attachment: fixed !important;
  color: var(--g-ink);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(55% 40% at 5% 0%, rgba(255,210,31,.16) 0%, transparent 70%),
    radial-gradient(55% 40% at 100% 20%, rgba(139,92,246,.30) 0%, transparent 70%),
    linear-gradient(180deg, var(--g-bg0) 0%, #0d0522 100%) !important;
  background-attachment: fixed !important;
}
body::after {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 110px; pointer-events: none; z-index: 0; opacity: .6;
  background-repeat: repeat-x; background-size: 320px 110px; background-position: bottom;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='110' viewBox='0 0 320 110'><path d='M0 70 Q40 40 80 70 T160 70 T240 70 T320 70 V110 H0Z' fill='%23ffd21f' fill-opacity='.32'/><path d='M0 84 Q40 58 80 84 T160 84 T240 84 T320 84 V110 H0Z' fill='%238b5cf6' fill-opacity='.30'/><path d='M0 98 Q40 76 80 98 T160 98 T240 98 T320 98 V110 H0Z' fill='%236d3fd9' fill-opacity='.40'/></svg>");
}
#root { position: relative; z-index: 1; }

h1, h2, h3, .font-black { font-family: 'Nunito', sans-serif; font-weight: 900; }
::-webkit-scrollbar-thumb { background: var(--g-gold) !important; border-radius: 99px; box-shadow: 0 0 6px var(--g-gold); }

/* ---- Neón: borde de 2px + resplandor (afuera y adentro) ---- */
.r-card, .r-modal, .r-sheet {
  background: var(--g-panel);
  border: 2px solid var(--g-neon-v);
  border-radius: 26px;
  box-shadow:
    0 0 0 1px rgba(167,139,250,calc(var(--g-g) * .35)),
    0 0 16px rgba(167,139,250,var(--g-g)),
    inset 0 0 16px rgba(167,139,250,calc(var(--g-g) * .14));
}
/* Ventanas y hoja del login: borde dorado */
.r-modal { border-color: var(--g-gold); box-shadow: 0 0 0 1px rgba(255,210,31,calc(var(--g-g) * .4)), 0 0 18px rgba(255,210,31,var(--g-g)), inset 0 0 16px rgba(255,210,31,calc(var(--g-g) * .12)); }
.r-modal { background: var(--g-panel); }

/* Tailwind: los paneles viejos (slate / violeta) se vuelven lila con borde de neón */
:root[data-theme="light"] .bg-slate-900\/60, :root[data-theme="light"] .bg-slate-900, :root[data-theme="light"] .bg-slate-800, :root[data-theme="light"] .bg-slate-800\/70 { background-color: #ffffff !important; }
:root[data-theme="light"] .bg-slate-800\/60, :root[data-theme="light"] .bg-slate-800\/40, :root[data-theme="light"] .bg-slate-800\/30 { background-color: #f6f0ff !important; }
:root[data-theme="light"] .bg-slate-700, :root[data-theme="light"] .bg-slate-700\/60 { background-color: #ece2ff !important; }
:root[data-theme="light"] .border-slate-700, :root[data-theme="light"] .border-slate-800, :root[data-theme="light"] .border-slate-600 { border-color: rgba(167,139,250,.7) !important; }
:root[data-theme="light"] .border-slate-700\/50, :root[data-theme="light"] .border-slate-800\/60 { border-color: rgba(167,139,250,.4) !important; }
:root[data-theme="light"] .border-bingopurple\/20, :root[data-theme="light"] .border-bingopurple\/30, :root[data-theme="light"] .border-bingopurple\/40, :root[data-theme="light"] .border-bingopurple\/50 { border-color: rgba(167,139,250,.75) !important; }
:root[data-theme="light"] .text-slate-100, :root[data-theme="light"] .text-slate-200 { color: #33225c !important; }
:root[data-theme="light"] .text-slate-300, :root[data-theme="light"] .text-slate-400 { color: #65538f !important; }
:root[data-theme="light"] .text-slate-500, :root[data-theme="light"] .text-slate-600 { color: #85729f !important; }
:root[data-theme="light"] .text-purple-100, :root[data-theme="light"] .text-purple-200 { color: #5a2fc9 !important; }
:root[data-theme="light"] .text-purple-300, :root[data-theme="light"] .text-purple-400, :root[data-theme="light"] .text-violet-300, :root[data-theme="light"] .text-indigo-300 { color: #6d3fd9 !important; }
:root[data-theme="light"] .text-fuchsia-300, :root[data-theme="light"] .text-pink-300 { color: #b8860b !important; }
:root[data-theme="light"] .from-purple-300 { --tw-gradient-from: #8b5cf6 !important; }
:root[data-theme="light"] .to-fuchsia-300 { --tw-gradient-to: #f5b800 !important; }
:root[data-theme="light"] .bg-bingopurple\/10, :root[data-theme="light"] .bg-purple-500\/10, :root[data-theme="light"] .bg-violet-500\/10 { background-color: #f3ecff !important; }
:root[data-theme="light"] .bg-bingopurple\/30, :root[data-theme="light"] .bg-violet-500\/20, :root[data-theme="light"] .bg-indigo-500\/20 { background-color: #e6dafd !important; }

:root[data-theme="dark"] .bg-slate-900\/60, :root[data-theme="dark"] .bg-slate-900 { background-color: var(--g-panel) !important; }
:root[data-theme="dark"] .bg-slate-950\/60, :root[data-theme="dark"] .bg-slate-950\/50, :root[data-theme="dark"] .bg-slate-950\/40 { background-color: rgba(25,11,55,.84) !important; }
:root[data-theme="dark"] .bg-slate-800, :root[data-theme="dark"] .bg-slate-800\/70, :root[data-theme="dark"] .bg-slate-800\/60 { background-color: #3a2272 !important; }
:root[data-theme="dark"] .bg-slate-800\/40, :root[data-theme="dark"] .bg-slate-800\/30 { background-color: rgba(58,34,114,.55) !important; }
:root[data-theme="dark"] .border-slate-700, :root[data-theme="dark"] .border-slate-800, :root[data-theme="dark"] .border-slate-600 { border-color: rgba(167,139,250,.7) !important; }
:root[data-theme="dark"] .border-bingopurple\/20, :root[data-theme="dark"] .border-bingopurple\/30, :root[data-theme="dark"] .border-bingopurple\/40 { border-color: rgba(167,139,250,.75) !important; }
:root[data-theme="dark"] .text-purple-100, :root[data-theme="dark"] .text-purple-200 { color: #f0e6ff !important; text-shadow: 0 0 10px rgba(255,210,31,.45); }
:root[data-theme="dark"] .text-fuchsia-300, :root[data-theme="dark"] .text-pink-300 { color: var(--g-gold) !important; }
:root[data-theme="dark"] .text-slate-100 { color: var(--g-ink) !important; }
:root[data-theme="dark"] .text-slate-400 { color: var(--g-mut) !important; }

/* ---- Botones: pastillas con borde de neón ---- */
.r-btn { border-radius: 999px; font-weight: 900; letter-spacing: .2px; border: 2px solid transparent; transition: transform .1s, box-shadow .2s, filter .15s; }
.r-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.r-btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
/* Principal: oro brillante con letra morada oscura */
.r-btn-primary { color: #3b1d7a; background: linear-gradient(180deg, #ffe566 0%, #ffc400 100%); border-color: #fff3b0; box-shadow: 0 0 16px rgba(255,210,31,calc(var(--g-g) + .2)), 0 3px 0 #c99200; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
.r-btn-ghost { color: #5a2fc9; background: transparent; border-color: var(--g-neon-v); box-shadow: 0 0 12px rgba(167,139,250,var(--g-g)), inset 0 0 10px rgba(167,139,250,calc(var(--g-g) * .15)); }
:root[data-theme="light"] .r-btn-ghost { background: #fff; color: #5a2fc9; }
:root[data-theme="dark"] .r-btn-ghost { color: #e8dcff; }
.r-btn-danger { color: #fff; background: #ff7fa8; border-color: #ffc1d6; box-shadow: 0 0 14px rgba(255,126,182,calc(var(--g-g) + .1)), 0 3px 0 #e0527a; }
.r-btn-success { color: #0e3d2c; background: linear-gradient(180deg, #9bf5d2, #5ef0c0); border-color: #d6fff0; box-shadow: 0 0 14px rgba(94,240,192,calc(var(--g-g) + .1)), 0 3px 0 #2fbf92; }
/* Dorado intenso (botón «Consulta tus Cartones») */
.r-btn-gold { color: #2e1065; background: linear-gradient(180deg, #fff08a 0%, #ffd21f 55%, #f5b800 100%); border-color: #fff7c2; box-shadow: 0 0 18px rgba(255,210,31,calc(var(--g-g) + .25)), 0 3px 0 #c99200; text-shadow: 0 1px 0 rgba(255,255,255,.5); }

/* ---- Campos ---- */
.r-field {
  background: var(--g-field) !important; color: var(--g-ink) !important;
  border: 2px solid rgba(167,139,250,.65) !important; border-radius: 16px !important;
  transition: box-shadow .2s, border-color .2s;
}
.r-field::placeholder { color: var(--g-mut) !important; opacity: .75; }
.r-field:focus { outline: none !important; border-color: var(--g-gold) !important; box-shadow: 0 0 0 1px rgba(255,210,31,.45), 0 0 14px rgba(255,210,31,var(--g-g)); }
select.r-field option { background: var(--g-panel); color: var(--g-ink); }

/* ---- Insignias con borde de neón ---- */
.r-badge { border-radius: 999px; font-weight: 800; border: 1.5px solid; }
.r-badge-purple { color: #4b23ad; background: #efe6ff; border-color: var(--g-neon-v); box-shadow: 0 0 8px rgba(167,139,250,var(--g-g)); }
.r-badge-green { color: #0e5a3f; background: #dcfbef; border-color: var(--g-neon-m); box-shadow: 0 0 8px rgba(94,240,192,var(--g-g)); }
.r-badge-yellow { color: #6a4300; background: #fff3b8; border-color: var(--g-gold); box-shadow: 0 0 8px rgba(255,210,31,var(--g-g)); }
.r-badge-red { color: #8a1a3d; background: #ffe3ec; border-color: var(--g-neon-p); box-shadow: 0 0 8px rgba(255,126,182,var(--g-g)); }
.r-badge-gray { color: #5d5280; background: #f1ecf9; border-color: #cfc3ea; }
:root[data-theme="dark"] .r-badge-purple { color: #e8dcff; background: #44298a; }
:root[data-theme="dark"] .r-badge-green { color: #c9f9e6; background: #1c4d3d; }
:root[data-theme="dark"] .r-badge-yellow { color: #fff1b0; background: #5c4608; }
:root[data-theme="dark"] .r-badge-red { color: #ffd0dc; background: #6a2442; }
:root[data-theme="dark"] .r-badge-gray { color: #d9cff2; background: #3e2f6e; border-color: #6a5a9a; }

/* ---- Menú lateral / encabezado ---- */
aside.bg-slate-950\/60 { background: rgba(255,255,255,.86) !important; border-right: 2px solid var(--g-neon-v) !important; box-shadow: 4px 0 18px rgba(167,139,250,calc(var(--g-g) * .45)); backdrop-filter: blur(6px); }
header.bg-slate-950\/40 { background: rgba(255,255,255,.78) !important; border-bottom: 2px solid var(--g-gold) !important; box-shadow: 0 4px 18px rgba(255,210,31,calc(var(--g-g) * .45)); backdrop-filter: blur(6px); }
:root[data-theme="dark"] aside.bg-slate-950\/60, :root[data-theme="dark"] header.bg-slate-950\/40 { background: rgba(25,11,55,.9) !important; }
.from-bingopurple.to-bingoaccent { background-image: linear-gradient(135deg, #ffe566 0%, #ffc400 100%) !important; border: 2px solid #fff3b0; box-shadow: 0 0 16px rgba(255,210,31,calc(var(--g-g) + .2)) !important; color: #3b1d7a !important; }

/* ---- Bolas: con resplandor de su propio color ---- */
.bingo-ball { border: 4px solid #fff; box-shadow: 0 0 22px currentColor, 0 0 0 3px rgba(255,255,255,.12), inset 0 -6px 10px rgba(0,0,0,.08) !important; }
.bingo-ball.bg-violet-400 { color: #8b5cf6; } .bingo-ball.bg-yellow-300 { color: #ffd21f; } .bingo-ball.bg-fuchsia-300 { color: #c9a2ff; }
.bingo-ball.bg-amber-300 { color: #ffc400; } .bingo-ball.bg-purple-300 { color: #b388ff; }
.bingo-ball > * { text-shadow: none; }
/* texto de las bolas claras (oro / lila) en morado oscuro; el de la B violeta, en blanco */
.bg-yellow-300.text-white, .bg-yellow-300 > *, .bg-amber-300.text-white, .bg-amber-300 > * { color: #3b1d7a !important; }
.bg-fuchsia-300.text-white, .bg-fuchsia-300 > *, .bg-purple-300.text-white, .bg-purple-300 > * { color: #2e1065 !important; }
.bingo-ball.bg-violet-400 > * { color: #fff !important; }
.bingo-ball.bg-yellow-300 > *, .bingo-ball.bg-amber-300 > * { color: #3b1d7a !important; }
.bingo-ball.bg-fuchsia-300 > *, .bingo-ball.bg-purple-300 > * { color: #2e1065 !important; }

/* ---- Marca ---- */
.r-logo { border: 3px solid #fff !important; box-shadow: 0 0 0 2px var(--g-gold), 0 0 22px rgba(255,210,31,.85), 0 0 36px rgba(139,92,246,.7) !important; }
.r-title { font-family: 'Nunito', sans-serif; font-weight: 900; color: #5b2dd0; text-shadow: 0 2px 0 #ffe266, 0 0 16px rgba(255,210,31,.5); }
:root[data-theme="dark"] .r-title { color: #ffe566; text-shadow: 0 0 14px rgba(255,210,31,.9), 0 0 28px rgba(139,92,246,.6); }

/* ---- Login: portada morada con bolas + hoja inferior con borde dorado ---- */
.r-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 30px 16px 56px; margin-bottom: -30px;
  border-radius: 34px 34px 28px 28px; border: 2px solid #ffe266;
  background: linear-gradient(160deg, #8b5cf6 0%, #6d3fd9 55%, #3f1d96 135%);
  box-shadow: 0 0 24px rgba(255,210,31,.75), inset 0 0 26px rgba(255,255,255,.16);
}
:root[data-theme="dark"] .r-hero { background: linear-gradient(160deg, #5b2dd0 0%, #3a1a8c 60%, #1f0d55 140%); border-color: #ffd21f; }
.r-hero .r-title { color: #fff; font-size: 2.2rem; line-height: 1.1; margin-top: 10px; text-shadow: 0 3px 0 rgba(255,196,0,.8), 0 0 22px rgba(255,226,102,.8); }
.r-hero .credito-neon { color: #fff !important; text-shadow: 0 0 10px rgba(255,255,255,.7); }
.r-hero-ball {
  position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; line-height: 1;
  box-shadow: 0 0 16px rgba(255,226,102,.85); animation: gHeroFloat 5s ease-in-out infinite alternate;
}
@keyframes gHeroFloat { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-10px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .r-hero-ball { animation: none; } }
.r-sheet { position: relative; z-index: 1; padding: 20px; border-color: var(--g-gold); box-shadow: 0 0 0 1px rgba(255,210,31,calc(var(--g-g) * .4)), 0 0 18px rgba(255,210,31,var(--g-g)), inset 0 0 16px rgba(255,210,31,calc(var(--g-g) * .12)); }

/* Crédito / subtítulo */
@keyframes creditoNeonPulse {
  0%, 100% { text-shadow: 0 0 6px rgba(255,210,31,.6); }
  50% { text-shadow: 0 0 14px rgba(255,210,31,.95), 0 0 24px rgba(139,92,246,.6); }
}
.credito-neon { color: #5b2dd0 !important; font-weight: 800 !important; }
.credito-neon a { color: #b8860b !important; border-bottom-color: rgba(184,134,11,.6) !important; }
:root[data-theme="dark"] .credito-neon { color: #f0e6ff !important; }
:root[data-theme="dark"] .credito-neon a { color: #ffe566 !important; }
.owner-neon-board { background: #fff !important; border: 2px solid var(--g-gold) !important; box-shadow: 0 0 16px rgba(255,210,31,.8), inset 0 0 14px rgba(255,210,31,.15) !important; }
.owner-neon-text { color: #5b2dd0 !important; text-shadow: 0 0 10px rgba(255,210,31,.7), 0 0 22px rgba(139,92,246,.45) !important; }

/* ---- Opacidades sueltas de Tailwind que faltaban en los dos temas ---- */
:root[data-theme="light"] [class~="bg-slate-800/50"], :root[data-theme="light"] [class~="bg-slate-800/20"], :root[data-theme="light"] [class~="bg-slate-700/40"], :root[data-theme="light"] [class~="bg-slate-700/60"] { background-color: #f3ecff !important; }
:root[data-theme="light"] [class~="bg-slate-900/70"], :root[data-theme="light"] [class~="bg-slate-900/80"] { background-color: rgba(255,255,255,.92) !important; }
:root[data-theme="light"] [class~="border-slate-700/60"], :root[data-theme="light"] [class~="border-slate-700/70"], :root[data-theme="light"] [class~="border-slate-700/40"], :root[data-theme="light"] [class~="border-slate-500/60"] { border-color: rgba(167,139,250,.55) !important; }
:root[data-theme="dark"] [class~="bg-slate-800/50"], :root[data-theme="dark"] [class~="bg-slate-800/20"], :root[data-theme="dark"] [class~="bg-slate-700/40"], :root[data-theme="dark"] [class~="bg-slate-700/60"] { background-color: rgba(58,34,114,.6) !important; }
:root[data-theme="dark"] [class~="bg-slate-900/70"], :root[data-theme="dark"] [class~="bg-slate-900/80"] { background-color: rgba(37,17,77,.92) !important; }
:root[data-theme="dark"] [class~="border-slate-700/60"], :root[data-theme="dark"] [class~="border-slate-700/70"], :root[data-theme="dark"] [class~="border-slate-700/40"], :root[data-theme="dark"] [class~="border-slate-700/50"] { border-color: rgba(167,139,250,.55) !important; }

/* ---- Encabezado en celular: que los botones bajen de línea en vez de salirse ---- */
header.bg-slate-950\/40 { flex-wrap: wrap; gap: 8px; }
header.bg-slate-950\/40 > div:last-child { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.r-hero .subtitulo-animado { text-shadow: 0 1px 8px rgba(40,10,110,.6) !important; }

/* ---- Figuras en miniatura (rejilla 5x5): casilla marcada vs vacía ---- */
.r-pat-on { background: linear-gradient(135deg, #8b5cf6, #ffd21f); box-shadow: 0 0 5px rgba(255,210,31,.75); }
.r-pat-off { background: #e6dafd; }
:root[data-theme="dark"] .r-pat-off { background: #3e2f6e; }
