* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #2c3e50;
    overflow: hidden;
    user-select: none;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* HUD Styles */
.hud {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.health-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.health-bar {
    width: 200px;
    height: 20px;
    background: rgba(255,255,255,0.3);
    border: 2px solid #fff;
    border-radius: 10px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60);
    transition: width 0.3s ease;
    width: 100%;
}

.health-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 5px;
    max-width: 200px;
}

.health-heart {
    width: 16px;
    height: 16px;
    background-image: url('images/health.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
}

.health-heart.empty {
    opacity: 0.3;
    filter: grayscale(100%);
}

.ammo-counter, .kill-counter, .zone-timer, .players-alive {
    margin-bottom: 5px;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

.ammo-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 5px;
    max-width: 200px;
}

.ammo-bullet {
    width: 12px;
    height: 16px;
    background-image: url('images/bullet.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
}

.ammo-bullet.empty {
    opacity: 0.3;
    filter: grayscale(100%);
}

/* Canvas */
#gameCanvas {
    background: #34495e;
    display: block;
    cursor: none;
}

/* Minimap */
.minimap {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 200px;
    height: 200px;
    border: 3px solid #fff;
    border-radius: 10px;
    overflow: hidden;
    z-index: 100;
}

#minimapCanvas {
    width: 100%;
    height: 100%;
    background: #2c3e50;
}

.minimap-zone {
    position: absolute;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    pointer-events: none;
    transition: all 1s ease;
}

/* Game Over Screen */
.game-over-screen, .victory-screen, .start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 200;
}

.game-over-screen h2, .victory-screen h2, .start-screen h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.victory-screen h2 {
    color: #f1c40f;
    text-shadow: 2px 2px 4px rgba(241, 196, 15, 0.5);
}

.game-over-screen p, .victory-screen p, .start-screen p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.game-over-screen button, .victory-screen button, .start-screen button {
    padding: 15px 30px;
    font-size: 1.2em;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.game-over-screen button:hover, .victory-screen button:hover, .start-screen button:hover {
    background: #c0392b;
}

.twitter-share-button {
    background: #1da1f2 !important;
    margin-top: 10px !important;
}

.twitter-share-button:hover {
    background: #0d8bd9 !important;
}

.start-screen button {
    background: #27ae60;
}

.start-screen button:hover {
    background: #229954;
}

.game-over-screen.hidden, .victory-screen.hidden, .start-screen.hidden {
    display: none;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    z-index: 150;
    pointer-events: none;
}

.mobile-controls.show {
    display: block;
}

.joystick-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    pointer-events: auto;
    z-index: 151;
}

.joystick-outer {
    width: 120px;
    height: 120px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    touch-action: none;
    user-select: none;
}

.joystick-inner {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: none;
    pointer-events: none;
}

.mobile-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: auto;
    z-index: 151;
}

.shoot-button, .reload-button {
    width: 80px;
    height: 60px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    touch-action: manipulation;
    user-select: none;
    cursor: pointer;
}

.shoot-button {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.shoot-button:active {
    background: #c0392b;
    transform: scale(0.95);
}

.reload-button {
    background: #f39c12;
    color: white;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.reload-button:active {
    background: #e67e22;
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    .mobile-controls {
        display: block;
    }
    
    .crosshair {
        display: none; /* Hide crosshair on mobile */
    }
    
    .hud {
        font-size: 0.7em;
        top: 5px;
        left: 5px;
    }
    
    .health-bar {
        width: 120px;
        height: 12px;
    }
    
    .health-bar-container {
        gap: 5px;
        margin-bottom: 5px;
    }
    
    .ammo-counter, .kill-counter, .zone-timer, .players-alive {
        margin-bottom: 3px;
        padding: 3px 6px;
        font-size: 0.9em;
    }
    
    .minimap {
        width: 100px;
        height: 100px;
        top: 5px;
        right: 5px;
    }
    
    .game-over-screen h2, .victory-screen h2, .start-screen h1 {
        font-size: 2em;
    }
    
    .game-over-screen p, .victory-screen p, .start-screen p {
        font-size: 1em;
        padding: 0 20px;
        text-align: center;
    }
    
    .game-over-screen button, .victory-screen button, .start-screen button {
        padding: 12px 25px;
        font-size: 1em;
        touch-action: manipulation;
    }
}

@media (max-width: 480px) {
    .hud {
        font-size: 0.6em;
    }
    
    .health-bar {
        width: 100px;
        height: 10px;
    }
    
    .minimap {
        width: 80px;
        height: 80px;
    }
    
    .joystick-outer {
        width: 100px;
        height: 100px;
    }
    
    .joystick-inner {
        width: 35px;
        height: 35px;
    }
    
    .shoot-button, .reload-button {
        width: 70px;
        height: 50px;
        font-size: 12px;
    }
    
    .mobile-buttons {
        gap: 10px;
    }
}
