/* ══════════════════════════════════════════
   ESCOLHA DA SEMANA — ANIMAÇÕES
══════════════════════════════════════════ */

/* ── ANIMAÇÃO DE PULSAÇÃO NA ABA ── */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 168, 0, 0.7),
                    0 0 18px rgba(245, 168, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(245, 168, 0, 0),
                    0 0 24px rgba(245, 168, 0, 0.7);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 168, 0, 0),
                    0 0 18px rgba(245, 168, 0, 0.5);
    }
}

@keyframes pulse-border {
    0%, 100% {
        border-color: #f5a800;
        opacity: 1;
    }
    50% {
        border-color: #ffd000;
        opacity: 0.8;
    }
}

@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Aplicar animação quando evento está ativo */
.btn-semana.pulse-active {
    animation: pulse-glow 2s ease-in-out infinite,
               pulse-border 1.5s ease-in-out infinite,
               pulse-scale 2s ease-in-out infinite;
    background: rgba(245, 168, 0, 0.1);
    border-color: #f5a800;
    color: #f5a800;
}

.btn-semana.pulse-active i {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── MURAL DE VENCEDORES ── */
.winners-podium-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(245, 168, 0, 0.05) 0%, rgba(0, 200, 255, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(245, 168, 0, 0.2);
}

.winner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(61, 155, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 160px;
}

/* Posição 2º lugar (esquerda) */
.winner-card.position-2 {
    order: 1;
    height: 280px;
}

/* Posição 1º lugar (centro, maior) */
.winner-card.position-1 {
    order: 2;
    height: 320px;
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(245, 168, 0, 0.15) 0%, rgba(255, 208, 0, 0.08) 100%);
    border: 2px solid rgba(245, 168, 0, 0.4);
    box-shadow: 0 0 30px rgba(245, 168, 0, 0.3);
}

/* Posição 3º lugar (direita) */
.winner-card.position-3 {
    order: 3;
    height: 240px;
}

.winner-medal {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.winner-card.position-1 .winner-medal {
    font-size: 3.5rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(245, 168, 0, 0.25) 0%, rgba(255, 208, 0, 0.15) 100%);
    border: 2px solid rgba(245, 168, 0, 0.5);
    box-shadow: 0 0 20px rgba(245, 168, 0, 0.4);
    animation: medal-bounce 1s ease-in-out infinite;
}

@keyframes medal-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.winner-rank {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blue-bright);
    letter-spacing: 1px;
    margin-top: 4px;
}

.winner-game-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(61, 155, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.winner-game-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.winner-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

.winner-votes {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 8px;
}

.winner-votes strong {
    color: var(--blue-bright);
    font-weight: 700;
}

/* Animação de entrada dos cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.winner-card {
    animation: slideInUp 0.6s ease-out forwards;
}

.winner-card.position-2 {
    animation-delay: 0.1s;
}

.winner-card.position-1 {
    animation-delay: 0.2s;
}

.winner-card.position-3 {
    animation-delay: 0.3s;
}

/* Hover effect */
.winner-card:hover {
    border-color: rgba(61, 155, 255, 0.4);
    box-shadow: 0 8px 24px rgba(61, 155, 255, 0.15);
    transform: translateY(-4px);
}

.winner-card.position-1:hover {
    transform: scale(1.1) translateY(-4px);
}

/* ── EXIBIÇÃO DO MURAL NA HOME ── */
.weekly-wrap .winners-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(61, 155, 255, 0.15);
}

.winners-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.winners-section h3 i {
    color: var(--gold);
    font-size: 1.3rem;
}

/* Animação de confete quando votação encerra */
@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    pointer-events: none;
    animation: confetti-fall 3s ease-in forwards;
}

/* ── RESPONSIVO ── */
@media (max-width: 768px) {
    .winners-podium-wrap {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .winner-card {
        width: 100%;
        max-width: 200px;
        height: auto !important;
    }

    .winner-card.position-1 {
        transform: scale(1);
    }

    .winner-card.position-1:hover {
        transform: scale(1) translateY(-4px);
    }

    .winner-title {
        font-size: 0.8rem;
    }
}

/* ── TEMA CLARO ── */
body.theme-light .winners-podium-wrap {
    background: linear-gradient(135deg, rgba(245, 168, 0, 0.08) 0%, rgba(0, 200, 255, 0.08) 100%);
    border-color: rgba(245, 168, 0, 0.2);
}

body.theme-light .winner-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(61, 155, 255, 0.2);
}

body.theme-light .winner-card.position-1 {
    background: linear-gradient(135deg, rgba(245, 168, 0, 0.2) 0%, rgba(255, 208, 0, 0.1) 100%);
    border-color: rgba(245, 168, 0, 0.4);
}

body.theme-light .winner-title {
    color: #1a1a1a;
}

body.theme-light .winner-rank {
    color: #1565e0;
}

body.theme-light .winner-votes {
    color: #666;
}

body.theme-light .winner-votes strong {
    color: #1565e0;
}
