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

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    color: white;
    overflow: hidden;
    user-select: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

.modal-content h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.online-counter {
    color: #4cd137;
    margin-bottom: 20px;
    font-size: 1.1em;
}

#username-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #ffd700;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-family: Arial, sans-serif;
}

#username-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.team-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.team-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.3em;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Arial Black', Arial, sans-serif;
}

.red-team {
    background: #DC143C;
    color: white;
}

.red-team:hover {
    background: #ff0040;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.6);
}

.blue-team {
    background: #4169E1;
    color: white;
}

.blue-team:hover {
    background: #5080ff;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(65, 105, 225, 0.6);
}

.auto-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    background: #ffd700;
    color: #1e272e;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-family: 'Arial Black', Arial, sans-serif;
}

.auto-btn:hover {
    background: #ffed4e;
    transform: scale(1.02);
}

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

#canvas {
    display: block;
    background: #3d5a3d;
    cursor: crosshair;
}

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

.top-bar {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-bottom: 2px solid #ffd700;
}

.scores {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.red-score {
    color: #DC143C;
    font-weight: bold;
}

.blue-score {
    color: #4169E1;
    font-weight: bold;
}

.timer {
    font-family: 'Courier New', monospace;
    font-size: 1.5em;
    color: #ffd700;
}

.player-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #ddd;
}

.kill-feed {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 300px;
    font-size: 0.9em;
}

.kill-item {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
    animation: slideIn 0.3s;
}

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

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

.left-panel, .right-panel {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.health-bar {
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #4cd137, #44bd32);
    transition: width 0.3s;
    width: 100%;
}

.ammo-counter {
    font-size: 1.5em;
    font-family: 'Courier New', monospace;
    color: #ffd700;
    margin-bottom: 10px;
}

.reload-indicator {
    color: #e74c3c;
    font-weight: bold;
    display: none;
}

.mini-map {
    width: 150px;
    height: 150px;
    background: rgba(61, 90, 61, 0.8);
    border: 2px solid #ffd700;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
}

.kd-ratio {
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    color: #ffd700;
}

#respawn-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid #e74c3c;
    animation: pulse 1s infinite;
}

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

#respawn-screen h2 {
    font-size: 2em;
    color: #e74c3c;
    margin-bottom: 20px;
}

.respawn-timer {
    font-size: 1.5em;
    color: #ffd700;
    font-family: 'Courier New', monospace;
}

#victory-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.victory-content {
    text-align: center;
    max-width: 600px;
}

#victory-title {
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 0 30px currentColor;
}

.scoreboard {
    background: rgba(0, 0, 0, 0.7);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.score-line {
    font-size: 1.3em;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
}

.play-again-btn {
    padding: 20px 40px;
    font-size: 1.3em;
    background: #ffd700;
    color: #1e272e;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    pointer-events: all;
    font-family: 'Arial Black', Arial, sans-serif;
}

.play-again-btn:hover {
    background: #ffed4e;
    transform: scale(1.1);
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    text-align: center;
    font-size: 0.9em;
    color: #aaa;
    font-family: Arial, sans-serif;
    z-index: 10;
}

footer a {
    color: #ffd700;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .modal-content h1 {
        font-size: 1.8em;
    }
    
    .team-buttons {
        flex-direction: column;
    }
    
    .bottom-hud {
        flex-direction: column;
        gap: 10px;
    }
    
    .kill-feed {
        width: 200px;
        font-size: 0.8em;
    }
}