@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Orbitron:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #1a0000 0%, #4a0000 50%, #1a0000 100%);
    color: #ff6b35;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

#gameContainer {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(139, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
}

#titleScreen {
    background: url('LAST MAN STANDING artwork.jpg') center center / cover no-repeat,
                radial-gradient(circle at center, rgba(139, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    background-blend-mode: overlay;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

/* Title Screen */
#logoImage {
    width: 600px;
    height: auto;
    max-width: 90vw;
    filter: drop-shadow(0 0 10px #ff4500) 
            drop-shadow(0 0 20px #ff4500) 
            drop-shadow(0 0 30px #ff4500) 
            drop-shadow(0 0 40px #ff4500);
    margin-bottom: 10px;
    animation: flicker 2s infinite alternate;
}

#fallbackTitle {
    font-family: 'Creepster', cursive;
    font-size: 5em;
    color: #ff4500;
    text-shadow: 
        0 0 10px #ff4500,
        0 0 20px #ff4500,
        0 0 30px #ff4500,
        0 0 40px #ff4500;
    margin-bottom: 10px;
    animation: flickerText 2s infinite alternate;
}

#titleScreen h2 {
    font-size: 2em;
    color: #ff6b35;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(255, 107, 53, 0.6);
    margin-bottom: 30px;
    letter-spacing: 3px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
}

#titleScreen p {
    font-size: 1.2em;
    color: #ffaa80;
    text-align: center;
    margin-bottom: 10px;
    max-width: 600px;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(255, 170, 128, 0.4);
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

button {
    font-family: 'Orbitron', monospace;
    font-size: 1.5em;
    font-weight: 700;
    padding: 15px 30px;
    background: linear-gradient(45deg, #8b0000, #ff4500);
    color: white;
    border: 3px solid #ff4500;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 20px rgba(255, 69, 0, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
}

button:hover {
    background: linear-gradient(45deg, #ff4500, #ff6b35);
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.8);
    transform: translateY(-2px);
}

/* Game Mode Selector Styles */
#gameMode {
    margin: 20px 0;
    text-align: center;
}

#gameMode h3 {
    color: #ff4500;
    font-size: 1.2em;
    margin-bottom: 15px;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(255, 69, 0, 0.4);
}

#gameModeSelector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    font-size: 1.2em;
    padding: 12px 24px;
    background: linear-gradient(45deg, #4a0000, #8b0000);
    color: #ff6b35;
    border: 2px solid #8b0000;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 15px rgba(139, 0, 0, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(255, 107, 53, 0.3);
}

.mode-btn:hover {
    background: linear-gradient(45deg, #8b0000, #ff4500);
    border-color: #ff4500;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.7);
    transform: translateY(-1px);
}

.mode-btn.active {
    background: linear-gradient(45deg, #ff4500, #ff6b35);
    border-color: #ff6b35;
    color: white;
    box-shadow: 
        0 0 25px rgba(255, 69, 0, 0.8),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#streamBtn {
    background: linear-gradient(45deg, #ff6b35, #ff4500);
    margin-top: 20px;
    border-color: #ff6b35;
    position: relative;
}

#streamBtn:hover {
    background: linear-gradient(45deg, #ff4500, #ff6b35);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    transform: translateY(-2px);
}

#streamBtn:before {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

#controls {
    position: relative;
    text-align: center;
    color: #cc9966;
    width: auto;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    backdrop-filter: blur(5px);
    margin-top: 20px;
}

#controls h3 {
    color: #ff6b35;
    margin-bottom: 8px;
    font-size: 1.2em;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 8px rgba(255, 107, 53, 0.6);
}

#controls p {
    margin: 3px 0;
    font-size: 0.85em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

/* Game Screen */
#gameScreen {
    background: none;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    background: #1a0000;
    width: 100vw;
    height: 100vh;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    cursor: crosshair;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* HUD */
#hud {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    z-index: 1000;
    pointer-events: none;
}

#healthBar {
    width: 200px;
    height: 30px;
    background: rgba(139, 0, 0, 0.8);
    border: 2px solid #ff4500;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

#healthFill {
    height: 100%;
    background: linear-gradient(90deg, #ff4500, #ff6b35);
    width: 100%;
    transition: width 0.3s ease;
}

#healthText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

#ammoDisplay, #weaponDisplay, #scoreDisplay, #waveDisplay, #powerupDisplay {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff4500;
    border-radius: 5px;
    padding: 10px 15px;
    color: #ff6b35;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    min-width: 120px;
    text-align: center;
}

#powerupDisplay {
    background: rgba(138, 43, 226, 0.2);
    border-color: #8a2be2;
    color: #dda0dd;
    min-width: 200px;
    font-size: 0.9em;
}

