.rifa-sorteo-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.rifa-sorteo-vacio {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 18px;
}

.rifa-sorteo-selector {
    text-align: center;
    margin-bottom: 18px;
}

.rifa-sorteo-selector select {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.rifa-sorteo-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    border-radius: 24px;
    padding: 34px 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}

.rifa-sorteo-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .12);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.rifa-sorteo-card h1 {
    margin: 0 0 20px;
    font-size: 28px;
    letter-spacing: -.5px;
}

.rifa-sorteo-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.rifa-sorteo-meta small {
    display: block;
    opacity: .7;
    font-size: 12px;
    margin-bottom: 4px;
}

.rifa-sorteo-meta strong {
    font-size: 20px;
}

.rifa-sorteo-premios {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.rifa-sorteo-premio-chip {
    background: rgba(255, 255, 255, .1);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
}

.rifa-sorteo-panel-admin {
    text-align: center;
    margin-top: 26px;
    padding: 24px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 18px;
}

.rifa-sorteo-panel-admin p {
    margin: 0 0 16px;
    color: #9a3412;
}

.rifa-sorteo-boton-realizar {
    background: linear-gradient(135deg, #f43f5e, #f59e0b);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(244, 63, 94, .35);
    transition: transform .15s ease;
}

.rifa-sorteo-boton-realizar:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
}

.rifa-sorteo-boton-realizar:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.rifa-sorteo-espera {
    text-align: center;
    margin-top: 26px;
    padding: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 16px;
}

.rifa-sorteo-resultado-final {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 26px;
}

.rifa-sorteo-ganador-card {
    background: linear-gradient(135deg, #fef9c3, #fde68a);
    border: 1px solid #fbbf24;
    border-radius: 18px;
    padding: 22px;
    text-align: center;
}

.rifa-sorteo-ganador-label {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
}

.rifa-sorteo-ganador-numero {
    font-size: 34px;
    font-weight: 900;
    color: #78350f;
    letter-spacing: 1px;
}

.rifa-sorteo-ganador-nombre {
    margin-top: 6px;
    font-size: 16px;
    color: #78350f;
}

.rifa-sorteo-boton-replay {
    display: block;
    margin: 18px auto 0;
    background: #111827;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

/* =========================
   ESCENARIO DE ANIMACIÓN
   ========================= */

.rifa-sorteo-escenario {
    position: relative;
    min-height: 60px;
    overflow: hidden;
    margin-top: 10px;
    border-radius: 18px;
}

.rifa-sorteo-agua-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
    position: relative;
    z-index: 2;
}

.rifa-agua-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    color: #075985;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px) scale(.9);
    transition: opacity .4s ease, transform .4s ease;
}

.rifa-agua-chip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.rifa-agua-numero {
    font-size: 15px;
}

.rifa-agua-tag {
    font-size: 12px;
    opacity: .8;
}

.rifa-sorteo-reveal {
    position: relative;
    z-index: 3;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    opacity: 0;
    transform: scale(.7);
}

.rifa-sorteo-reveal.rifa-reveal-animar {
    animation: rifaRevealPop .6s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

@keyframes rifaRevealPop {
    0%   { opacity: 0; transform: scale(.6) rotate(-4deg); }
    60%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.rifa-sorteo-reveal-premio {
    font-size: 16px;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 6px;
}

.rifa-sorteo-reveal-numero {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, #f43f5e, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.rifa-sorteo-reveal-nombre {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

#rifa-sorteo-confeti {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

/* =========================
   GLOBOS
   ========================= */

.rifa-globo {
    position: absolute;
    bottom: -60px;
    width: 46px;
    height: 58px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: .9;
    z-index: 1;
    animation-name: rifaGloboSubir;
    animation-timing-function: ease-in;
    animation-fill-mode: forwards;
}

.rifa-globo::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    width: 1px;
    height: 14px;
    background: rgba(0, 0, 0, .25);
}

@keyframes rifaGloboSubir {
    0% {
        transform: translateY(0) translateX(0);
        opacity: .95;
    }
    100% {
        transform: translateY(-420px) translateX(20px);
        opacity: 0;
    }
}

/* =========================
   SERPENTINAS
   ========================= */

.rifa-serpentina {
    position: absolute;
    top: -20px;
    width: 6px;
    height: 22px;
    border-radius: 2px;
    opacity: .95;
    z-index: 1;
    animation-name: rifaSerpentinaCaer;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes rifaSerpentinaCaer {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(340px) rotate(320deg);
        opacity: 0;
    }
}

@media screen and (max-width: 600px) {

    .rifa-sorteo-reveal-numero {
        font-size: 46px;
    }

    .rifa-sorteo-meta {
        gap: 16px;
    }
}
