* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0b0e13; color: #dde3ec;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.hidden { display: none !important; }

/* ---------- écrans menu ---------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #17202e 0%, #0b0e13 70%); }
.panel { width: 400px; max-width: 92vw; padding: 36px; background: rgba(15,20,30,.92);
  border: 1px solid #2a3648; border-top: 3px solid #ff8c1a; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 12px; text-align: center; }
.panel.wide { width: 780px; }
.logo { font-size: 52px; font-weight: 900; letter-spacing: 4px; color: #fff; }
.logo span { color: #ff8c1a; }
.logo.small { font-size: 34px; }
.tagline { color: #8fa0b8; font-size: 14px; margin-bottom: 8px; }
.tagline a { color: #ff8c1a; }
h2 { font-size: 16px; letter-spacing: 3px; color: #8fa0b8; margin-top: 10px; }
input[type=text], input[type=password] { padding: 12px 14px; background: #0d1117; color: #fff;
  border: 1px solid #2a3648; font-size: 15px; outline: none; }
input:focus { border-color: #ff8c1a; }
.btn { padding: 12px; background: #1c2634; color: #dde3ec; border: 1px solid #33415a;
  font-size: 14px; font-weight: 700; letter-spacing: 2px; cursor: pointer; transition: .15s; }
.btn:hover { background: #26344a; }
.btn.primary { background: #ff8c1a; border-color: #ff8c1a; color: #14100a; }
.btn.primary:hover { background: #ffa64d; }
.error { color: #ff5f56; font-size: 13px; min-height: 16px; }
.help { color: #5d6c82; font-size: 12px; margin-top: 10px; }

/* ---------- cartes de maps ---------- */
.maps { display: flex; gap: 18px; margin: 10px 0; }
.map-card { flex: 1; background: #10151f; border: 1px solid #2a3648; padding: 0 0 14px;
  display: flex; flex-direction: column; gap: 8px; align-items: center; }
