* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    overflow: hidden;
    touch-action: none;
    position: fixed;
    width: 100%;
    height: 100%;
}

#game-canvas {
    width: 100%;
    height: 100vh;
    display: block;
    touch-action: none;
}

/* Main Menu */
#main-menu, #pause-menu, #gameover-screen, #victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2a 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.menu-container {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 100, 0, 0.5);
    box-shadow: 0 0 40px rgba(255, 100, 0, 0.3);
}

.game-title {
    font-size: 64px;
    color: #ff6400;
    text-shadow: 0 0 20px rgba(255, 100, 0, 0.8);
    margin-bottom: 10px;
    letter-spacing: 8px;
}

.game-subtitle {
    font-size: 18px;
    color: #ffa040;
    margin-bottom: 40px;
    opacity: 0.9;
}

.menu-btn {
    padding: 15px 40px;
    font-size: 20px;
    background: transparent;
    color: #ff6400;
    border: 2px solid #ff6400;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    transition: all 0.3s;
    margin: 10px;
    font-weight: bold;
}

.menu-btn:hover {
    background: rgba(255, 100, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.5);
    transform: scale(1.05);
}

.controls-hint {
    margin-top: 30px;
    font-size: 14px;
    color: #888;
    line-height: 1.8;
}

.desktop-hint, .mobile-hint {
    margin: 5px 0;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    color: #ff6400;
    font-family: 'Courier New', monospace;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}

#crosshair::before, #crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 100, 0, 0.9);
    box-shadow: 0 0 10px rgba(255, 100, 0, 0.6);
}

#crosshair::before {
    width: 2px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#crosshair::after {
    width: 16px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#top-left {
    position: absolute;
    top: 20px;
    left: 20px;
}

#health-display span {
    font-size: 14px;
    color: #ff6400;
    display: block;
    margin-bottom: 5px;
}

#health-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 0, 0, 0.3);
    border: 1px solid rgba(255, 100, 0, 0.5);
    position: relative;
    margin: 5px 0;
}

#health-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0000, #ff6400);
    box-shadow: 0 0 10px rgba(255, 100, 0, 0.8);
    transition: width 0.3s ease;
}

#health-value {
    font-size: 18px;
    font-weight: bold;
}

#top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
}

#mission-title {
    font-size: 16px;
    color: #ff6400;
    margin-bottom: 10px;
    font-weight: bold;
}

#mission-objective {
    font-size: 14px;
    color: #ffa040;
    margin: 5px 0;
}

#mission-progress {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

#bottom-right {
    position: absolute;
    bottom: 30px;
    right: 30px;
}

#ammo-display {
    font-size: 32px;
    font-weight: bold;
    color: #ff6400;
    text-shadow: 0 0 10px rgba(255, 100, 0, 0.6);
}

#hit-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    opacity: 0;
    pointer-events: none;
}

#hit-marker.active {
    animation: hitMarkerAnim 0.2s ease-out;
}

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

#hit-marker::before, #hit-marker::after {
    content: '';
    position: absolute;
    background: #ff0000;
    box-shadow: 0 0 5px #ff0000;
}

#hit-marker::before {
    width: 3px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

#hit-marker::after {
    width: 3px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

#message-display {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff6400;
    font-size: 18px;
    color: #ff6400;
    text-align: center;
    display: none;
    animation: messageFade 3s ease-out;
    white-space: nowrap;
}

@keyframes messageFade {
    0%, 10% { opacity: 1; }
    90%, 100% { opacity: 0; }
}

/* Mobile Controls */
#mobile-controls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

#joystick-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 120px;
    height: 120px;
    pointer-events: all;
}

#joystick-base {
    width: 100%;
    height: 100%;
    background: rgba(255, 100, 0, 0.15);
    border: 2px solid rgba(255, 100, 0, 0.4);
    border-radius: 50%;
}

#joystick-stick {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 100, 0, 0.5);
    border: 2px solid rgba(255, 100, 0, 0.7);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: none;
}

.mobile-btn {
    position: absolute;
    background: rgba(255, 100, 0, 0.2);
    border: 2px solid rgba(255, 100, 0, 0.5);
    border-radius: 50%;
    color: #ff6400;
    font-size: 24px;
    font-weight: bold;
    pointer-events: all;
    touch-action: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
}

.mobile-btn:active {
    background: rgba(255, 100, 0, 0.4);
}

#shoot-btn {
    bottom: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
}

#reload-btn {
    bottom: 140px;
    right: 30px;
    width: 60px;
    height: 60px;
}

#jump-btn {
    bottom: 40px;
    right: 140px;
    width: 60px;
    height: 60px;
}

#crouch-btn {
    bottom: 240px;
    right: 30px;
    width: 60px;
    height: 60px;
}

/* Status Screens */
.status-title {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px currentColor;
}

.status-title.victory {
    color: #00ff00;
}

.status-title.defeat {
    color: #ff0000;
}

.status-message {
    font-size: 20px;
    color: #ffa040;
    margin-bottom: 30px;
}

#gameover-stats, #victory-stats {
    margin: 20px 0;
    font-size: 16px;
    color: #888;
    line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
    #mobile-controls {
        display: block;
    }

    .mobile-hint {
        display: block;
    }

    .desktop-hint {
        display: none;
    }

    .game-title {
        font-size: 36px;
        letter-spacing: 4px;
    }

    .game-subtitle {
        font-size: 14px;
    }

    .menu-btn {
        font-size: 16px;
        padding: 12px 30px;
    }

    #health-bar {
        width: 150px;
    }

    #ammo-display {
        font-size: 24px;
        bottom: 150px;
    }

    #bottom-right {
        bottom: 150px;
    }

    .status-title {
        font-size: 32px;
    }

    .status-message {
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    .mobile-hint {
        display: none;
    }
}
