* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Fredoka One', cursive;
    overflow: hidden;
}

#game-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255, 107, 107, 0.3),
                0 0 80px rgba(78, 205, 196, 0.2);
}

#game-container canvas {
    display: block;
    cursor: none;
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a0a00 0%, #2d1810 50%, #1a0a00 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-panel {
    background: linear-gradient(180deg, #5d4037 0%, #4e342e 100%);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.loader-content {
    background: linear-gradient(180deg, #8b6914 0%, #6d4c0a 100%);
    border-radius: 14px;
    padding: 40px 60px;
    text-align: center;
    border: 3px solid #3d2817;
}

.loader-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.loader-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.5));
    animation: titlePulse 2s ease-in-out infinite;
}

.fire-icon {
    font-size: 2.5rem;
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes fireFlicker {
    0% { transform: scale(1) rotate(-5deg); opacity: 0.9; }
    100% { transform: scale(1.1) rotate(5deg); opacity: 1; }
}

.loader-bar-container {
    background: #3d2817;
    border-radius: 12px;
    padding: 4px;
    margin: 0 auto 20px;
    width: 280px;
}

.loader-bar {
    width: 100%;
    height: 24px;
    background: #2d1810;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f39c12, #e74c3c, #f39c12);
    background-size: 200% 100%;
    border-radius: 8px;
    box-shadow: 
        0 0 10px rgba(243, 156, 18, 0.5),
        inset 0 -3px 6px rgba(0, 0, 0, 0.3),
        inset 0 3px 6px rgba(255, 255, 255, 0.2);
    animation: loading 2s ease-in-out infinite, fireGradient 1s ease infinite;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes fireGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.loader-text {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #d4a853;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
