/* Reset & basics */
* { margin:0; padding:0; box-sizing:border-box; }
body { background:#1a1a1a; color:#eee; font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow:hidden; }
#game-container { position:relative; width:100vw; height:100vh; }
canvas { display:block; width:100%; height:100%; background:#2b2b2b; image-rendering:pixelated; }

/* Enhanced Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideIn {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(-50%) translateY(0); opacity: 1; }
    to { transform: translateX(-50%) translateY(-20px); opacity: 0; }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.2);
    }
}

@keyframes levelUp {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1.2);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

/* Hover effects for interactive elements */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Modal enhancements */
modal, dialog, .modal-overlay {
    animation: fadeIn 0.3s ease;
}

/* Progress bar smooth transition */
progress, .progress-bar {
    transition: width 0.5s ease-out;
}

/* XP bar glow effect */
.xp-fill {
    animation: glow 2s ease-in-out infinite;
}

/* Quest completed styling */
.quest-completed {
    border-color: #2ECC71 !important;
    background: rgba(46, 204, 113, 0.1) !important;
    animation: pulse 2s ease-in-out infinite;
}

.quest-claimed {
    opacity: 0.6;
}