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

body {
    overflow: hidden;
    background: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#renderCanvas {
    width: 100vw;
    height: 100vh;
    display: block;
}

/* Menu Screens */
.menu-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.menu-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="80" opacity="0.03">🏚️</text></svg>');
    background-size: 200px;
    pointer-events: none;
}

.menu-content {
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 40px;
    position: relative;
    z-index: 1;
}

.game-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 10px;
    text-shadow: 0 0 20px rgba(255, 100, 0, 0.8),
                 0 0 40px rgba(255, 50, 0, 0.5);
    margin-bottom: 10px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 20px rgba(255, 100, 0, 0.8), 0 0 40px rgba(255, 50, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 150, 0, 1), 0 0 60px rgba(255, 100, 0, 0.8); }
}

.subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 40px;
    letter-spacing: 5px;
}

.menu-section {
    margin: 30px 0;
}

.menu-section h2 {
    font-size: 1.3rem;
    color: #aaa;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Team Selection */
.team-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.team-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 30px;
    width: 250px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.team-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px);
}

.team-btn.selected {
    background: rgba(255, 100, 0, 0.2);
    border-color: #ff6400;
    box-shadow: 0 0 30px rgba(255, 100, 0, 0.3);
}

.team-btn[data-team="police"].selected {
    background: rgba(0, 100, 255, 0.2);
    border-color: #0066ff;
    box-shadow: 0 0 30px rgba(0, 100, 255, 0.3);
}

.team-icon {
    font-size: 3rem;
}

.team-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}

.team-desc {
    font-size: 0.8rem;
    color: #888;
}

/* Weapon Selection */
.weapon-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.weapon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.weapon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.weapon-btn.selected {
    background: rgba(255, 100, 0, 0.2);
    border-color: #ff6400;
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.3);
}

.weapon-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}

.weapon-stats {
    font-family: monospace;
    font-size: 0.9rem;
    color: #0f0;
}

.weapon-desc {
    font-size: 0.85rem;
    color: #888;
}

/* Start Button */
.start-btn {
    background: linear-gradient(135deg, #ff6400, #ff3300);
    border: none;
    border-radius: 8px;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    margin-top: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 100, 0, 0.5);
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px 40px;
    font-size: 1.1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

/* Controls Info */
.controls-info {
    margin-top: 40px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.controls-info h3 {
    margin-bottom: 15px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 10px 20px;
    justify-content: center;
    font-size: 0.9rem;
}

.controls-grid span:nth-child(odd) {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 5px;
    font-family: monospace;
    text-align: right;
}

.controls-grid span:nth-child(even) {
    color: #888;
    text-align: left;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
}

.hud-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.kills-counter {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 30px;
    border-radius: 5px;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.health-bar {
    width: 250px;
    height: 30px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.health-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff00, #88ff00);
    transition: width 0.3s ease;
}

.health-fill.low {
    background: linear-gradient(90deg, #ff0000, #ff4400);
    animation: healthPulse 0.5s ease-in-out infinite;
}

@keyframes healthPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 5px #000;
}

.weapon-info {
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 30px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.current-weapon {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.ammo-counter {
    font-size: 1.8rem;
    color: #0f0;
    font-family: monospace;
}

.ammo-counter.low {
    color: #ff0;
    animation: ammoPulse 0.5s ease-in-out infinite;
}

.ammo-counter.empty {
    color: #f00;
}

@keyframes ammoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.equipment {
    display: flex;
    gap: 15px;
}

.equip-slot {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 5px;
    color: #888;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.equip-slot.active {
    color: #fff;
    border-color: #ff6400;
    background: rgba(255, 100, 0, 0.2);
}

/* Crosshair */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crosshair-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

.crosshair-line.top {
    width: 2px;
    height: 15px;
    top: -25px;
    left: -1px;
}

.crosshair-line.bottom {
    width: 2px;
    height: 15px;
    bottom: -25px;
    left: -1px;
}

.crosshair-line.left {
    width: 15px;
    height: 2px;
    left: -25px;
    top: -1px;
}

.crosshair-line.right {
    width: 15px;
    height: 2px;
    right: -25px;
    top: -1px;
}

.crosshair-dot {
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    left: -2px;
}

/* Hitmarker */
.hitmarker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    opacity: 0;
    pointer-events: none;
}

.hitmarker.show {
    animation: hitmarkerAnim 0.2s ease-out;
}

.hitmarker::before,
.hitmarker::after {
    content: '';
    position: absolute;
    background: #fff;
}

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

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

.hitmarker.kill::before,
.hitmarker.kill::after {
    background: #ff0000;
}

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

/* Damage Indicator */
.damage-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(255, 0, 0, 0.5) 100%);
}

.damage-indicator.show {
    animation: damageFlash 0.3s ease-out;
}

@keyframes damageFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Reload indicator */
.reloading {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
}

.reloading.show {
    display: block;
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Game Over Screen */
#game-over .menu-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

#game-over-stats {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
        letter-spacing: 5px;
    }
    
    .team-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .team-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .controls-grid {
        grid-template-columns: repeat(2, auto);
    }
    
    .hud-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .equipment {
        flex-wrap: wrap;
    }
}
