/* PaintBall GO — UI styles */
:root {
  --bg: #0c0f14;
  --panel: rgba(18, 23, 32, 0.92);
  --panel-line: rgba(255, 255, 255, 0.08);
  --ink: #e8edf4;
  --muted: #93a1b3;
  --accent: #ff7a1a;
  --red: #e5484d;
  --blue: #3f8cff;
  --good: #38c172;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(255, 122, 26, 0.09), transparent),
    radial-gradient(900px 500px at 10% 110%, rgba(63, 140, 255, 0.08), transparent),
    var(--bg);
  color: var(--ink);
  overflow: hidden;
}
.hidden { display: none !important; }
b { color: #fff; }

#app, .screen { height: 100%; }

/* ============================== MENU ============================== */
#screen-menu { display: flex; flex-direction: column; overflow: auto; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
}
.brand { font-size: 22px; letter-spacing: 2px; font-weight: 300; display: flex; align-items: center; gap: 10px; }
.brand b { color: var(--accent); font-weight: 800; }
.splat {
  width: 20px; height: 20px; border-radius: 60% 40% 55% 45%;
  background: radial-gradient(circle at 35% 35%, var(--accent), #c24d00);
  box-shadow: 6px 5px 0 -4px var(--red), -5px 7px 0 -5px var(--blue);
}
.topbar-right { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #444; }
.status-dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.status-dot.off { background: #666; }

.menu-grid {
  display: grid; grid-template-columns: 1.25fr 1fr 320px; gap: 16px;
  padding: 6px 22px 12px;
  max-width: 1280px; width: 100%; margin: 0 auto; flex: 1;
}
@media (max-width: 1020px) { .menu-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  padding: 18px;
  backdrop-filter: blur(6px);
}
.panel h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 12px; }
.panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 14px 0 8px; }

.field { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.field input {
  display: block; width: 100%; margin-top: 6px;
  background: #0a0e14; color: var(--ink); border: 1px solid var(--panel-line);
  border-radius: 8px; padding: 10px 12px; font-size: 15px;
}
input:focus, select:focus { outline: 1px solid var(--accent); }

#map-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.map-card {
  position: relative; border: 1px solid var(--panel-line); border-radius: 10px;
  padding: 12px; cursor: pointer; overflow: hidden; min-height: 86px;
  transition: transform 0.08s ease, border-color 0.08s ease;
}
.map-card:hover { transform: translateY(-2px); }
.map-card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.map-card .mc-name { font-weight: 700; }
.map-card .mc-desc { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.map-card.dust { background: linear-gradient(160deg, rgba(214,178,110,.28), rgba(60,48,28,.15)); }
.map-card.ice { background: linear-gradient(160deg, rgba(150,190,235,.30), rgba(30,45,70,.18)); }
.map-card.any { background: linear-gradient(160deg, rgba(255,122,26,.20), rgba(63,140,255,.18)); }
.mc-tag {
  position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: 1px;
  color: var(--bg); background: var(--accent); border-radius: 4px; padding: 2px 6px;
}

.btn-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.private-row input {
  flex: 1; min-width: 90px; background: #0a0e14; color: var(--ink);
  border: 1px solid var(--panel-line); border-radius: 8px; padding: 9px 10px;
  text-transform: uppercase; letter-spacing: 3px; text-align: center;
}
.code-line { margin-top: 10px; color: var(--muted); font-size: 13px; }
.code-line b { color: var(--accent); letter-spacing: 3px; font-size: 15px; }

.btn {
  appearance: none; border: 1px solid var(--panel-line); cursor: pointer;
  background: #161c27; color: var(--ink);
  padding: 11px 16px; border-radius: 9px; font-size: 14px; font-weight: 600;
  transition: filter 0.08s ease, transform 0.05s ease;
}
.btn:hover { filter: brightness(1.25); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: linear-gradient(180deg, #ff8f3d, #ef6a00); border-color: transparent; color: #190d02; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.settings { margin-top: 14px; font-size: 13px; color: var(--muted); }
.settings summary { cursor: pointer; letter-spacing: 1px; text-transform: uppercase; font-size: 12px; }
.settings label { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.settings input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-v { min-width: 34px; text-align: right; color: var(--ink); }

.howto .keys { list-style: none; color: var(--muted); font-size: 13px; line-height: 1.9; }
.howto .keys b { color: var(--ink); background: #1a2130; border-radius: 4px; padding: 1px 6px; }
.howto p { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.5; }

#loadout-cards { display: grid; gap: 8px; }
.lo-card {
  border: 1px solid var(--panel-line); border-radius: 9px; padding: 9px 12px;
  cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.lo-card.sel { border-color: var(--accent); background: rgba(255, 122, 26, 0.08); }
.lo-name { font-weight: 700; font-size: 14px; }
.lo-desc { font-size: 11px; color: var(--muted); }

.foot { padding: 10px 22px 16px; color: #5b6675; font-size: 11.5px; text-align: center; }

/* ------------------------------ ads ------------------------------ */
.ad-slot {
  position: relative; display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(255,255,255,0.18); border-radius: 10px;
  overflow: hidden; color: var(--muted); background: rgba(255,255,255,0.02);
}
.ad-label {
  position: absolute; top: 4px; left: 8px; font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; color: #67748a; z-index: 2;
}
.ad-leaderboard { min-height: 96px; margin: 4px auto 10px; width: min(760px, 94%); }
.ad-square { min-height: 260px; }
.ad-interstitial { min-height: 200px; margin: 14px 0; }
.ad-creative {
  width: 100%; height: 100%; min-height: inherit; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  text-align: center; padding: 18px 14px;
}
.ad-creative .ad-title { font-weight: 800; font-size: 19px; letter-spacing: 0.5px; }
.ad-creative .ad-tagline { font-size: 12.5px; opacity: 0.85; }
.ad-creative .ad-cta {
  margin-top: 6px; font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 999px; background: rgba(0,0,0,0.25);
}

/* ============================== GAME ============================== */
#screen-game { position: relative; background: #000; }
#c3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#hud { position: absolute; inset: 0; pointer-events: none; user-select: none; }

#crosshair {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 26px;
  transform: translate(-50%, -50%);
}
#crosshair::before, #crosshair::after {
  content: ""; position: absolute; background: rgba(255,255,255,0.85);
  box-shadow: 0 0 2px rgba(0,0,0,0.9);
}
#crosshair::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); clip-path: polygon(0 0, 100% 0, 100% 32%, 0 32%, 0 68%, 100% 68%, 100% 100%, 0 100%); }
#crosshair::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); clip-path: polygon(0 0, 32% 0, 32% 100%, 0 100%, 68% 0, 100% 0, 100% 100%, 68% 100%); }

#hitmarker {
  position: absolute; left: 50%; top: 50%; width: 34px; height: 34px;
  transform: translate(-50%, -50%) rotate(45deg); opacity: 0;
  transition: opacity 0.25s ease;
}
#hitmarker span { position: absolute; background: #fff; box-shadow: 0 0 3px #000; }
#hitmarker .h1 { left: 0; top: 0; width: 10px; height: 2px; }
#hitmarker .h2 { right: 0; top: 0; width: 2px; height: 10px; }
#hitmarker .h3 { left: 0; bottom: 0; width: 2px; height: 10px; }
#hitmarker .h4 { right: 0; bottom: 0; width: 10px; height: 2px; }
#hitmarker.show { opacity: 1; transition: none; }
#hitmarker.kill span { background: var(--red); }

#vignette {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(229, 72, 77, 0.55) 100%);
}
#dmg-arrow {
  position: absolute; left: 50%; top: 50%; font-size: 26px; color: var(--red);
  text-shadow: 0 0 6px #000; opacity: 0; transform-origin: 0 -60px;
}

.topbar-hud {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  background: rgba(8, 11, 16, 0.62); border: 1px solid var(--panel-line);
  border-radius: 10px; padding: 7px 16px;
}
.score { font-size: 21px; font-weight: 800; display: flex; gap: 8px; align-items: baseline; }
.score .tname { font-size: 11px; letter-spacing: 2px; color: var(--muted); }
.score.red span:last-child { color: var(--red); }
.score.blue span:first-of-type { color: var(--blue); order: -1; }
.score.blue { flex-direction: row-reverse; }
#timer { font-variant-numeric: tabular-nums; font-size: 17px; color: #dfe7f1; min-width: 56px; text-align: center; }

#killfeed {
  position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column;
  gap: 5px; align-items: flex-end; font-size: 12.5px;
}
.kf-row {
  background: rgba(8, 11, 16, 0.66); border: 1px solid var(--panel-line);
  border-radius: 7px; padding: 4px 9px; animation: kf-in 0.15s ease;
}
.kf-row .kn { font-weight: 700; } .kf-row .vn { font-weight: 700; }
.kf-row .hs { color: var(--accent); font-weight: 800; margin: 0 3px; }
@keyframes kf-in { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }

#minimap {
  position: absolute; left: 14px; bottom: 14px; border-radius: 10px;
  border: 1px solid var(--panel-line); background: rgba(8, 11, 16, 0.55);
}

.hud-bl { position: absolute; left: 16px; bottom: 210px; display: flex; align-items: center; gap: 10px; }
#health-bar { width: 210px; height: 12px; background: rgba(8,11,16,0.6); border: 1px solid var(--panel-line); border-radius: 7px; overflow: hidden; }
#health-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #37d67a, #2fbf71); transition: width 0.15s ease; }
#health-num { font-size: 21px; font-weight: 800; text-shadow: 0 1px 3px #000; }

.hud-br { position: absolute; right: 16px; bottom: 16px; text-align: right; text-shadow: 0 1px 3px #000; }
#weapon-name { font-size: 14px; letter-spacing: 1px; color: #cfd9e6; }
.ammo { font-size: 30px; font-weight: 800; }
.ammo-inf { font-size: 15px; color: var(--muted); }
#slots { display: inline-flex; gap: 6px; margin-top: 4px; }
#slots span {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: rgba(8,11,16,0.6); border: 1px solid var(--panel-line); color: var(--muted);
}
#slots span.on { color: var(--accent); border-color: var(--accent); }
#reload-hint { margin-top: 6px; color: var(--accent); font-weight: 700; letter-spacing: 2px; font-size: 12px; }

#center-msg {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  text-align: center; opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
#center-msg.show { opacity: 1; }
#center-title { font-size: 44px; font-weight: 900; letter-spacing: 3px; text-shadow: 0 2px 12px rgba(0,0,0,0.8); }
#center-sub { font-size: 15px; color: #cdd7e4; margin-top: 8px; text-shadow: 0 1px 6px #000; }

#chat { position: absolute; left: 16px; bottom: 64px; width: 360px; pointer-events: none; }
#chat-log { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; max-height: 130px; overflow: hidden; }
#chat-log div { background: rgba(8,11,16,0.55); border-radius: 6px; padding: 3px 8px; width: fit-content; max-width: 100%; }
#chat-input {
  pointer-events: auto; display: none; width: 100%; margin-top: 6px;
  background: rgba(8,11,16,0.85); color: var(--ink); border: 1px solid var(--panel-line);
  border-radius: 7px; padding: 8px 10px; font-size: 13px;
}
#chat.open #chat-input { display: block; }

