/* CDG-STRIKE - Styles du HUD, Killfeed, Écran de Kill & Mort, Réticules */

/* Conteneur Plein Écran du Jeu 3D */
.game-viewport {
    position: relative;
    width: 100%;
    height: calc(100vh - 70px);
    min-height: 600px;
    background-color: #020617;
    overflow: hidden;
    user-select: none;
}

#gameContainer {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* 1. HUD DU JOUEUR (Bas de l'écran) */
.hud-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hud-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

/* Bloc Santé et Armure */
.hud-status-box {
    display: flex;
    gap: 1.25rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.8rem 1.4rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hud-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hud-stat-icon {
    font-size: 1.8rem;
}

.hud-stat-val {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: #f8fafc;
    letter-spacing: -1px;
}

.hud-stat-val.health { color: #22c55e; }
.hud-stat-val.armor { color: #38bdf8; }

.hud-stat-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bloc Arme & Munitions */
.hud-ammo-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.8rem 1.6rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hud-weapon-icon {
    font-size: 2.4rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.hud-weapon-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
}

.hud-ammo-digits {
    font-size: 2.4rem;
    font-weight: 900;
    color: #f59e0b;
    letter-spacing: -1px;
}

.hud-ammo-reserve {
    font-size: 1.3rem;
    font-weight: 600;
    color: #94a3b8;
}

/* Sélecteur rapide des armes de bureau (Touches 1-5) */
.hud-weapons-dock {
    display: flex;
    gap: 0.6rem;
    position: absolute;
    bottom: 5.5rem;
    right: 1.5rem;
}

.hud-dock-item {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    color: #94a3b8;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.hud-dock-item.active {
    background: rgba(37, 99, 235, 0.4);
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.hud-dock-num {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: bold;
}

/* 2. LE RÉTICULE DE VISÉE DYNAMIQUE */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    width: 24px;
    height: 24px;
}

.ch-dot {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 4px;
    height: 4px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 4px #22c55e;
}

.ch-line {
    position: absolute;
    background: #22c55e;
    box-shadow: 0 0 2px rgba(0,0,0,0.8);
}
.ch-line.top { top: 0; left: 11px; width: 2px; height: 7px; }
.ch-line.bottom { bottom: 0; left: 11px; width: 2px; height: 7px; }
.ch-line.left { top: 11px; left: 0; width: 7px; height: 2px; }
.ch-line.right { top: 11px; right: 0; width: 7px; height: 2px; }

/* Hitmarker (croix rouge ou dorée au tir réussi) */
.hitmarker-cross {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 2px solid #ef4444;
    border-radius: 2px;
    pointer-events: none;
    box-shadow: 0 0 8px currentColor;
}

/* Réticule de Sniper Stylo (Zoom) */
.sniper-scope-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 35%, rgba(0,0,0,0.92) 55%, #000000 80%);
    pointer-events: none;
    z-index: 10;
}

.scope-line-h {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(34, 197, 94, 0.7);
}

.scope-line-v {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(34, 197, 94, 0.7);
}

/* 3. LE BANDEAU DE VICTOIRE DU JOUEUR ÉLIMINÉ (AVEC SA PHOTO !) */
.kill-banner-popup {
    display: none;
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(15, 23, 42, 0.95));
    border: 2px solid #38bdf8;
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.5), inset 0 0 20px rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    padding: 1.2rem 2.5rem;
    align-items: center;
    gap: 1.5rem;
    z-index: 20;
    pointer-events: none;
}

.banner-animate {
    animation: bannerDrop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bannerDrop {
    0% { transform: translateX(-50%) translateY(-60px) scale(0.85); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

.kill-banner-avatar-wrap {
    position: relative;
    width: 76px;
    height: 76px;
}

.kill-banner-img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.6);
}

.kill-banner-stamp {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #dc2626;
    color: white;
    font-size: 0.9rem;
    border-radius: 50%;
    padding: 3px 6px;
    border: 2px solid white;
}

.kill-banner-content {
    display: flex;
    flex-direction: column;
}

.kill-banner-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #38bdf8;
    text-transform: uppercase;
}

.kill-banner-victim-name {
    font-size: 2.0rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.kill-banner-details {
    display: flex;
    gap: 1rem;
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.kill-banner-bonus {
    color: #eab308;
    font-weight: bold;
}

/* 4. ÉCRAN DE MORT DU JOUEUR (AVEC LA PHOTO DU TUEUR !) */
.death-screen-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(185, 28, 28, 0.4) 10%, rgba(15, 23, 42, 0.95) 80%);
    backdrop-filter: blur(4px);
    z-index: 30;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.death-card {
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid #ef4444;
    border-radius: 20px;
    padding: 2.5rem 3.5rem;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 480px;
}

.death-avatar-frame {
    position: relative;
    margin-bottom: 1.2rem;
}

.death-killer-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid #ef4444;
    object-fit: cover;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.death-headline {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #ef4444;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.death-killer-pseudo {
    font-size: 2.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.6rem;
}

.death-killer-weapon {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.death-respawn-box {
    background: rgba(15, 23, 42, 0.6);
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #38bdf8;
}

/* 5. KILLFEED EN HAUT À DROITE (Photos miniatures des deux joueurs) */
.killfeed-box {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 15;
    pointer-events: none;
}

.killfeed-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.animate-slide-left {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.killfeed-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #38bdf8;
}

.killfeed-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.killfeed-name.killer { color: #38bdf8; }
.killfeed-name.victim { color: #ef4444; }

.killfeed-icon {
    font-size: 1.1rem;
}

.killfeed-headshot {
    font-size: 0.9rem;
}

/* 6. RADAR / MINIMAP DU BUREAU (Haut à gauche) */
.radar-box {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 15;
    pointer-events: none;
}

#radarCanvas {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* 7. OVERLAY DE PAUSE / INSTRUCTIONS */
.pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 25;
    color: white;
}

.pause-card {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem 3rem;
    text-align: center;
    max-width: 580px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.btn-cdg-action {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 800;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cdg-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
}

/* Indicateur de recharge */
.reload-indicator {
    display: none;
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #eab308;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Modal du Tableau des scores (Touche TAB) */
.scoreboard-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 28;
    align-items: center;
    justify-content: center;
}

.scoreboard-table-wrap {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    width: 80%;
    max-width: 750px;
    color: white;
}
