@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
    background: #000;
    color: #fff;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: none;
}

/* HUD Styles */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#hud.hidden {
    display: none;
}

.hud-label {
    font-size: 10px;
    color: #FFD700;
    margin-bottom: 5px;
    text-shadow: 2px 2px #000;
}

.hud-value {
    font-size: 16px;
    color: #FFF;
    text-shadow: 2px 2px #000;
}

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

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

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

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

#weapon-display {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#health-bar {
    width: 150px;
    height: 20px;
    background: #333;
    border: 2px solid #FFD700;
    margin-top: 5px;
    position: relative;
}

#health-fill {
    height: 100%;
    background: #00FF00;
    transition: width 0.3s, background 0.3s;
}

#minimap {
    width: 120px;
    height: 120px;
    border: 2px solid #FFD700;
    background: rgba(0, 0, 0, 0.7);
}

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

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: #00FF00;
}

#crosshair::before {
    width: 2px;
    height: 20px;
    left: 9px;
}

#crosshair::after {
    width: 20px;
    height: 2px;
    top: 9px;
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a0033 0%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.title-container {
    text-align: center;
    margin-bottom: 50px;
    animation: pulse 2s infinite;
}

.game-title {
    font-size: 48px;
    color: #FF00FF;
    text-shadow: 4px 4px #8B00FF, 8px 8px #000;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 14px;
    color: #FFD700;
    text-shadow: 2px 2px #000;
}

.start-prompt {
    font-size: 16px;
    color: #00FF00;
    text-shadow: 2px 2px #000;
    animation: blink 1s infinite;
    margin-bottom: 80px;
}

.credits {
    position: absolute;
    bottom: 40px;
    text-align: center;
    font-size: 10px;
    color: #888;
}

.credits div {
    margin: 5px 0;
}

.credits a {
    color: #FF00FF;
    text-decoration: none;
}

.credits a:hover {
    color: #FFD700;
}

.controls-info {
    position: absolute;
    bottom: 100px;
    font-size: 10px;
    color: #AAA;
    text-align: center;
}

/* Game Over Screen */
#gameover-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#gameover-screen.hidden {
    display: none;
}

.gameover-container {
    text-align: center;
}

.gameover-title {
    font-size: 48px;
    color: #FF0000;
    text-shadow: 4px 4px #000;
    margin-bottom: 40px;
}

.stats {
    margin-bottom: 40px;
}

.stat-row {
    font-size: 16px;
    color: #FFD700;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.restart-prompt {
    font-size: 14px;
    color: #00FF00;
    animation: blink 1s infinite;
}

/* Loading Screen */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.loading-text {
    font-size: 16px;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 2px 2px #000;
}

.loading-bar {
    width: 300px;
    height: 20px;
    border: 2px solid #FFD700;
    background: #000;
}

#loading-progress {
    height: 100%;
    background: #00FF00;
    width: 0%;
    transition: width 0.3s;
}

/* Animations */
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .game-title {
        font-size: 32px;
    }
    
    .hud-label {
        font-size: 8px;
    }
    
    .hud-value {
        font-size: 12px;
    }
    
    #minimap {
        width: 80px;
        height: 80px;
    }
    
    #health-bar {
        width: 100px;
    }
    
    .controls-info {
        font-size: 8px;
        padding: 0 20px;
    }
}