.map-card:hover { border-color: #ff8c1a; }
.map-art { width: 100%; height: 130px; }
.map-card.factory .map-art { background:
  linear-gradient(180deg, rgba(20,26,22,.2), rgba(10,12,10,.9)),
  repeating-linear-gradient(90deg, #3a3f38 0 22px, #2c302a 22px 44px),
  #232722; box-shadow: inset 0 -40px 60px #4d1616; }
.map-card.district .map-art { background:
  linear-gradient(180deg, #2d3a5e 0%, #7a4a3a 75%, #1a1d26 76%),
  repeating-linear-gradient(90deg, transparent 0 30px, rgba(255,200,120,.15) 30px 34px); }
.map-title { font-weight: 900; letter-spacing: 2px; font-size: 17px; }
.map-desc { color: #8fa0b8; font-size: 12px; padding: 0 14px; min-height: 30px; }
.map-count { color: #ff8c1a; font-weight: 700; font-size: 14px; }
.btn-join { width: 70%; }
.settings { color: #8fa0b8; font-size: 13px; }
.settings input { vertical-align: middle; }

/* ---------- cartes de skins ---------- */
.skins { display: flex; gap: 14px; margin: 12px 0; }
.skin-card { flex: 1; background: #10151f; border: 2px solid #2a3648; padding: 10px;
  cursor: pointer; text-align: center; transition: .15s; }
.skin-card:hover { border-color: #5d7396; }
.skin-card.selected { border-color: #ff8c1a; background: #17202e; }
.skin-card img { width: 100%; height: 150px; object-fit: contain;
  background: radial-gradient(ellipse at 50% 80%, #1c2634 0%, transparent 70%); }
.skin-title { font-weight: 900; font-size: 13px; letter-spacing: 1px; margin-top: 6px; }
.skin-desc { font-size: 11px; color: #8fa0b8; min-height: 30px; margin-top: 4px; }
.row-btns { display: flex; gap: 12px; }
.row-btns .btn.primary { flex: 1; }

/* ---------- éditeur d'avatar ---------- */
.editor { display: flex; gap: 16px; align-items: flex-start; background: #10151f;
  border: 1px solid #2a3648; padding: 14px; margin-bottom: 12px; }
.ed-col { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #8fa0b8; }
.ed-col label { display: flex; justify-content: space-between; align-items: center; }
.ed-col input[type=color] { width: 46px; height: 26px; border: 1px solid #33415a; background: none; cursor: pointer; }
.ed-preview { align-items: center; }
#custom-preview { width: 130px; height: 160px; object-fit: contain;
  background: radial-gradient(ellipse at 50% 80%, #1c2634 0%, transparent 70%); }
.ed-hint { font-size: 12px; }
.btn.small { padding: 7px 8px; font-size: 11px; letter-spacing: 1px; }
#cam-wrap { position: relative; width: 160px; margin: 0 auto; }
#cam-video { width: 160px; display: block; }
#cam-oval { position: absolute; inset: 0; margin: auto; width: 90px; height: 116px;
  border: 2px dashed #ff8c1a; border-radius: 50%; pointer-events: none; }
.wkey.kt { border-color: #ff70c8; color: #ff70c8; }

/* ---------- jeu / HUD ---------- */
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px;
  border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 0 4px #000; transition: transform .08s; }
#crosshair.hit { background: #ff8c1a; transform: scale(2.2); }
/* lunette du sniper */
#scope-overlay { position: absolute; inset: 0; overflow: hidden; }
#scope-circle { position: absolute; left: 50%; top: 50%; width: 76vmin; height: 76vmin;
  transform: translate(-50%, -50%); border-radius: 50%;
  box-shadow: 0 0 0 300vmax rgba(0, 0, 0, .96), inset 0 0 60px rgba(0, 0, 0, .9);
  border: 2px solid #0a0c10; }
#scope-circle::before, #scope-circle::after { content: ''; position: absolute; background: rgba(10,12,16,.85); }
#scope-circle::before { left: 0; right: 0; top: 50%; height: 1px; }
#scope-circle::after { top: 0; bottom: 0; left: 50%; width: 1px; }
#nuke { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#vignette { position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(200,0,0,.55) 100%); }
#hud-bottom { position: absolute; left: 0; right: 0; bottom: 22px; display: flex;
  justify-content: space-between; padding: 0 34px; align-items: flex-end; }
#hp-box { display: flex; align-items: center; gap: 12px; }
#bars { display: flex; flex-direction: column; gap: 4px; }
#hp-bar { width: 220px; height: 14px; background: rgba(0,0,0,.55); border: 1px solid #33415a; }
#hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff8c1a, #ffc61a); transition: width .2s; }
#armor-bar { width: 220px; height: 8px; background: rgba(0,0,0,.55); border: 1px solid #33415a; }
#armor-fill { height: 100%; width: 0; background: linear-gradient(90deg, #3f7fd4, #6db3ff); transition: width .2s; }
#hp-num { font-size: 30px; font-weight: 900; text-shadow: 0 2px 4px #000; }
#armor-num { font-size: 16px; font-weight: 700; color: #6db3ff; text-shadow: 0 2px 4px #000; }
#ammo-box { text-align: center; min-width: 130px; }
#ammo-mag { font-size: 34px; font-weight: 900; text-shadow: 0 2px 4px #000; }
#ammo-res { font-size: 18px; font-weight: 700; color: #8fa0b8; margin-left: 6px; }
#ammo-mag.low { color: #ff5f56; }
#reload-hint { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: #ff8c1a;
  animation: blink .5s step-end infinite alternate; }
@keyframes blink { 50% { opacity: .3; } }
#weapon-box { display: flex; gap: 10px; }
.wkey { padding: 6px 12px; background: rgba(0,0,0,.5); border: 1px solid #33415a;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #8fa0b8; }
.wkey.active { border-color: #ff8c1a; color: #ff8c1a; }
.wkey.locked { opacity: .32; text-decoration: line-through; }
/* chat + vocal */
#chat-box { position: absolute; left: 22px; bottom: 110px; max-width: 420px;
  display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
#chat-box div { background: rgba(0,0,0,.45); padding: 3px 9px; border-left: 2px solid #ff8c1a;
  word-break: break-word; }
#chat-box b { color: #ff8c1a; }
#chat-input { position: absolute; left: 22px; bottom: 80px; width: 380px; padding: 8px 10px;
  background: rgba(8,11,16,.9); color: #fff; border: 1px solid #ff8c1a; font-size: 14px;
  outline: none; pointer-events: auto; }
#speakers { position: absolute; top: 18px; left: 22px; display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; font-weight: 700; }
#speakers div { background: rgba(0,0,0,.5); padding: 3px 10px; color: #7dff9a; }
#mic-state { position: absolute; left: 22px; bottom: 58px; font-size: 12px; font-weight: 700;
  letter-spacing: 1px; color: #8fa0b8; }
#mic-state.on { color: #7dff9a; }
#killfeed { position: absolute; top: 18px; right: 22px; text-align: right; font-size: 13px; }
#killfeed div { background: rgba(0,0,0,.45); padding: 4px 10px; margin-bottom: 4px; }
#killfeed b { color: #ff8c1a; }
#fragmsg { position: absolute; top: 22%; left: 0; right: 0; text-align: center;
  font-size: 26px; font-weight: 900; letter-spacing: 2px; color: #ff8c1a;
  text-shadow: 0 2px 8px #000; opacity: 0; transition: opacity .3s; }
#scoreboard { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(8,11,16,.92); border: 1px solid #33415a; border-top: 3px solid #ff8c1a;
  padding: 22px 30px; min-width: 380px; }
#scoreboard h3 { letter-spacing: 4px; margin-bottom: 12px; text-align: center; }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 14px; }
#scoreboard th { color: #8fa0b8; text-align: left; padding: 4px 14px; font-size: 11px; letter-spacing: 1px; }
#scoreboard td { padding: 4px 14px; border-top: 1px solid #1c2634; }
#scoreboard tr.me td { color: #ff8c1a; font-weight: 700; }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 16px;
  align-items: center; justify-content: center; background: rgba(5,7,10,.72); pointer-events: auto; }
.overlay h2 { font-size: 34px; letter-spacing: 5px; font-weight: 900; }
.overlay p { color: #8fa0b8; }
.overlay .btn { width: 260px; }
#death-msg { color: #ff5f56; }