/* Game Over Screen */
#gameOverScreen h1 {
    font-family: 'Creepster', cursive;
    font-size: 4em;
    text-shadow: 
        0 0 10px #8b0000,
        0 0 20px #8b0000,
        0 0 30px #8b0000;
    margin-bottom: 30px;
}

#gameOverScreen p {
    font-size: 1.5em;
    color: #ff6b35;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Congratulations Screen */
#congratulationsScreen {
    background: url('LAST MAN STANDING artwork.jpg') center center / cover no-repeat,
                radial-gradient(circle at center, rgba(255, 215, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    background-blend-mode: overlay;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

#congratulationsScreen h1 {
    font-family: 'Creepster', cursive;
    font-size: 4em;
    color: #ff3300;
    text-shadow: 
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        0 0 30px #ffd700,
        0 0 40px #ffd700;
    margin-bottom: 10px;
    animation: flicker 2s infinite alternate;
}

#congratulationsScreen h2 {
    font-size: 2.2em;
    color: #ffaa00;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(255, 170, 0, 0.8);
    margin-bottom: 20px;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #ffd700;
}

#congratulationsScreen p {
    font-size: 1.4em;
    color: #ffdd88;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(255, 221, 136, 0.6);
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

#congratulationsScreen .achievement {
    font-style: italic;
    color: #ffcc66;
    font-size: 1.2em;
    margin-bottom: 30px;
}

#congratulationsScreen button {
    margin: 10px;
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    border-color: #ffd700;
    color: #000000;
    font-weight: 900;
    text-shadow: none;
}

#congratulationsScreen button:hover {
    background: linear-gradient(45deg, #ffaa00, #ffd700);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    transform: translateY(-2px);
}

#secretDownloadBtn {
    background: linear-gradient(45deg, #8a2be2, #9370db) !important;
    border-color: #8a2be2 !important;
    color: white !important;
}

#secretDownloadBtn:hover {
    background: linear-gradient(45deg, #9370db, #8a2be2) !important;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.8) !important;
}

/* Animations */
@keyframes flicker {
    0%, 100% {
        filter: drop-shadow(0 0 10px #ff4500) 
                drop-shadow(0 0 20px #ff4500) 
                drop-shadow(0 0 30px #ff4500) 
                drop-shadow(0 0 40px #ff4500);
    }
    50% {
        filter: drop-shadow(0 0 5px #ff4500) 
                drop-shadow(0 0 10px #ff4500) 
                drop-shadow(0 0 15px #ff4500) 
                drop-shadow(0 0 20px #ff4500);
    }
}

@keyframes flickerText {
    0%, 100% {
        text-shadow: 
            0 0 10px #ff4500,
            0 0 20px #ff4500,
            0 0 30px #ff4500,
            0 0 40px #ff4500;
    }
    50% {
        text-shadow: 
            0 0 5px #ff4500,
            0 0 10px #ff4500,
            0 0 15px #ff4500,
            0 0 20px #ff4500;
    }
}

/* Responsive Design */
@media (max-width: 1300px) {
    #hud {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #hud > div {
        font-size: 0.9em;
        padding: 8px 12px;
        min-width: 100px;
    }
    
    #healthBar {
        width: 150px;
        height: 25px;
    }
}

@media (max-width: 800px) {
    #logoImage {
        width: 400px;
        max-width: 85vw;
    }
    
    #fallbackTitle {
        font-size: 3em;
    }
    
    #titleScreen h2 {
        font-size: 1.5em;
        padding: 8px 15px;
        background: rgba(0, 0, 0, 0.5);
    }
    
    #titleScreen p {
        font-size: 1em;
        padding: 12px 20px;
        background: rgba(0, 0, 0, 0.6);
        max-width: 90%;
        margin-bottom: 25px;
    }
    
    #titleScreen {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 30px;
    }
    
    button {
        font-size: 1.2em;
        padding: 12px 24px;
    }
    
    #streamBtn {
        margin-top: 15px;
        margin-bottom: 15px;
        padding: 10px 20px;
    }
    
    #controls {
        max-width: 300px;
        padding: 12px 15px;
        background: rgba(0, 0, 0, 0.8);
        margin-top: 20px;
    }
    
    #controls h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    #controls p {
        font-size: 0.75em;
        margin: 2px 0;
        line-height: 1.2;
    }
    
    #congratulationsScreen {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 20px;
    }
    
    #congratulationsScreen h1 {
        font-size: 2.5em;
        margin-bottom: 5px;
    }
    
    #congratulationsScreen h2 {
        font-size: 1.6em;
        margin-bottom: 15px;
        padding: 8px 15px;
    }
    
    #congratulationsScreen p {
        font-size: 1.1em;
        margin: 10px 0;
        padding: 10px 15px;
    }
    
    #congratulationsScreen .achievement {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    #congratulationsScreen button {
        font-size: 1.1em;
        padding: 12px 20px;
        margin: 8px;
    }
} 