body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    color: white;
    padding: env(safe-area-inset-top) 10px env(safe-area-inset-bottom) 10px;
    box-sizing: border-box;
}

.header-area { 
    text-align: center; 
    margin-bottom: 10px; 
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-logo {
    width: 120px;
    max-width: 30vw;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.results-badge {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.results-badge h1 { 
    margin: 0;
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: 2px; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.podium-container {
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    gap: 15px;
    width: 80%; 
    max-width: 1400px;
    margin: auto 0;
    flex-grow: 0;
}

.winner-card {
    border-radius: 15px;
    width: 30%; max-width: 350px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 75px; 
    padding-bottom: 20px;
    opacity: 0;
    transform: translateY(50px);
    animation: popUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.winner-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    background: #eee;
    z-index: 2;
}

.winner-info {
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
}

.winner-name {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 5px;
    display: block;
}

.winner-act {
    font-size: 0.9em;
    opacity: 0.8;
    display: block;
    margin-bottom: 10px;
}

.points-pill {
    display: inline-block;
    background: rgba(0,0,0,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8em;
    z-index: 3;
}

.rank-3 {
    order: 3;
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: white;
    animation-delay: 0.5s;
    margin-bottom: 0;
}

.rank-3 .winner-img {
    border-color: #cd7f32;
}

.rank-2 {
    order: 1;
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: #2c3e50;
    animation-delay: 1.5s;
    margin-bottom: 30px;
}

.rank-2 .winner-img {
    border-color: #bdc3c7;
}

.rank-2 .points-pill {
    background: rgba(255,255,255,0.4);
}

.rank-1 {
    order: 2;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #4a3b05;
    animation-delay: 2.5s;
    margin-bottom: 60px;
    transform: translateY(50px) scale(1.1);
    z-index: 5;
}

.rank-1 .winner-img {
    border-color: #f1c40f;
    width: 110px;
    height: 110px;
    top: -55px;
}

.rank-1 .points-pill {
    background: rgba(255,255,255,0.4);
}

@keyframes popUp {
    0% { opacity: 0; transform: translateY(80px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.rank-1 {
    animation-name: popUpBig;
}

@keyframes popUpBig {
    0% { opacity: 0; transform: translateY(80px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1.15); }
}

.footer-msg {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 40px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 0.8em; opacity: 0.7; text-align: center; 
    margin-bottom: 55px; 
}

@media (max-width: 767px) {
    .footer-msg {
        margin-bottom: 85px; 
    }

    .podium-container { 
        width: 100%; 
        gap: 8px; 
        align-items: flex-end; 
    }
    
    .winner-card {
        width: 32%;
        padding-top: 55px;
    } 
    
    .rank-2 {
        margin-bottom: 20px;
    }

    .rank-1 {
        margin-bottom: 40px;
    }
    
    .winner-img {
        width: 60px;
        height: 60px;
        top: -30px;
        border-width: 3px;
    }

    .rank-1 .winner-img {
        width: 80px;
        height: 80px;
        top: -40px;
    }
    
    .rank-badge {
        font-size: 0.7em;
        padding: 2px 6px;
        top: 5px;
        left: 5px;
    }

    .points-pill {
        font-size: 0.7em;
        padding: 2px 8px;
    }
}