body {
    background: #102852;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 420px;
    margin: 40px auto;
    background: rgba(16, 40, 82, 0.97);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 32px 16px 16px 16px;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 16px;
}

.logo {
    max-width: 250px;
    margin-bottom: 10px;
}

h1 {
    font-size: 1.5em;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 2px;
}

.upload-area {
    text-align: center;
    margin-bottom: 16px;
}

input[type="file"] {
    display: none;
}

.upload-label {
    background: #e0262a;
    color: #fff;
    padding: 12px 26px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
    transition: background 0.2s;
}

.upload-label:hover {
    background: #b41d22;
}

#drawButton {
    background: #fff;
    color: #e0262a;
    padding: 12px 32px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: 700;
    margin: 10px auto 0 auto;
    display: block;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#drawButton:disabled {
    background: #a3a3a3;
    color: #666;
    cursor: not-allowed;
}

#countdown {
    text-align: center;
    font-size: 2.2em;
    color: #e0262a;
    margin: 16px 0 0 0;
    min-height: 30px;
    font-weight: bold;
}

#winner {
    text-align: center;
    margin-top: 24px;
    min-height: 60px;
}

#winner span {
    display: block;
    font-size: 1.2em;
    margin-top: 8px;
}

.winner-card {
    background: #fff;
    color: #102852;
    border-radius: 10px;
    padding: 20px;
    display: inline-block;
    box-shadow: 0 0 12px rgba(224,38,42,0.12);
    margin-top: 12px;
    animation: winnerpop 0.5s;
}

@keyframes winnerpop {
    0% { transform: scale(0.7); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    opacity: 0.7;
    position: relative;
}

.watermark {
    max-width: 150px;
    opacity: 0.08;
    position: absolute;
    left: 50%;
    top: -60px;
    transform: translateX(-50%);
    pointer-events: none;
}

/* POPUP VENCEDOR */
.popup-overlay {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(10,24,52,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#fireworks {
    position: fixed;
    left: 0; top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

.popup-content {
    position: relative;
    background: #fff;
    color: #102852;
    border-radius: 16px;
    padding: 36px 32px 30px 32px;
    text-align: center;
    min-width: 320px;
    box-shadow: 0 0 30px rgba(224,38,42,0.20);
    z-index: 2;
    animation: popup-show 0.4s;
}

@keyframes popup-show {
    0% { transform: scale(0.7); opacity: 0.1; }
    100% { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 1.6em;
    border: none;
    background: none;
    color: #e0262a;
    cursor: pointer;
    font-weight: bold;
    z-index: 11;
}

#popupWinnerContent {
    margin-top: 10px;
}

.popup-content .winner-card {
    background: none;
    color: #102852;
    box-shadow: none;
    margin: 0;
    font-size: 1.22em;
}

.popup-content strong {
    font-size: 1.7em;
    color: #e0262a;
}

.popup-content span {
    font-size: 1.1em;
    display: block;
    margin-top: 8px;
    color: #102852;
}

/* CANVAS FOGOS */
#fireworks {
    position: fixed;
    left: 0; top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* Ajuste mobile para popup */
@media (max-width: 500px) {
    .container {
        max-width: 99vw;
        padding: 6vw 1vw;
    }
    .popup-content {
        min-width: 0;
        width: 90vw;
        padding: 22px 4vw 18px 4vw;
    }
}
