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

body {
    background: #000;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#canvas {
    border: 3px solid #00BFFF;
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.5);
}

#hud-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00BFFF;
    border-radius: 5px;
    font-size: 10px;
    z-index: 10;
    flex-wrap: wrap;
    gap: 10px;
}

#round-info {
    color: #00BFFF;
}

#score-display {
    display: flex;
    gap: 20px;
}

.attacker-score {
    color: #FFD700;
}

.defender-score {
    color: #00FFFF;
}

#role-indicator {
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
}

#role-indicator.attacker {
    background: #FFD700;
    color: #000;
}

#role-indicator.defender {
    background: #00FFFF;
    color: #000;
}

#timer {
    color: #FF4500;
    font-size: 12px;
}

#hud-bottom {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00BFFF;
    border-radius: 5px;
    font-size: 9px;
    z-index: 10;
    flex-wrap: wrap;
    gap: 10px;
}

#ammo-display {
    display: flex;
    gap: 5px;
}

.bullet-icon {
    color: #FFD700;
    font-size: 16px;
}

.bullet-icon.empty {
    color: #333;
}

#bomb-status {
    color: #FF4500;
}

#action-prompt {
    color: #00FF00;
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

#minimap-container {
    position: absolute;
    bottom: 60px;
    right: 10px;
    border: 2px solid #00BFFF;
    border-radius: 3px;
    overflow: hidden;
    z-index: 10;
}

#minimap {
    display: block;
    max-width: 150px;
    max-height: 100px;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#overlay.active {
    display: flex;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
    max-width: 500px;
}

.screen.active {
    display: flex;
}

#start-screen h1 {
    font-size: 24px;
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700;
    margin-bottom: 10px;
    line-height: 1.4;
}

#start-screen h2 {
    font-size: 32px;
    color: #00FFFF;
    text-shadow: 0 0 30px #00FFFF;
    margin-bottom: 30px;
}

.rules {
    margin-bottom: 20px;
    line-height: 2;
    font-size: 10px;
}

.rules p {
    margin: 10px 0;
}

.controls-info {
    margin-bottom: 30px;
    font-size: 9px;
    color: #888;
    line-height: 2;
}

button {
    font-family: 'Press Start 2P', cursive;
    background: #00BFFF;
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s;
}

button:hover {
    background: #FFD700;
    transform: scale(1.05);
    box-shadow: 0 0 20px #FFD700;
}

#round-screen h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

#round-screen h2.attacker {
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700;
}

#round-screen h2.defender {
    color: #00FFFF;
    text-shadow: 0 0 20px #00FFFF;
}

#round-reason {
    font-size: 12px;
    color: #888;
    margin-bottom: 30px;
}

#countdown {
    font-size: 48px;
    color: #00FF00;
    text-shadow: 0 0 30px #00FF00;
    animation: countPulse 1s infinite;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

#gameover-screen h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

#gameover-screen h1.attacker {
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700;
}

#gameover-screen h1.defender {
    color: #00FFFF;
    text-shadow: 0 0 20px #00FFFF;
}

#final-score {
    font-size: 14px;
    margin-bottom: 20px;
}

#stats {
    font-size: 10px;
    color: #888;
    line-height: 2;
    margin-bottom: 30px;
}

footer {
    margin-top: 15px;
    font-size: 10px;
    color: #444;
}

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

footer a:hover {
    color: #FFD700;
}

@media (max-width: 600px) {
    #hud-top, #hud-bottom {
        font-size: 8px;
        padding: 8px 10px;
    }
    
    #start-screen h1 {
        font-size: 16px;
    }
    
    #start-screen h2 {
        font-size: 22px;
    }
    
    .rules, .controls-info {
        font-size: 8px;
    }
    
    button {
        font-size: 10px;
        padding: 12px 20px;
    }
    
    #minimap {
        max-width: 100px;
        max-height: 70px;
    }
}