﻿/* Capa para confeti/fuegos */
.celebration-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1050;
}

    .celebration-layer canvas {
        width: 100%;
        height: 100%;
        display: block;
    }

/* Overlay grande del ganador */
.winner-big {
    position: fixed;
    inset: 0;
    display: none; /* se muestra con JS */
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1060;
    pointer-events: none;
}

    /* ===== Estilos del texto con CONTORNO ===== */
    .winner-big .inner {
        font-family: 'Orbitron', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
        font-weight: 800;
        line-height: 1.05;
        color: #ffd86b; /* relleno dorado */
        text-shadow: 0 0 8px rgba(255,216,107,.85), 0 0 22px rgba(255,216,107,.45), 0 0 40px rgba(255,216,107,.25);
        animation: winnerPulse 1.1s ease-in-out infinite;
        padding: .5rem 1rem;
    }

/* Contorno configurable */
:root {
    --win-stroke-color: #0a0f1a; /* color del borde (oscuro) */
    --win-stroke-width-title: 2px;
    --win-stroke-width-number: 8px;
}

/* Título con contorno */
.winner-big .title {
    font-size: clamp(1.1rem, 2.8vw, 1.6rem);
    margin-bottom: .25rem;
    /* Contorno nítido (WebKit) */
    -webkit-text-stroke: var(--win-stroke-width-title) var(--win-stroke-color);
    /* Falso contorno para otros navegadores (8 direcciones) */
    text-shadow: 0 1px 0 var(--win-stroke-color), 1px 0 0 var(--win-stroke-color), 0 -1px 0 var(--win-stroke-color), -1px 0 0 var(--win-stroke-color), 1px 1px 0 var(--win-stroke-color), -1px 1px 0 var(--win-stroke-color), 1px -1px 0 var(--win-stroke-color), -1px -1px 0 var(--win-stroke-color),
    /* Brillos existentes encima */
    0 0 8px rgba(255,216,107,.75), 0 0 22px rgba(255,216,107,.35), 0 0 40px rgba(255,216,107,.2);
}

/* Número gigante con contorno grueso */
.winner-big .number {
    font-size: clamp(3rem, 16vw, 10rem);
    letter-spacing: .03em;
    /* Contorno nítido (WebKit) */
    -webkit-text-stroke: var(--win-stroke-width-number) var(--win-stroke-color);
    /* Falso contorno (bloque ancho) */
    text-shadow: 0 2px 0 var(--win-stroke-color), 2px 0 0 var(--win-stroke-color), 0 -2px 0 var(--win-stroke-color), -2px 0 0 var(--win-stroke-color), 2px 2px 0 var(--win-stroke-color), -2px 2px 0 var(--win-stroke-color), 2px -2px 0 var(--win-stroke-color), -2px -2px 0 var(--win-stroke-color), 0 0 8px rgba(255,216,107,.65), 0 0 22px rgba(255,216,107,.35), 0 0 40px rgba(255,216,107,.2);
}

/* Pulso del overlay */
@keyframes winnerPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}
