/* Ruleta y cupón sorpresa del Black Day. Prefijo .rl- ; CSS propio (no requiere recompilar Tailwind).
   Usa la paleta de quetzal-black.css (--qb-*) con valores de respaldo. */
.rl-pagina { --neon: var(--qb-neon, #00E676); --hot: var(--qb-hot, #FF1F6D); --bg: var(--qb-bg, #0D1117); --bg2: var(--qb-bg-2, #161B22); }
.rl-hero { display: flex; gap: 1rem; align-items: center; background: linear-gradient(135deg, var(--bg), #1a0a14); color: #F0F6FC; border: 1px solid rgba(0,230,118,.45); border-radius: 1.25rem; padding: 1.25rem; box-shadow: 0 8px 30px rgba(0,230,118,.12); }
.rl-hero h1 { font-size: 1.35rem; font-weight: 900; line-height: 1.2; margin: .35rem 0; }
.rl-hero p { font-size: .9rem; color: #c9d1d9; margin: 0; }
.rl-hero strong { color: var(--neon); }
.rl-hero-mascota { width: 84px; height: 84px; object-fit: contain; flex: none; animation: rlFlota 3s ease-in-out infinite; }
.rl-chip { display: inline-block; font-size: .72rem; font-weight: 800; padding: .2rem .65rem; border-radius: 999px; background: rgba(0,230,118,.15); color: var(--neon); }
@keyframes rlFlota { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (min-width: 640px) { .rl-hero { padding: 1.75rem 2rem; } .rl-hero h1 { font-size: 1.9rem; } .rl-hero-mascota { width: 120px; height: 120px; } }

.rl-aviso { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1rem 1.25rem; }
.rl-aviso p { margin: 0; flex: 1 1 220px; font-size: .95rem; }
.rl-boton { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; cursor: pointer; background: linear-gradient(90deg, #007A8F, #3862F3); color: #fff; font-weight: 800; font-size: .95rem; padding: .7rem 1.4rem; border-radius: .85rem; text-decoration: none; transition: transform .15s, opacity .15s; }
.rl-boton:hover { transform: translateY(-1px); }
.rl-boton:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rl-enlace { color: #2B4FD8; font-weight: 700; font-size: .9rem; }

.rl-grid { display: grid; gap: 1rem; margin-top: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .rl-grid { grid-template-columns: 1fr 1fr; } }
.rl-grid[hidden], .rl-aviso[hidden], .rl-mios[hidden] { display: none; }
.rl-tarjeta { background: #fff; border: 1px solid #e2e8f0; border-radius: 1.25rem; padding: 1.25rem; box-shadow: 0 2px 10px rgba(15,23,42,.05); }
.dark .rl-tarjeta, .dark .rl-aviso { background: #0f172a; border-color: #1e293b; }
.rl-tarjeta h2 { font-size: 1.1rem; font-weight: 900; margin: 0 0 .75rem; }
.rl-cuerpo { display: flex; flex-direction: column; align-items: center; gap: .9rem; text-align: center; min-height: 260px; justify-content: center; }
.rl-esqueleto { width: 220px; height: 220px; border-radius: 50%; background: #e2e8f0; animation: rlPulso 1.4s ease-in-out infinite; }
@keyframes rlPulso { 50% { opacity: .5; } }

/* Rueda */
.rl-rueda-caja { position: relative; width: min(300px, 78vw); aspect-ratio: 1; }
.rl-rueda { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 6px var(--bg), 0 0 0 9px var(--neon), 0 10px 30px rgba(0,0,0,.25); transition: transform 5.2s cubic-bezier(.12,.72,.1,1); }
.rl-flecha { position: absolute; top: -12px; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid var(--hot); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); z-index: 2; }
.rl-centro { position: absolute; inset: 50% auto auto 50%; width: 46px; height: 46px; transform: translate(-50%,-50%); border-radius: 50%; background: var(--bg); border: 3px solid var(--neon); z-index: 1; display: grid; place-items: center; font-size: 1.2rem; }

/* Caja sorpresa */
.rl-caja { font-size: 5.5rem; line-height: 1; cursor: pointer; background: none; border: 0; filter: drop-shadow(0 8px 12px rgba(0,0,0,.25)); animation: rlFlota 2.4s ease-in-out infinite; }
.rl-caja:disabled { animation: none; cursor: default; filter: grayscale(.4); }
.rl-caja.rl-abriendo { animation: rlSacude .6s ease-in-out 1; }
@keyframes rlSacude { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(8deg); } }

/* Resultado */
.rl-premio { width: 100%; border: 2px dashed #f59e0b; background: #fffbeb; border-radius: 1rem; padding: .9rem 1rem; color: #92400e; animation: rlEntra .4s ease-out; }
.dark .rl-premio { background: #2a1f05; color: #fcd34d; }
.rl-premio.rl-nada { border-color: #cbd5e1; background: #f1f5f9; color: #475569; }
.dark .rl-premio.rl-nada { background: #1e293b; color: #cbd5e1; border-color: #334155; }
.rl-premio b { display: block; font-size: 1.05rem; color: #0f172a; }
.dark .rl-premio b { color: #f8fafc; }
.rl-codigo { display: inline-block; margin: .4rem 0; font-family: ui-monospace, monospace; font-size: 1.25rem; font-weight: 900; letter-spacing: .12em; color: #0f172a; background: #fff; border-radius: .6rem; padding: .25rem .7rem; }
.rl-vence { font-size: .8rem; font-weight: 700; }
.rl-acciones { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .6rem; }
.rl-sec { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
@keyframes rlEntra { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.rl-vuelve { font-size: .85rem; color: #64748b; font-weight: 600; }

.rl-mios { margin-top: 1rem; }
.rl-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rl-lista li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border: 1px solid #e2e8f0; border-radius: .85rem; padding: .6rem .85rem; font-size: .9rem; }
.dark .rl-lista li { border-color: #334155; }
.rl-lista small { display: block; color: #64748b; }
.rl-etq { flex: none; font-size: .7rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; }
.rl-etq.disponible { background: #d1fae5; color: #065f46; }
.rl-etq.usado { background: #e2e8f0; color: #475569; }
.rl-etq.vencido { background: #fee2e2; color: #991b1b; }
.rl-nota { font-size: .78rem; color: #64748b; margin: .75rem 0 0; }
.rl-legal { text-align: center; margin-top: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .rl-rueda { transition-duration: .6s; }
  .rl-hero-mascota, .rl-caja, .rl-esqueleto, .rl-premio, .rl-caja.rl-abriendo { animation: none; }
}
