/* ============================================
   VICTORY.CSS - Tela de Parabéns (Premium Pro)
   Design: High-End Glassmorphism, Vibrante, Dinâmico
============================================ */

/* ============================================
   OVERLAY
============================================ */
#victory-modal.modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    /* Fundo mais escuro para destaque */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: vFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
}

@keyframes vFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

/* ============================================
   CONTAINER PRINCIPAL
============================================ */
.victory-box {
    width: 85%;
    max-width: 300px;
    /* Igual ao Pause (era 280px) */
    max-height: auto;
    border-radius: 20px;
    padding: 0;
    position: relative;
    overflow: hidden;

    /* Estilo Madeira/Papel - Igual Category Select */
    background-image: url('../../../assets/images/home/fundo1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fdf6e3;
    border: 4px solid #5d4037;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: vPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.victory-box.failed {
    /* Manter layout mas talvez mudar tom se falhar? Por enquanto igual */
    border-color: #4a1c1c;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes vPopIn {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Brilho decorativo no topo */
.victory-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
    animation: rotateGlow 15s linear infinite;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   PARTÍCULAS
============================================ */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.particles span {
    position: absolute;
    width: 8px;
    /* Maiores */
    height: 8px;
    border-radius: 50%;
    /* Início no centro óptico do emoji */
    top: 30%;
    left: 50%;
    opacity: 0;
}

/* Melhorando a explosão de partículas */
@keyframes particleShot {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.5);
        opacity: 0;
    }
}

/* Configuração manual das partículas para visual de explosão real */
.particles span:nth-child(1) {
    --tx: -100px;
    --ty: -80px;
    background: #FFD700;
    animation: particleShot 1.2s ease-out 0.2s forwards;
}

.particles span:nth-child(2) {
    --tx: 100px;
    --ty: -80px;
    background: #FF6B6B;
    animation: particleShot 1.2s ease-out 0.25s forwards;
}

.particles span:nth-child(3) {
    --tx: -60px;
    --ty: -120px;
    background: #4ECDC4;
    animation: particleShot 1.2s ease-out 0.3s forwards;
}

.particles span:nth-child(4) {
    --tx: 60px;
    --ty: -120px;
    background: #A29BFE;
    animation: particleShot 1.2s ease-out 0.35s forwards;
}

.particles span:nth-child(5) {
    --tx: -120px;
    --ty: 0px;
    background: #FD79A8;
    animation: particleShot 1.2s ease-out 0.2s forwards;
}

.particles span:nth-child(6) {
    --tx: 120px;
    --ty: 0px;
    background: #00CEC9;
    animation: particleShot 1.2s ease-out 0.25s forwards;
}

.particles span:nth-child(7) {
    --tx: -90px;
    --ty: 80px;
    background: #FDCB6E;
    animation: particleShot 1.2s ease-out 0.3s forwards;
}

.particles span:nth-child(8) {
    --tx: 90px;
    --ty: 80px;
    background: #E17055;
    animation: particleShot 1.2s ease-out 0.35s forwards;
}

.particles span:nth-child(9) {
    --tx: -30px;
    --ty: -140px;
    background: #74B9FF;
    animation: particleShot 1.2s ease-out 0.4s forwards;
}

.particles span:nth-child(10) {
    --tx: 30px;
    --ty: -140px;
    background: #55EFC4;
    animation: particleShot 1.2s ease-out 0.45s forwards;
}

.particles span:nth-child(11) {
    --tx: 0px;
    --ty: -150px;
    background: #FF7675;
    animation: particleShot 1.2s ease-out 0.5s forwards;
}

.particles span:nth-child(12) {
    --tx: 0px;
    --ty: 100px;
    background: #DFE6E9;
    animation: particleShot 1.2s ease-out 0.3s forwards;
}


/* ============================================
   CONTEÚDO
============================================ */
.victory-content {
    padding: 15px 15px;
    /* Reduzido drasticamente para igualar Pause */
    text-align: center;
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    /* Menor gap */
}

/* ============================================
   EMOJI PRINCIPAL
============================================ */
.victory-emoji {
    font-size: 48px;
    /* Reduzido de 72px */
    margin-bottom: 5px;
    /* Reduzido */
    /* Glow branco no emoji para fundo preto */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    animation: emojiEntrance 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s both;
}

