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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow: hidden;
    user-select: none;
}

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

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.screen.active {
    display: flex;
}

/* Main Menu Styles */
#main-menu {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.menu-content {
    text-align: center;
    animation: fadeIn 1s ease-in;
}

.game-title {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: #888;
    letter-spacing: 8px;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.menu-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.menu-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.menu-btn.primary {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border-color: #ff6b35;
}

.menu-btn.primary:hover {
    background: linear-gradient(45deg, #ff7b45, #ffa32e);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.player-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 3rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

/* Loading Screen */
#loading-screen {
    background: #0a0a0a;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 107, 53, 0.3);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

.loading-content p {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2rem;
}

.loading-tips {
    max-width: 500px;
    margin: 0 auto;
}

.loading-tips p {
    font-size: 1rem;
    color: #888;
    font-style: italic;
}

/* Game HUD */
#game-hud {
    position: relative;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2d5016;
}

/* HUD Top Bar */
.hud-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.players-remaining, .storm-timer, .kills-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.icon {
    font-size: 1.2rem;
}

/* Minimap */
.minimap-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    z-index: 100;
}

#minimap {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* HUD Bottom */
.hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    z-index: 100;
}

.health-bar-container, .shield-bar-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bar-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.health-bar, .shield-bar {
    width: 200px;
    height: 25px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

#health-fill {
    background: linear-gradient(90deg, #ff4444, #ff6666);
    width: 100%;
}

#shield-fill {
    background: linear-gradient(90deg, #4488ff, #66aaff);
    width: 0%;
}

.bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.weapon-info {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.current-weapon {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

#weapon-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

#ammo-count {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffd700;
}

/* Inventory */
.inventory {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.slot {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slot:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.slot.active {
    border-color: #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

.slot-key {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.7rem;
    color: #888;
    font-weight: 600;
}

.slot-item {
    font-size: 1.8rem;
}

/* Kill Feed */
.kill-feed {
    position: absolute;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.kill-entry {
    background: rgba(0, 0, 0, 0.8);
    padding: 0.6rem 1rem;
    border-radius: 5px;
    border-left: 3px solid #ff6b35;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

/* Loot Popup */
.loot-popup {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 2px solid #ffd700;
    text-align: center;
    z-index: 100;
}

.loot-popup.hidden {
    display: none;
}

.loot-popup .key {
    background: #fff;
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
}

.loot-item {
    margin-top: 0.5rem;
    font-size: 2rem;
}

/* Map Notification */
.map-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    padding: 1.5rem 3rem;
    border-radius: 10px;
    text-align: center;
    z-index: 200;
    animation: pulse 1s ease infinite;
}

.map-notification.hidden {
    display: none;
}

.map-notification p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Game Over Screen */
#game-over {
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.game-over-content {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

#result-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 2rem;
}

#result-title.victory {
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

#result-title.defeat {
    color: #ff4444;
    text-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}

.result-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.result-stat .label {
    font-size: 1rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.result-stat .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

#btn-play-again {
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 3rem;
    }
    
    .menu-buttons {
        flex-direction: column;
    }
    
    .hud-top {
        gap: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .minimap-container {
        width: 150px;
        height: 150px;
    }
    
    .health-bar, .shield-bar {
        width: 150px;
    }
    
    .inventory {
        gap: 0.3rem;
    }
    
    .slot {
        width: 50px;
        height: 50px;
    }
}