/* ========== Main Animations ========== */
@keyframes lightSway {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(1deg) scale(1.05); }
    50% { transform: rotate(-1deg) scale(1); }
    75% { transform: rotate(0.5deg) scale(1.02); }
}

@keyframes clouds {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes containerShine {
    0% { left: -100%; }
    50% { left: -100%; }
    100% { left: 100%; }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes xpShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== Particle System ========== */
.particle {
    position: fixed;
    pointer-events: none;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.4);
    z-index: 9999;
}

.particle.star {
    background: radial-gradient(circle, #ffd700, #ffeb3b);
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.9),
        0 0 30px rgba(255, 215, 0, 0.6);
}

.particle.fire {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ff6b00, #ff4500);
    box-shadow: 
        0 0 20px rgba(255, 107, 0, 0.8),
        0 0 40px rgba(255, 69, 0, 0.4);
    border-radius: 50% 50% 50% 0;
    transform: rotate(45deg);
}

.particle.soccer-ball {
    width: 15px;
    height: 15px;
    background: white;
    border: 2px solid #333;
    box-shadow:
        0 0 5px rgba(0, 0, 0, 0.3),
        inset -2px -2px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.particle.soccer-ball::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #333;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

@keyframes particle-up {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes firework {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(var(--x), var(--y)) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* ========== Shot on Goal Animations ========== */
.shot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    pointer-events: none;
    animation: shotOverlayFade 1.8s ease-out forwards;
}

@keyframes shotOverlayFade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

.shot-ball {
    position: fixed;
    width: 40px;
    height: 40px;
    background: white;
    border: 3px solid #333;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: shotFly 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes shotFly {
    0% {
        bottom: 15%;
        left: 50%;
        transform: translate(-50%, 0) scale(1.2) rotate(0deg);
        opacity: 1;
    }
    60% {
        bottom: 55%;
        left: 50%;
        transform: translate(-50%, 0) scale(0.7) rotate(360deg);
        opacity: 1;
    }
    100% {
        bottom: 60%;
        left: 50%;
        transform: translate(-50%, 0) scale(0.5) rotate(540deg);
        opacity: 0;
    }
}

.goal-result {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.5em;
    font-weight: 900;
    color: #4CAF50;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3), 0 0 30px rgba(76, 175, 80, 0.6);
    z-index: 10000;
    animation: goalNetRipple 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(232, 245, 233, 0.9));
    padding: 20px 40px;
    border-radius: 25px;
    border: 4px solid #4CAF50;
    white-space: nowrap;
    box-shadow: 0 15px 30px rgba(76, 175, 80, 0.4), 0 0 40px rgba(76, 175, 80, 0.3);
}

@keyframes goalNetRipple {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
    25% { transform: translate(-50%, -50%) scale(1.2) rotate(3deg); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

.save-result {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.2em;
    font-weight: 900;
    color: #FF6B00;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3), 0 0 25px rgba(255, 107, 0, 0.6);
    z-index: 10000;
    animation: keeperDive 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 224, 0.9));
    padding: 18px 35px;
    border-radius: 25px;
    border: 4px solid #FF6B00;
    white-space: nowrap;
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.3), 0 0 30px rgba(255, 107, 0, 0.2);
}

@keyframes keeperDive {
    0% { transform: translate(-50%, -50%) scale(0) translateX(30px); opacity: 0; }
    25% { transform: translate(-50%, -50%) scale(1.15) translateX(-5px); opacity: 1; }
    40% { transform: translate(-50%, -50%) scale(1) translateX(0); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1) translateX(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* ========== Notification Animations ========== */
.strike-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 5em;
    font-weight: 900;
    color: #ff5252;
    text-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(255, 82, 82, 0.5);
    z-index: 1000;
    animation: strikePopup 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    font-style: italic;
}

@keyframes strikePopup {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5) rotate(10deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(180deg);
        opacity: 0;
    }
}

/* Completion celebration notification */
.completion-notification {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2.8em;
    font-weight: 900;
    color: #4CAF50;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(76, 175, 80, 0.6);
    z-index: 1000;
    animation: celebrationPopup 3.33s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    text-align: center;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    border-radius: 25px;
    border: 3px solid #4CAF50;
    white-space: nowrap;
}

@keyframes celebrationPopup {
    0% {
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 0;
    }
    10% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
    20% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    90% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
}

/* Field-centered celebration notification */
.field-celebration {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    font-size: 2.2em;
    font-weight: 900;
    color: #4CAF50;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(76, 175, 80, 0.6);
    z-index: 1000;
    animation: fieldCelebrationPopup 3.33s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 20px;
    border: 3px solid #4CAF50;
    white-space: nowrap;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(76, 175, 80, 0.4);
}

/* Field scoring message below the field */
.field-scoring-message {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    font-size: 1.8em;
    font-weight: 900;
    color: #4CAF50;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(76, 175, 80, 0.6);
    z-index: 1000;
    animation: fieldCelebrationPopup 3.33s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    text-align: center;
    padding: 12px 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-radius: 15px;
    border: 2px solid #4CAF50;
    white-space: nowrap;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(76, 175, 80, 0.4);
}

@keyframes fieldCelebrationPopup {
    0% {
        transform: translateX(-50%) scale(0.1);
        opacity: 0;
    }
    15% {
        transform: translateX(-50%) scale(1.15);
        opacity: 1;
    }
    30% {
        transform: translateX(-50%) scale(0.95);
        opacity: 1;
    }
    45% {
        transform: translateX(-50%) scale(1.05);
        opacity: 1;
    }
    60% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(0.9);
        opacity: 0;
    }
}

.scoring-message {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-weight: 900;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 255, 255, 0.3);
    z-index: 1000;
    animation: scoringPopup 3.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    text-align: center;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    border-radius: 25px;
    border: 3px solid currentColor;
    white-space: nowrap;
}

@keyframes scoringPopup {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 1;
    }
    45% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    85% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
}

/* ========== Screen Effects ========== */
@keyframes screenShake {
    0%, 100% { transform: translateX(0) translateY(0); }
    10% { transform: translateX(-5px) translateY(-3px); }
    20% { transform: translateX(5px) translateY(3px); }
    30% { transform: translateX(-3px) translateY(5px); }
    40% { transform: translateX(3px) translateY(-5px); }
    50% { transform: translateX(-5px) translateY(3px); }
    60% { transform: translateX(5px) translateY(-3px); }
    70% { transform: translateX(-3px) translateY(-5px); }
    80% { transform: translateX(3px) translateY(5px); }
    90% { transform: translateX(-5px) translateY(-3px); }
}

/* Ground ball dust effect */
.ground-ball-dust {
    position: absolute;
    background: rgba(139, 121, 94, 0.6);
    border-radius: 50%;
    z-index: 198;
    pointer-events: none;
} 