/* Rifa en directo — pantalla pública + control operador */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
.rifa-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: radial-gradient(1200px 800px at 50% -10%, #2a1a4e 0%, #14102e 45%, #0a0a1e 100%);
    color: #fff; min-height: 100vh; overflow-x: hidden;
}
.rifa-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }

.rifa-screen {
    width: 100%; max-width: 760px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.rifa-logo { width: 92px; height: auto; filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4)); }
.rifa-title {
    font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; margin: 0;
    background: linear-gradient(90deg, #ffd87a, #ffb43d, #ffd87a);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---- Próximamente ---- */
.rifa-screen--soon { gap: 1.5rem; }
.rifa-soon__title { font-size: clamp(1.6rem, 5vw, 2.6rem); margin: 0; font-weight: 800; }
.rifa-soon__sub { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin: 0; line-height: 1.6; }
.rifa-soon__pulse {
    width: 16px; height: 16px; border-radius: 50%; background: #ffb43d; margin-top: 0.5rem;
    box-shadow: 0 0 0 0 rgba(255,180,61,0.6); animation: rifaPulse 1.8s infinite;
}
@keyframes rifaPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,180,61,0.5); }
    70% { box-shadow: 0 0 0 26px rgba(255,180,61,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,180,61,0); }
}

/* ---- Contador participantes ---- */
.rifa-count { display: flex; flex-direction: column; align-items: center; line-height: 1; margin: 0.5rem 0; }
.rifa-count__num { font-size: clamp(3rem, 12vw, 6rem); font-weight: 900; color: #fff; text-shadow: 0 4px 24px rgba(255,180,61,0.4); }
.rifa-count__lbl { font-size: 0.95rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.7); }

