* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: url('assets/images/background_sort.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

/* Logo no topo */
.logo-topo {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
}

.logo-topo img {
    max-width: 350px;
    height: auto;
    display: block;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    padding-top: 100px;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Botão Iniciar */
.botao-iniciar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    padding: 20px 50px;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 30%, #FF8C00 60%, #FFD700 100%);
    border: 4px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    cursor: pointer;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 5px 15px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 215, 0, 0.6);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.botao-iniciar:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.botao-iniciar:active {
    transform: translate(-50%, -50%) scale(0.98);
}

.botao-iniciar.escondido {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Display Digital */
.display-wrapper {
    position: relative;
    perspective: 1000px;
    z-index: 10;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.display-wrapper.visivel {
    opacity: 1;
    transform: scale(1);
}

.display-digital {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    padding: 50px 60px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 140, 0, 0.3);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.9),
        inset 0 0 50px rgba(255, 140, 0, 0.05),
        0 0 60px rgba(255, 140, 0, 0.15);
}

.digito-container {
    position: relative;
}

.digito-led {
    position: relative;
    width: 180px;
    height: 260px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 10px;
    padding: 20px;
}

/* Luzes LED individuais */
.luz-led {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 140, 0, 0.005);
    transition: all 0.15s ease;
    position: relative;
}

.luz-led.ativo {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 50%, #FFD700 100%);
    box-shadow: 
        0 0 15px rgba(255, 140, 0, 0.8),
        0 0 30px rgba(255, 165, 0, 0.6),
        0 0 45px rgba(255, 140, 0, 0.5),
        0 0 60px rgba(255, 200, 0, 0.3),
        inset 0 0 12px rgba(255, 255, 200, 0.4);
    animation: pulsarLuz 1.5s ease-in-out infinite;
}

@keyframes pulsarLuz {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(255, 140, 0, 0.8),
            0 0 30px rgba(255, 165, 0, 0.6),
            0 0 45px rgba(255, 140, 0, 0.5),
            0 0 60px rgba(255, 200, 0, 0.3),
            inset 0 0 12px rgba(255, 255, 200, 0.4);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(255, 140, 0, 0.9),
            0 0 40px rgba(255, 165, 0, 0.7),
            0 0 60px rgba(255, 140, 0, 0.6),
            0 0 80px rgba(255, 200, 0, 0.4),
            inset 0 0 15px rgba(255, 255, 200, 0.5);
    }
}

/* Efeito de pulso no display */
@keyframes pulsoDisplay {
    0%, 100% {
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.9),
            inset 0 0 50px rgba(255, 140, 0, 0.05),
            0 0 60px rgba(255, 140, 0, 0.15);
    }
    50% {
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.9),
            inset 0 0 50px rgba(255, 140, 0, 0.1),
            0 0 90px rgba(255, 140, 0, 0.25),
            0 0 120px rgba(255, 140, 0, 0.2);
    }
}

.display-digital.girando {
    animation: pulsoDisplay 1s ease-in-out infinite;
}

/* Botão Novo Sorteio */
.botao-novo-sorteio {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(92, 64, 51, 0.7);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 10px rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 0;
    backdrop-filter: blur(5px);
}

.botao-novo-sorteio.visivel {
    opacity: 1;
    pointer-events: auto;
}

.botao-novo-sorteio:hover {
    background: rgba(107, 68, 35, 0.8);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 0 15px rgba(255, 215, 0, 0.2);
    transform: translateX(-50%) translateY(-2px);
}

.botao-novo-sorteio:active {
    transform: translateX(-50%) translateY(0);
}

/* Canvas para confetes */
#confetes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}


/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding-top: 80px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .display-digital {
        gap: 15px;
        padding: 25px 20px;
        flex-wrap: nowrap;
        min-width: fit-content;
    }
    
    .digito-led {
        width: 90px;
        height: 130px;
        gap: 4px;
        padding: 10px;
        min-width: 90px;
    }
    
    .logo-topo img {
        max-width: 250px;
    }
    
    .botao-iniciar {
        padding: 15px 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-top: 60px;
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .display-digital {
        gap: 10px;
        padding: 20px 12px;
        flex-wrap: nowrap;
        min-width: fit-content;
    }
    
    .digito-led {
        width: 70px;
        height: 100px;
        gap: 3px;
        padding: 8px;
        min-width: 70px;
    }
    
    .logo-topo img {
        max-width: 200px;
    }
    
    .botao-iniciar {
        padding: 12px 25px;
        font-size: 20px;
    }
    
    .botao-novo-sorteio {
        bottom: 60px;
        padding: 10px 20px;
        font-size: 16px;
    }
}

