body { 
    margin: 0; 
    overflow: hidden; 
    font-family: 'Consolas', 'Lucida Console', Monaco, monospace; 
    background-color: #000; 
    color: white; 
}

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

#ui-container { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
    color: #00ff00; 
    text-shadow: 0 0 3px #000000, 0 0 5px #00ff00; 
}

#info { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    background-color: rgba(0, 0, 0, 0.4); 
    padding: 5px 10px; 
    border-radius: 5px; 
    z-index: 10; 
    font-size: 1em; 
    line-height: 1.5; 
}

#info span { 
    font-weight: bold; 
    color: #00ff00; 
}

#building-health { 
    position: absolute; 
    bottom: 15px; 
    left: 15px; 
    background-color: rgba(0, 0, 0, 0.4); 
    padding: 3px 8px; 
    border-radius: 5px; 
    z-index: 10; 
    font-size: 0.9em; 
}

#controls-info-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 200; /* Ensure it appears in front of radar (z-index: 10) */
    pointer-events: none;
}

#controls-info { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background-color: rgba(0, 20, 0, 0.85); /* Make less transparent */
    padding: 5px 10px; 
    border-radius: 5px; 
    border: 1px solid #00ff00;
    z-index: 200; /* Higher z-index to show above radar */
    font-size: 0.8em; 
    line-height: 1.4; 
    text-align: right; 
    pointer-events: auto;
}

#firing-indicator { 
    color: #ff4444; 
    font-weight: bold; 
    display: none; 
}

#pause-indicator { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -70%); 
    font-size: 3em; 
    color: yellow; 
    text-shadow: 0 0 5px black, 0 0 10px yellow; 
    display: none; 
    z-index: 12; 
}

#message-box { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background-color: rgba(0, 10, 0, 0.85); 
    padding: 25px; 
    border-radius: 12px; 
    text-align: center; 
    display: none; 
    font-size: 1.6em; 
    z-index: 11; 
    border: 1px solid #008800; 
    pointer-events: auto; 
}

#message-box button { 
    padding: 12px 25px; 
    margin-top: 20px; 
    border: 1px solid #00ff00; 
    border-radius: 8px; 
    background-color: rgba(0, 50, 0, 0.7); 
    color: #00ff00; 
    cursor: pointer; 
    font-size: 0.9em; 
    transition: background-color 0.2s ease, color 0.2s ease; 
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none; /* For Firefox */
    -ms-user-select: none; /* For IE/Edge */
}

#message-box button:hover { 
    background-color: rgba(0, 80, 0, 0.9); 
    color: #88ff88; 
}

#radar-container {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
}

@media (max-width: 768px) {
    #radar-container {
        top: 15px;
        right: 15px;
        bottom: auto;
        left: auto;
    }
    
    #pause-button {
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        background-color: rgba(0, 20, 0, 0.7);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #00ff00;
        z-index: 100;
        pointer-events: auto;
        cursor: pointer;
        border: 1px solid #00ff00;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    #hud-attitude {
        width: 300px; 
        height: 200px;
    }
    
    #joystick-container {
        bottom: 80px !important;
        left: 80px !important;
    }
    
    #fire-button {
        bottom: 80px !important;
        right: 80px !important;
    }

    /* Speed buttons for mobile mode - Repositioned vertically to the right of fire */
    #speed-up-button,
    #speed-down-button,
    #yaw-button {
        position: absolute;
        width: 60px;
        height: 60px;
        right: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 30px;
        z-index: 100;
        pointer-events: auto;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    #speed-up-button {
        bottom: 210px;
        background-color: rgba(0, 100, 0, 0.6);
        border: 2px solid #00cc00;
        color: #00ff00;
    }

    #yaw-button {
        bottom: 130px;
        background-color: rgba(100, 100, 0, 0.6);
        border: 2px solid #cccc00;
        color: #ffff00;
    }

    #speed-down-button {
        bottom: 50px;
        background-color: rgba(0, 0, 100, 0.6);
        border: 2px solid #0000cc;
        color: #00ccff;
    }

    #yaw-button.active {
        background-color: rgba(150, 150, 0, 0.8);
        border-color: #ffff00;
        box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
    }
}

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

.hud-readout { 
    position: absolute; 
    font-size: 1.4em; 
    width: 100px; 
    background-color: rgba(0, 20, 0, 0.15); 
    padding: 5px; 
    border-radius: 3px; 
}

#hud-altitude { 
    right: 20px; 
    top: 45%; 
    transform: translateY(-50%); 
    text-align: right; 
}

#hud-altitude-meters {
    position: absolute;
    right: 20px;
    top: 45%;
    transform: translateY(-50%);
    text-align: right;
    font-size: 1.4em;
    width: 100px;
    background-color: rgba(0, 20, 0, 0.15);
    padding: 5px;
    border-radius: 3px;
    color: #00ff00;
    text-shadow: 0 0 3px #000000, 0 0 5px #00ff00;
}

#hud-speedometer { 
    left: 20px; 
    top: 45%; 
    transform: translateY(-50%); 
    text-align: left; 
}