@keyframes emojiEntrance {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* ============================================
   TÍTULO
============================================ */
/* ============================================
   TÍTULO - Ajustado para fundo claro
============================================ */
.victory-title {
    font-family: 'Luckiest Guy', cursive;
    font-weight: 400;
    font-size: 24px;
    /* Reduzido */
    line-height: 1.1;
    margin: 5px 0;
    /* Bem menos margem */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;

    /* Contorno forte estilo Category Select */
    text-shadow:
        2px 0 0 #5d4037, -2px 0 0 #5d4037, 0 2px 0 #5d4037, 0 -2px 0 #5d4037,
        1px 1px 0 #5d4037, -1px -1px 0 #5d4037, 1px -1px 0 #5d4037, -1px 1px 0 #5d4037,
        0 3px 6px rgba(0, 0, 0, 0.5);

    -webkit-text-fill-color: initial;
    background: none;

    animation: slideUpFade 0.6s ease-out 0.3s both;
}

.victory-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    /* Menor */
    color: #8d6e63;
    font-weight: 700;
    margin: 0 0 10px 0;
    /* Menos margem */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: slideUpFade 0.6s ease-out 0.4s both;
}

/* ============================================
   STATS - Fundo Madeira
============================================ */
.victory-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    /* Reduzido */

    /* Container com fundo sutil branco */
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    /* Reduzido */
    border-radius: 12px;
    border: 1px solid rgba(93, 64, 55, 0.1);

    animation: slideUpFade 0.6s ease-out 0.5s both;
}

.vstat-val {
    font-family: 'Luckiest Guy', cursive;
    font-size: 20px;
    color: #5d4037;
    /* Marrom escuro */
    letter-spacing: 1px;
    text-shadow: none;
}

.vstat-lbl {
    font-family: 'Poppins', sans-serif;
    font-size: 9px;
    color: #8d6e63;
    /* Marrom suave */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.vstat-divider {
    width: 2px;
    height: 25px;
    background: rgba(93, 64, 55, 0.2);
}

/* ============================================
   RECOMPENSAS
============================================ */
.victory-rewards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    /* Reduzido de 32px */
    animation: slideUpFade 0.6s ease-out 0.6s both;
}

.reward-chip {
    /* Estilo "Glass Pill" */
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    padding: 8px 16px;

    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 0.5px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.reward-chip:hover {
    transform: translateY(-2px);
    background: rgba(255, 215, 0, 0.2);
}

/* ============================================
   BOTÕES
============================================ */
.victory-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reduzido */
    width: 100%;
    animation: slideUpFade 0.6s ease-out 0.7s both;
}

.vbtn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px;
    /* Reduzido de 16px */
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    /* Reduzido de 16px */
    color: white;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    /* Texto com sombra suave */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Efeito de brilho ao passar o mouse */
.vbtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.vbtn:hover::after {
    left: 100%;
}

.vbtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.vbtn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

/* Botão Primário (Continuar) */
.vbtn-primary {
    background: linear-gradient(90deg, #00b894, #00cec9);
    box-shadow: 0 4px 15px rgba(0, 206, 201, 0.4);
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
}

/* Botão Secundário (Menu) - Ajustado para fundo claro */
/* Botão Secundário (Menu) - Ajustado para fundo madeira */
.vbtn-secondary {
    background: rgba(93, 64, 55, 0.1);
    border: 1px solid rgba(93, 64, 55, 0.2);
    color: #5d4037;
    /* Marrom */
    font-size: 14px;
    padding: 12px;
}

.vbtn-secondary:hover {
    background: rgba(93, 64, 55, 0.2);
    border-color: rgba(93, 64, 55, 0.4);
    color: #3e2723;
}

/* ============================================
   UTILITÁRIOS DE ANIMAÇÃO GERAL
============================================ */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVIDADE (Mobile)
============================================ */
@media (max-height: 600px) {
    .victory-box {
        max-width: 320px;
    }

    .victory-content {
        padding: 24px 20px 20px;
    }

    .victory-emoji {
        font-size: 56px;
        margin-bottom: 8px;
    }

    .victory-title {
        font-size: 28px;
    }

    .victory-subtitle {
        margin-bottom: 20px;
    }

    .victory-stats {
        padding: 8px 20px;
        gap: 20px;
        margin-bottom: 16px;
    }

    .vstat-val {
        font-size: 20px;
    }

    .victory-rewards {
        margin-bottom: 20px;
    }

    .vbtn {
        padding: 12px;
        font-size: 14px;
    }
}

/* ============================================
   AD PLACEHOLDER (Invisível)
============================================ */
.ad-sense-placeholder {
    display: none;
}