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

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

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

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

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

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Menu */
#main-menu {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.menu-content {
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 2px solid #e94560;
    box-shadow: 0 0 40px rgba(233, 69, 96, 0.3);
}

.game-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #e94560, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(233, 69, 96, 0.5);
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    margin-bottom: 30px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-primary {
    background: linear-gradient(45deg, #e94560, #ff6b6b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #e94560;
}

.btn-secondary:hover {
    background: rgba(233, 69, 96, 0.2);
}

.player-stats {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.stat {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
}

.stat-label {
    color: #a0a0a0;
}

.stat-value {
    color: #e94560;
    font-weight: 700;
}

/* Controls Screen */
#controls-screen {
    background: rgba(26, 26, 46, 0.95);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
    text-align: left;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 8px 15px;
    background: #e94560;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* HUD */
#hud {
    pointer-events: none;
}

#hud > * {
    pointer-events: auto;
}

.hud-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
}

.health-bar-container {
    margin-bottom: 10px;
}

.health-bar {
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    border-radius: 10px;
    overflow: hidden;
}

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

.health-text {
    display: block;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #fff;
}

.weapon-info {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.weapon-name {
    font-weight: 700;
    color: #feca57;
}

.ammo-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.hud-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
}

.scoreboard {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 15px;
    min-width: 250px;
}

.score-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    font-weight: 700;
    color: #e94560;
    font-size: 0.9rem;
}

.score-list {
    max-height: 200px;
    overflow-y: auto;
}

.score-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.score-item:last-child {
    border-bottom: none;
}

.score-item.me {
    color: #feca57;
    font-weight: 700;
}

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

.kill-feed {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.kill-item {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    font-size: 0.9rem;
    animation: fadeOut 4s forwards;
}

@keyframes fadeOut {
    0%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

.killer {
    color: #4ecdc4;
    font-weight: 700;
}

.victim {
    color: #e94560;
    font-weight: 700;
}

.hud-bottom-center {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.match-timer {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
    padding: 10px 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

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

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

.hud-bottom-right {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.minimap {
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #e94560;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.minimap-player {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4ecdc4;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.minimap-enemy {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #e94560;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Game Over Screen */
#game-over {
    background: rgba(26, 26, 46, 0.95);
}

.final-scores {
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    min-width: 400px;
}

.final-score-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #333;
}

.final-score-item.winner {
    background: rgba(233, 69, 96, 0.2);
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .scoreboard {
        min-width: 200px;
        font-size: 0.8rem;
    }
    
    .health-bar {
        width: 150px;
    }
}