body { margin: 0; overflow: hidden; background-color: #000; font-family: 'Courier New', Courier, monospace; }
#startup-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background-color: #00111a; z-index: 999999; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #00E5FF; text-align: center; }
/* ==========================================
   🧱 SUPERPOSITION ET CENTRAGE DU LOGO
   ========================================== */
#watermark-container {
    position: relative;
    width: 45vw; /* S'adapte à la largeur du téléphone sans être coupé */
    max-width: 160px; 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

#watermark-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.6; /* Garde l'effet filigrane discret */
    user-select: none;
    pointer-events: none;
}

/* ==========================================
   🌟 LE HALO LUMINEUX DE CONFRONTATION (H/M)
   ========================================== */
#halo-glow {
    position: absolute;
    /* 🎯 CIBLE EXACTE : Le centre du cercle lumineux dans ton logo carrée */
    top: calc(36.5% - 15px); /* 36.5% de la hauteur du logo (correction de taille) */
    left: calc(50% - 10px); /* 50% de la largeur du logo (correction de taille) */
    width: 22px; /* Taille de l'élément de base */
    height: 22px;
    border-radius: 50%;
    background: transparent; /* L'élément est invisible, seule sa lumière compte */
    
    /* Le halo de base bleu cyan lumineux */
    box-shadow: 0 0 10px #00E5FF;
    
    /* Application de l'animation de confrontation */
    animation: halo-confrontation 2s ease-in-out infinite; 
}

/* ==========================================
   🎞️ FILMS : ANIMATION HALO RESPIRANT
   ========================================== */
@keyframes halo-confrontation {
    /* Épuisement : La confrontation commence, la lumière est stable */
    0% {
        box-shadow: 0 0 10px #00E5FF;
        transform: scale(1);
    }
    
    /* Tension : La lumière "respire" et gonfle entre les deux visages */
    50% {
        box-shadow: 0 0 30px #00E5FF, 0 0 50px #00E5FF;
        transform: scale(1.1);
    }
    
    /* Épuisement : Retour à l'état de base */
    100% {
        box-shadow: 0 0 10px #00E5FF;
        transform: scale(1);
    }
}
#startup-content { z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
#startup-title { font-size: 28px; font-weight: bold; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 0 10px rgba(0,229,255,0.5); }
#startup-sub { font-size: 14px; color: #81D4FA; margin-bottom: 15px; background: rgba(0,0,0,0.5); padding: 5px 10px; border-radius: 5px; }

