*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:#020617;
  color:#e5e7eb;
  overflow:hidden;
}

#app{
  height:100%;
  display:flex;
  flex-direction:column;
}

.topbar{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}

.brand .title{
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
}
.brand .subtitle{
  margin-top:2px;
  opacity:.85;
  font-size:13px;
}

.hud{
  margin-top:10px;
  display:flex;
  gap:12px;
  align-items:stretch;
  flex-wrap:wrap;
}

.hudCol{
  flex:1 1 320px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:10px 12px;
  min-width:280px;
}

.hudColRight{
  flex:0 0 260px;
  min-width:260px;
}

/* ---------------- Mode 1 joueur ---------------- */
body.onePlayer #hudP1{ display:none; }
body.onePlayer #fieldPseudoR{ display:none; }

.hudTitle{
  font-weight:800;
  margin-bottom:6px;
}

.hudLine{
  font-size:13px;
  line-height:1.35;
  opacity:.95;
  margin:2px 0;
}
.hudLine .k{
  display:inline-block;
  min-width:110px;
  opacity:.8;
}

.btn{
  margin-top:8px;
  width:100%;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#e5e7eb;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ background: rgba(255,255,255,.09); }
.btn.primary{
  background: rgba(59,130,246,.35);
  border-color: rgba(59,130,246,.55);
}
.btn.primary:hover{ background: rgba(59,130,246,.45); }

.stage{
  position:relative;
  flex:1 1 auto;
  display:flex;
  min-height:0;
}

#game{
  width:100%;
  height:100%;
  display:block;
}

.footer{
  padding:8px 14px;
  border-top:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.muted{ opacity:.78; font-size:12px; }

/* Overlay */
.overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.55);
  padding:18px;
}
.overlay.hidden{ display:none; }

.overlayCard{
  width:min(720px, 100%);
  background: #0b1224;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:16px 16px 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}

.overlayTitle{
  font-weight:900;
  font-size:18px;
  margin-bottom:8px;
}

.overlayText{
  font-size:14px;
  line-height:1.45;
  opacity:.95;
}

.overlayActions{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* Form pseudos */
.formGrid{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 720px){
  .formGrid{ grid-template-columns: 1fr; }
}

.field label{
  display:block;
  font-size:12px;
  opacity:.85;
  margin-bottom:6px;
}

.field input{
  width:100%;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#e5e7eb;
  outline:none;
  font-weight:700;
}
.field input:focus{
  border-color: rgba(59,130,246,.65);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

.endSummary{
  margin-top:8px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background: rgba(255,255,255,.04);
  font-size:14px;
  line-height:1.5;
}
