* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #050514;
  color: #fff;
  font-family: 'Space Mono', ui-monospace, monospace;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: .25;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.35) 2px 4px);
}
.wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 32px 20px 48px; }
.screen { animation: fade .3s ease; }
.hidden { display: none !important; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: .25em; color: #00F5FF; margin-bottom: 16px; }
h1 { font-family: Orbitron, sans-serif; font-weight: 900; font-size: 64px; line-height: .95; margin-bottom: 12px; }
h1 span { color: transparent; -webkit-text-stroke: 1.5px #FF2DA6; }
h2 { font-family: Orbitron, sans-serif; font-weight: 900; font-size: 40px; line-height: 1; margin-bottom: 20px; }
.tag { color: rgba(255,255,255,.55); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.field-label { display: block; font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: .2em; color: rgba(255,255,255,.4); margin-bottom: 6px; }
input[type="text"], input:not([type]) , #callsign, #join-code {
  width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  color: #fff; border-radius: 10px; padding: 13px 14px; font-family: 'Space Mono', monospace;
  font-size: 15px; outline: none; text-transform: uppercase;
}
input:focus { border-color: rgba(0,245,255,.5); }
#join-code { letter-spacing: .4em; text-align: center; }

.btn-row { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.btn {
  font-family: Orbitron, sans-serif; font-weight: 700; letter-spacing: .15em; font-size: 13px;
  padding: 14px 20px; border-radius: 12px; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease; color: #fff; background: rgba(255,255,255,.06);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: rgba(255,45,166,.18); border-color: rgba(255,45,166,.5); color: #FF2DA6; flex: 1; }
.btn.ghost { background: rgba(0,245,255,.08); border-color: rgba(0,245,255,.3); color: #00F5FF; flex: 1; }
.btn.small { padding: 13px 16px; }
.btn.text { background: none; border: none; color: rgba(255,255,255,.4); padding: 8px 0; }

.mode-row { display: flex; gap: 16px; margin: 14px 0 4px; font-size: 12px; color: rgba(255,255,255,.6); }
.mode-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.join-box { display: flex; gap: 10px; margin-top: 16px; }
.join-box input { flex: 1; }
.hint { background: rgba(0,245,255,.08); border: 1px solid rgba(0,245,255,.3); color: #00F5FF; padding: 10px 12px; border-radius: 10px; font-size: 12px; margin-top: 12px; }
.status { min-height: 20px; font-size: 12px; color: #FFB020; margin-top: 12px; line-height: 1.5; }
.foot { font-size: 11px; line-height: 1.6; color: rgba(255,255,255,.35); margin-top: 24px; }

.roster { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.roster .player {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 12px 14px; font-size: 14px;
}
.roster .player.host::after { content: 'HOST'; font-family: Orbitron, sans-serif; font-size: 10px; color: #00F5FF; letter-spacing: .2em; }

.duel-top { display: flex; justify-content: space-between; font-family: Orbitron, sans-serif; font-size: 11px; letter-spacing: .2em; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.scoreboard { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.scoreboard .row { display: flex; justify-content: space-between; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.scoreboard .row.leader { border-color: rgba(255,45,166,.5); }
.duel-msg { font-family: Orbitron, sans-serif; font-weight: 700; font-size: 22px; text-align: center; margin: 8px 0 16px; min-height: 30px; letter-spacing: .1em; }
.target {
  width: 100%; min-height: 220px; border-radius: 20px; border: 2px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.04); color: rgba(255,255,255,.5);
  font-family: Orbitron, sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .15em; cursor: pointer;
}
.target:not(:disabled) { cursor: pointer; }
.target.live { background: #FF2DA6; border-color: #FF2DA6; color: #fff; box-shadow: 0 0 60px rgba(255,45,166,.6); }
.target.fouled { background: rgba(255,60,60,.15); border-color: rgba(255,60,60,.5); color: #ff6b6b; }