/* ---- Lista de premios ---- */
.rifa-prizes__h { font-size: 1rem; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin: 1rem 0 0; }
.rifa-prizes { list-style: none; padding: 0; margin: 0.5rem 0 0; width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.rifa-prize {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px; padding: 0.75rem 1.1rem; font-size: 1.05rem;
}
.rifa-prize__name { font-weight: 700; }
.rifa-prize__winner { color: #ffd87a; font-weight: 800; }
.rifa-prize__pending { color: rgba(255,255,255,0.45); font-size: 0.85rem; }
.rifa-prize--won { background: rgba(67,217,132,0.14); border-color: rgba(67,217,132,0.4); }

/* ---- Sorteo (rolling) ---- */
.rifa-screen--draw { gap: 1.4rem; }
.rifa-draw__prize { font-size: 1.3rem; color: rgba(255,255,255,0.85); }
.rifa-draw__prize strong { color: #ffd87a; }
.rifa-reel {
    font-size: clamp(3.2rem, 16vw, 8rem); font-weight: 900; letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    background: rgba(0,0,0,0.35); border: 3px solid rgba(255,216,122,0.5);
    border-radius: 20px; padding: 1rem 1.5rem; min-width: min(90vw, 540px);
    text-shadow: 0 0 26px rgba(255,180,61,0.5);
}
.rifa-reel--bump { animation: rifaBump 0.08s ease; }
@keyframes rifaBump { 50% { transform: scale(1.04); } }
.rifa-reel__label { min-height: 1.5rem; color: rgba(255,255,255,0.7); font-size: 1.1rem; }

/* ---- Ganador (reveal) ---- */
.rifa-screen--win { gap: 1.1rem; position: relative; }
.rifa-win__prize { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 800; color: #ffd87a; }
.rifa-win__card {
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
    border: 2px solid rgba(255,216,122,0.6); border-radius: 24px;
    padding: 1.6rem 2.2rem; animation: rifaPop 0.5s cubic-bezier(.18,1.4,.4,1) both;
    box-shadow: 0 12px 50px rgba(255,180,61,0.3);
}
@keyframes rifaPop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.rifa-win__num { font-size: clamp(3rem, 14vw, 7rem); font-weight: 900; letter-spacing: 0.03em; line-height: 1; }
.rifa-win__fam { font-size: clamp(1.3rem, 5vw, 2.2rem); font-weight: 700; color: #ffd87a; margin-top: 0.4rem; }
.rifa-win__tag { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.05em; animation: rifaBlink 1s infinite; }
.rifa-win__delivered { font-size: 1.5rem; font-weight: 900; color: #43d984; }
@keyframes rifaBlink { 50% { opacity: 0.45; } }

/* ---- Confetti ---- */
.rifa-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rifa-confetti span {
    position: absolute; top: -8%; font-size: 1.6rem;
    animation-name: rifaFall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes rifaFall { to { transform: translateY(115vh) rotate(540deg); } }

/* ---- Botones ---- */
.rifa-btn {
    background: #ffb43d; color: #2a1a4e; border: 0; border-radius: 999px;
    padding: 0.85rem 1.5rem; font-size: 1.05rem; font-weight: 800; cursor: pointer;
    box-shadow: 0 6px 18px rgba(255,180,61,0.3); transition: transform 0.12s ease, filter 0.12s ease;
}
.rifa-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.rifa-btn:active { transform: translateY(0); }
.rifa-btn:disabled { opacity: 0.5; cursor: default; }
.rifa-btn--lg { padding: 1.1rem 2.2rem; font-size: 1.2rem; }
.rifa-btn--ghost { background: rgba(255,255,255,0.12); color: #fff; box-shadow: none; }
.rifa-btn--ok { background: #43d984; color: #06321c; }
.rifa-btn--draw { width: 100%; }

.rifa-ops { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.rifa-ops--grid { flex-direction: column; width: 100%; max-width: 520px; }
.rifa-ops__wait { color: rgba(255,255,255,0.6); font-size: 1rem; }

/* ---- Gate de sonido ---- */
.rifa-sound-gate {
    position: fixed; inset: 0; background: rgba(10,10,30,0.96); z-index: 50;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.rifa-sound-gate__icon { font-size: 3.5rem; margin-bottom: 1rem; }
.rifa-sound-gate__hint { color: rgba(255,255,255,0.7); margin-top: 1rem; font-size: 0.95rem; }

/* ---- Modal búscate ---- */
.rifa-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 40; padding: 1rem; }
.rifa-modal.open { display: flex; }
.rifa-modal__box { background: #1a1636; border: 1px solid rgba(255,255,255,0.15); border-radius: 18px; padding: 1.5rem; width: 100%; max-width: 440px; position: relative; }
.rifa-modal__box h2 { margin: 0 0 1rem; }
.rifa-modal__close { position: absolute; top: 0.8rem; right: 0.9rem; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }
.rifa-input { width: 100%; padding: 0.85rem 1rem; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; font-size: 1.05rem; margin-bottom: 0.75rem; outline: none; }
.rifa-input:focus { border-color: #ffb43d; }
.rifa-error { color: #ff8a8a; font-size: 0.9rem; min-height: 1rem; margin: 0.3rem 0 0; }
.rifa-plist { max-height: 50vh; overflow-y: auto; margin-top: 0.5rem; }
.rifa-prow { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.4rem; border-bottom: 1px dashed rgba(255,255,255,0.12); }
.rifa-prow strong { color: #ffd87a; }
.rifa-prow--empty { color: rgba(255,255,255,0.5); justify-content: center; }

/* ---- Barra operador ---- */
.rifa-body--operator .rifa-stage { padding-top: 4rem; }
.rifa-opbar {
    position: fixed; top: 0; left: 0; right: 0; height: 48px; z-index: 30;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
    display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
    font-size: 0.85rem; color: rgba(255,255,255,0.8);
}
.rifa-opbar__link { color: #ffd87a; text-decoration: none; font-weight: 600; }
.rifa-opbar__title { font-weight: 700; color: #fff; }
.rifa-opbar__hint { margin-left: auto; color: rgba(255,255,255,0.5); }