#login-box { background: rgba(0, 20, 30, 0.9); border: 1px solid #00E5FF; padding: 30px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,229,255,0.2); width: 80%; max-width: 350px; z-index: 2; margin-top: 20px;}
.login-input { width: 100%; padding: 10px; margin-bottom: 15px; background: rgba(0,0,0,0.5); border: 1px solid #00E5FF; color: #FFF; font-family: 'Courier New', Courier, monospace; box-sizing: border-box; border-radius: 5px; }
.login-input option { background: #00111a; color: #00E5FF; }
.login-btn { width: 100%; padding: 12px; background: #00E5FF; color: #000; font-weight: bold; border: none; cursor: pointer; text-transform: uppercase; border-radius: 5px; }
#login-result { margin-top: 15px; font-size: 13px; word-break: break-all; }
.magic-link-btn { display: inline-block; margin-top: 10px; padding: 10px; background: #4CAF50; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; }

#scanner-zone { position: relative; width: 120px; height: 120px; border: 2px dashed rgba(0, 229, 255, 0.3); border-radius: 20px; display: flex; justify-content: center; align-items: center; overflow: hidden; cursor: pointer; transition: all 0.3s; user-select: none; -webkit-user-select: none; }
#scanner-icon { font-size: 60px; opacity: 0.7; pointer-events: none; }
#scanner-laser { position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: #00E5FF; box-shadow: 0 0 15px #00E5FF; opacity: 0; transform: translateY(-10px); pointer-events: none; }
.scanning #scanner-laser { opacity: 1; animation: scanAnim 1s ease-in-out infinite alternate; }
.scanning #scanner-zone { border-color: #00E5FF; box-shadow: 0 0 20px rgba(0, 229, 255, 0.2) inset; }
@keyframes scanAnim { 0% { transform: translateY(0); } 100% { transform: translateY(115px); } }
#scanner-text { margin-top: 15px; font-size: 12px; color: rgba(0, 229, 255, 0.7); letter-spacing: 1px; pointer-events: none; }

#ui-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; pointer-events: none; z-index: 100; font-family: 'Courier New', Courier, monospace; color: #00E5FF; display: none; }
#hud-status { position: absolute; top: 50px; left: 10px; background: rgba(0, 20, 20, 0.6); padding: 10px; border-left: 3px solid #00E5FF; font-size: 12px; backdrop-filter: blur(4px); border-radius: 4px; text-transform: uppercase; max-width: 80%; word-wrap: break-word; pointer-events: auto;}

/* --- NOUVEAU : BOUTONS INTERFACE DÉPLACÉS EN BAS --- */
#btn-ar-toggle { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); background: rgba(0, 20, 20, 0.9); border: 1px solid #00E5FF; color: #00E5FF; padding: 8px 16px; border-radius: 20px; font-weight: bold; font-size: 12px; cursor: pointer; pointer-events: auto; z-index: 150; box-shadow: 0 0 15px rgba(0,229,255,0.3); transition: all 0.3s;}
#btn-profil { position: absolute; bottom: 90px; right: 20px; background: rgba(0, 20, 20, 0.8); border: 1px solid #00E5FF; color: #00E5FF; border-radius: 50%; font-size: 20px; cursor: pointer; pointer-events: auto; width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 10px rgba(0,229,255,0.3); transition: transform 0.2s;}
#btn-profil:active { transform: scale(0.9); }
#btn-inventory { position: absolute; bottom: 90px; left: 20px; background: rgba(0, 20, 20, 0.8); border: 1px solid #FF9800; color: #FF9800; border-radius: 50%; font-size: 20px; cursor: pointer; pointer-events: auto; width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 10px rgba(255,152,0,0.3); transition: transform 0.2s;}
#btn-inventory:active { transform: scale(0.9); }

/* Style du bouton oeil */
#btn-cinema-eye {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    color: #00E5FF;
    border: 2px solid #00E5FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 10001; /* Doit être au-dessus de tout */
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

/* LA MAGIE : Quand le body a la classe .cinema-mode, on cache TOUT l'écran de jeu */
body.cinema-mode #hud-status,
body.cinema-mode .btn-fire,
body.cinema-mode #btn-fire-right,
body.cinema-mode #btn-container,
body.cinema-mode #btn-build, 
body.cinema-mode #btn-remove, 
body.cinema-mode #btn-sniper, 
body.cinema-mode #btn-reload,
body.cinema-mode #monument-card,
body.cinema-mode #monument-title,
body.cinema-mode #monument-video,
body.cinema-mode #monument-text,
body.cinema-mode #btn-close-monument,
body.cinema-mode #build-palette,
body.cinema-mode #target-card, 
body.cinema-mode #shop-card, 
body.cinema-mode #inventory-modal, 
body.cinema-mode #profile-modal, 
body.cinema-mode #btn-profil, 
body.cinema-mode #btn-inventory,
body.cinema-mode #kill-notif,
body.cinema-mode #reward-notif,
body.cinema-mode #levelup-notif,
body.cinema-mode #sniper-overlay,
body.cinema-mode #hud-reticle,
body.cinema-mode .rs-base, /* Cache le moniteur de FPS natif de A-Frame */
body.cinema-mode .a-enter-ar-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* On force le bouton de vue et le bouton oeil à rester visibles */
body.cinema-mode #btn-ar-toggle, 
body.cinema-mode #btn-cinema-eye {
    display: block !important;
    z-index: 10002 !important;
}

/* FENÊTRES MODALES */
.modal-window { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 85%; max-width: 350px; background: rgba(0, 26, 38, 0.95); border: 2px solid #00E5FF; border-radius: 15px; padding: 20px; box-sizing: border-box; flex-direction: column; gap: 15px; backdrop-filter: blur(10px); box-shadow: 0 0 40px rgba(0,229,255,0.4); pointer-events: auto; z-index: 300; color: #FFF; max-height: 85dvh; overflow-y: auto;}
.modal-window.orange-border { border-color: #FF9800; box-shadow: 0 0 40px rgba(255,152,0,0.4); }
.pm-title { font-size: 22px; font-weight: bold; color: #00E5FF; text-align: center; border-bottom: 1px solid rgba(0,229,255,0.3); padding-bottom: 10px; margin-bottom: 5px;}
.pm-title.orange { color: #FF9800; border-color: rgba(255,152,0,0.3); }
.pm-stat { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 5px;}
.pm-stat-val { color: #FFEB3B; font-weight: bold; }
.btn-close-modal { width: 100%; padding: 12px; font-size: 16px; border-radius: 8px; background: #F44336; color: #FFF; font-weight: bold; border: none; cursor: pointer; text-transform: uppercase; margin-top: 10px; }

/* TIRS ET VISEUR */
#hud-reticle { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); border: 2px solid rgba(0, 229, 255, 0.5); border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: all 0.1s; pointer-events: none;}
#hud-reticle::after { content: ''; width: 4px; height: 4px; background: #00E5FF; border-radius: 50%; }

.btn-fire { position: absolute; bottom: 35%; width: 60px; height: 60px; border-radius: 50%; background: rgba(244, 67, 54, 0.3); border: 2px solid #F44336; color: #FFF; font-size: 24px; display: flex; justify-content: center; align-items: center; z-index: 150; user-select: none; cursor: pointer; pointer-events: auto; box-shadow: 0 0 15px rgba(244, 67, 54, 0.4); transition: transform 0.1s, background 0.1s;}
.btn-fire:active { background: rgba(244, 67, 54, 0.8); transform: scale(0.9); }
#btn-fire-left { left: 15px; }
#btn-fire-right { right: 15px; }

/* SCAN ET CARTES CIBLES */
#btn-container { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: 100%; display: flex; justify-content: center; }
#btn-scan { pointer-events: auto; padding: 15px 30px; font-size: 16px; border-radius: 5px; background: rgba(0, 0, 0, 0.8); color: #00E5FF; font-weight: bold; border: 1px solid #00E5FF; text-transform: uppercase; cursor: pointer; box-shadow: 0 0 15px rgba(0,229,255,0.4); transition: all 0.3s; }
#btn-scan:active { transform: scale(0.95); }
#btn-scan:disabled { background: #333; color: #888; border-color: #555; box-shadow: none; cursor: not-allowed; }

#target-card { display: none; position: absolute; bottom: 90px; left: 5%; width: 90%; background: rgba(0, 26, 38, 0.95); border: 1px solid #00E5FF; border-radius: 15px; padding: 20px; box-sizing: border-box; flex-direction: column; gap: 8px; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,229,255,0.2); pointer-events: auto; z-index: 200; }
#tc-nom { font-size: 18px; font-weight: bold; color: #FFF; text-shadow: 0 0 5px #00E5FF; margin-bottom: 5px;}
#tc-rente { font-size: 12px; margin-bottom: 5px; font-weight: bold; }
.res-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 2px; color: #FFF; font-weight: bold;}
.progress-bg { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; width: 0%; transition: width 0.5s ease-out; }

#tc-pantheon { font-size: 12px; color: #CCC; line-height: 1.5; background: rgba(0,0,0,0.5); padding: 8px; border-radius: 5px; max-height: 60px; overflow-y: auto;}
#btn-action { width: 100%; padding: 15px; font-size: 16px; border-radius: 8px; background: #00E5FF; color: #000; font-weight: bold; border: none; cursor: pointer; text-transform: uppercase; box-shadow: 0 0 15px rgba(0, 229, 255, 0.5); margin-top: 5px; }
#btn-action:active { transform: scale(0.98); }
.a-enter-vr { display: none !important; }
/* 🥷 PLAN B : Extermination visuelle du bouton A-Frame */
.a-enter-ar { 
    display: none !important; 
    visibility: hidden !important; 
    opacity: 0 !important; 
}

/* Notre propre bouton AR SOUCO (Placé en haut à gauche) */
#souco-ar-btn {
    position: fixed;
    top: 15px;  /* Ajuste ici si tu veux le monter ou le descendre */
    left: 15px; /* Ajuste ici pour l'éloigner du bord gauche */
    z-index: 999999;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid #00E5FF;
    color: #00E5FF;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
    backdrop-filter: blur(5px);
    display: none; /* Caché par défaut, le JS l'affichera si l'AR est dispo */
}

#souco-ar-btn:active {
    transform: scale(0.95);
    background: rgba(0, 229, 255, 0.3);
}
/* On s'assure que le bouton lui-même n'a pas de marges fantômes */
.a-enter-ar-button {
    margin: 0 !important; 
}
#shop-card { display: none; position: absolute; bottom: 90px; left: 5%; width: 90%; background: rgba(20, 0, 20, 0.95); border: 1px solid #E91E63; border-radius: 15px; padding: 20px; box-sizing: border-box; flex-direction: column; gap: 8px; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(233,30,99,0.2); pointer-events: auto; z-index: 200; }

#kill-notif { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); color: #FFEB3B; font-weight: bold; font-size: 20px; text-shadow: 0 0 10px #FF9800; opacity: 0; transition: opacity 0.3s; width:100%; text-align:center;}
#reward-notif { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); background: rgba(255, 215, 0, 0.9); color: #000; padding: 15px 25px; border-radius: 10px; font-weight: bold; font-size: 16px; box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); opacity: 0; transition: opacity 0.5s; z-index: 200; text-align: center; pointer-events: none; backdrop-filter: blur(5px);}
/* ==========================================
   🏛️ CARTE MONUMENT (Guide Vert Piraté)
   ========================================== */

#monument-title {
    color: #D4AF37;
    text-align: center;
    margin: 0;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#monument-video {
    width: 100%;
    border-radius: 5px;
    display: none; /* Masqué par défaut s'il n'y a pas de vidéo */
    border: 1px solid #D4AF37;
}

#monument-text {
    font-size: 14px;
    line-height: 1.6;
    color: #E0E0E0;
    text-align: justify;
}

#btn-close-monument {
    background: #D4AF37;
    color: #000;
    font-weight: bold;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    margin-top: 10px;
}
#btn-close-monument:active { transform: scale(0.98); }