#hud-attitude { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    width: 540px; /* 3 fois plus grand */
    height: 360px; /* 3 fois plus grand */
    border: 1px solid rgba(0, 255, 0, 0.7); /* Réduit de 3px à 1px */
    border-radius: 9px; /* Agrandi */
    transform: translate(-50%, -50%); 
    overflow: hidden; 
}

#hud-horizon-line-container { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    transform-origin: center center; 
}

#hud-horizon-line { 
    position: absolute; 
    top: 50%; 
    left: -50%; 
    width: 200%; 
    height: 2px; 
    background-color: #00ff00; 
    transform: translateY(-1px); 
    box-shadow: 0 0 5px #00ff00; 
    background: linear-gradient(to bottom, rgba(135, 206, 235, 0.3) 0%, rgba(135, 206, 235, 0.05) 100%); 
}

#hud-horizon-line::before, 
#hud-horizon-line::after { 
    content: ''; 
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 30%; 
    height: 1px; 
    background-color: rgba(0, 255, 0, 0.8); 
}

#hud-horizon-line::before { 
    top: -15px; 
} 

#hud-horizon-line::after { 
    top: 15px; 
}

#hud-center-marker { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 20px; 
    height: 1px; 
    background-color: #00ff00; 
}

#hud-center-marker::before, 
#hud-center-marker::after { 
    content: ''; 
    position: absolute; 
    background-color: #00ff00; 
    width: 1px; 
    height: 7px; 
    left: 50%; 
    transform: translateX(-50%); 
}

#hud-center-marker::before { 
    top: -6px; 
} 

#hud-center-marker::after { 
    bottom: -6px; 
}

/* Réticule en forme de "W" */
#reticule-w {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.33em; /* 3 fois moins gros qu'avant (4em/3) */
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    z-index: 100;
    pointer-events: none;
}

/* Suppression des modifications liées à la refonte du HUD */
/* Refonte du HUD */
#hud-container {
    display: none;
}

/* Removed styles for #hud-compass, #compass-tape, .compass-marker, and related elements */

/* Pitch lines */
#pitch-lines-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.pitch-line {
    position: absolute;
    width: 60%;
    height: 1px; /* épaisseur uniforme d'1px pour toutes les lignes */
    left: 20%; 
    background-color: rgba(0, 255, 0, 0.6);
    transform: translateY(-50%);
}

/* Suppression des styles spécifiques pour major-line et minor-line */

.pitch-label {
    position: absolute;
    font-size: 12px;
    color: #00ff00;
    top: -9px;
    font-weight: bold;
    text-shadow: 0 0 2px #000, 0 0 4px #000;
}

.pitch-label.left {
    left: -45px;
}

.pitch-label.right {
    right: -45px;
}

/* Zero degree horizon line label */
.horizon-line-label {
    position: absolute;
    width: 100%;
    height: 20px;
    margin-top: -10px;
    pointer-events: none;
}

.horizon-line-label span {
    position: absolute;
    font-size: 12px;
    color: #00ff00;
    top: -9px;
    font-weight: bold;
    text-shadow: 0 0 2px #000, 0 0 4px #000;
}

.horizon-line-label span.left {
    left: -45px;
}

.horizon-line-label span.right {
    right: -45px;
}

/* Indicateurs de vitesse et d'altitude */
#hud-speed, #hud-altitude {
    display: none;
}

/* Réticule central */
#hud-reticle {
    display: none;
}

/* Radar en bas à gauche */
#hud-radar {
    display: none;
}

/* Informations sur les munitions et les dégâts */
#hud-info {
    display: none;
}

/* Sound Toggle Button */
#sound-toggle-container {
    margin-top: 15px;
    text-align: center;
}

#sound-toggle {
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: 1px solid #00ff00;
    background-color: rgba(0, 20, 0, 0.7);
    color: #00ff00;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#sound-toggle.sound-on {
    background-color: rgba(0, 60, 0, 0.8);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

#sound-toggle.sound-off {
    background-color: rgba(60, 0, 0, 0.8);
    border-color: #ff0000;
    color: #ff8888;
}

#sound-toggle:hover {
    filter: brightness(1.2);
}

/* Pause Menu Styles */
#pause-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 10, 0, 0.9);
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    z-index: 300;
    border: 1px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    min-width: 300px;
    pointer-events: auto;
}

#pause-menu h2 {
    color: #00ff00;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 0 5px #00ff00;
    font-size: 1.8em;
}

#pause-menu-options {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#pause-menu-options li {
    padding: 12px 15px;
    margin: 8px 0;
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.3em;
}

#pause-menu-options li:hover {
    background-color: rgba(0, 50, 0, 0.5);
    border-color: rgba(0, 255, 0, 0.7);
}

#pause-menu-options li.selected {
    background-color: rgba(0, 70, 0, 0.7);
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.menu-hint {
    font-size: 0.9em;
    color: rgba(0, 255, 0, 0.7);
    margin-top: 20px;
}

/* Mobile buttons */
#fire-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 0, 0, 0.5);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 100;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Styles pour les marqueurs d'ennemis */
#enemy-markers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.enemy-marker {
    position: absolute;
    border: 1px solid #00ff00; /* Réduit l'épaisseur de 2px à 1px */
    pointer-events: none;
    transform: translate(-50%, -50%);
    /* Suppression de l'effet glow (box-shadow) */
}
