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

body {
    font-family: 'Courier New', monospace;
    overflow: hidden;
    background: #000;
    color: #fff;
}

canvas {
    display: block;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loading-screen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

#loading-screen p {
    font-size: 18px;
    color: #888;
}

/* Start Screen */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

#start-screen h1 {
    font-size: 48px;
    margin-bottom: 30px;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.controls-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-width: 300px;
}

.controls-info h3 {
    color: #00ff88;
    margin-bottom: 10px;
}

.controls-info ul {
    list-style: none;
    font-size: 14px;
}

.controls-info li {
    padding: 5px 0;
    color: #ccc;
}

#player-name {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #00ff88;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    margin-bottom: 15px;
    width: 250px;
    text-align: center;
}

#player-name:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

#start-button, #play-again-button {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    background: #00ff88;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#start-button:hover, #play-again-button:hover {
    background: #00cc6a;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.status {
    margin-top: 15px;
    font-size: 14px;
}

.status.connected {
    color: #00ff88;
}

.status.error {
    color: #ff4444;
}

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

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

/* Health Bar */
.health-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 250px;
}

.bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.health-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4444 0%, #ff8800 50%, #00ff88 100%);
    transition: width 0.3s;
}

.label {
    font-size: 12px;
    color: #888;
}

.value {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

/* Ammo */
.ammo-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-align: right;
}

#ammo-text {
    font-size: 36px;
    color: #00ff88;
}

/* Score */
.score-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#score-text {
    font-size: 24px;
    color: #ffcc00;
}

/* Leaderboard */
.leaderboard {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    min-width: 200px;
}

.leaderboard h3 {
    color: #00ff88;
    margin-bottom: 10px;
    font-size: 16px;
    text-align: center;
}

#leaderboard-entries {
    font-size: 14px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-entry.you {
    color: #00ff88;
    font-weight: bold;
}

/* Kill Feed */
.kill-feed {
    position: absolute;
    top: 20px;
    left: 20px;
    max-width: 300px;
}

.kill-feed-item {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 5px;
    font-size: 12px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.killer {
    color: #ff4444;
    font-weight: bold;
}

.victim {
    color: #888;
}

.weapon {
    color: #ffcc00;
}

/* Death Screen */
#death-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 101;
    animation: fadeIn 0.5s;
}

#death-screen h1 {
    font-size: 64px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    margin-bottom: 20px;
}

#death-message {
    font-size: 24px;
    color: #ff4444;
    margin-bottom: 20px;
}

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

#gameover-message {
    font-size: 64px;
    margin-bottom: 20px;
}

#gameover-message.winner {
    color: #00ff88;
}

#gameover-message.loser {
    color: #ff4444;
}

#final-score {
    font-size: 24px;
    color: #fff;
    margin-bottom: 30px;
}