#fps-tag {
  position: absolute; top: 12px; left: 14px; font-size: 11px; color: #7d8aa0;
  background: rgba(8,11,16,0.5); padding: 3px 8px; border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

/* --------------------------- overlays --------------------------- */
.overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 7, 10, 0.78); z-index: 20; backdrop-filter: blur(3px);
}
.load-box, .pause-box, .results-box, .sb-box { text-align: center; max-width: 92vw; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.12); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#overlay-loading h3 { letter-spacing: 1px; }
#loading-tip { color: var(--muted); margin-top: 8px; font-size: 13px; }
#btn-cancel-queue { margin-top: 16px; }

.pause-box { display: flex; flex-direction: column; gap: 10px; min-width: 260px; }
.results-box { min-width: min(560px, 92vw); }
.results-box h2 { font-size: 34px; letter-spacing: 2px; margin-bottom: 12px; }
#results-title.win { color: var(--good); }
#results-title.loss { color: var(--red); }
#results-title.tie { color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 6px 10px; text-align: left; }
#sb-table th, #results-board th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
tbody tr.me { background: rgba(255, 122, 26, 0.10); }
.tm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

#scoreboard { z-index: 15; background: rgba(5,7,10,0.55); }
.sb-box { min-width: min(480px, 90vw); }

#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 99; }
.toast {
  background: rgba(14, 18, 25, 0.95); border: 1px solid var(--panel-line);
  border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 9px 14px; font-size: 13px; animation: kf-in 0.18s ease;
}
