/* Additional Enhanced Styles */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.menu-screen {
    animation: fadeIn 0.5s ease-in;
}

.level-button:hover {
    animation: pulse 0.5s infinite;
}

.menu-button:active {
    transform: translateY(-1px) scale(0.98);
}

.power-meter {
    animation: slideIn 0.3s ease-out;
}

.hud, .score {
    animation: slideIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-title {
        font-size: 2.5rem;
    }
    
    .menu-button {
        font-size: 1rem;
        padding: 12px 24px;
    }
    
    .level-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .level-button {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    canvas {
        max-width: 100vw;
        max-height: 70vh;
    }
}

/* Special Effects */
.star-effect {
    position: absolute;
    color: #FFD700;
    font-size: 2rem;
    animation: starFloat 2s ease-out forwards;
    pointer-events: none;
}

@keyframes starFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
}

.explosion-effect {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #FFD700 0%, #FF4500 50%, transparent 70%);
    animation: explode 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #FFE4B5 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FF6B6B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Achievement Notifications */
.achievement {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: achievementSlide 3s ease-in-out forwards;
    z-index: 200;
}

@keyframes achievementSlide {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    10%, 90% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #FF5252, #FF7043);
}