:root {
  color-scheme: dark;
  --text-scale: 1;
  --ink: #e7fbff;
  --muted: #86a4ad;
  --cyan: #44e9ff;
  --orange: #ff7a18;
  --amber: #ffcb69;
  --red: #ff4f68;
  --panel: rgba(5, 14, 22, .78);
  --line: rgba(126, 230, 255, .2);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #02070b; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
#game-shell { position: relative; width: 100%; height: 100%; overflow: hidden; background: #04101a; user-select: none; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: auto; }
#minimap { position: absolute; top: 76px; right: 20px; width: 176px; height: 176px; border: 1px solid var(--line); border-radius: 50%; background: rgba(3, 11, 17, .76); box-shadow: inset 0 0 0 8px rgba(0,0,0,.18); }
#topbar { position: absolute; left: 20px; right: 20px; top: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; letter-spacing: .16em; font-size: 13px; font-weight: 800; text-shadow: 0 2px 16px #000; }
.brand small { color: var(--muted); font-size: 9px; font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--cyan); color: var(--cyan); border-radius: 8px; background: rgba(0, 220, 255, .08); }
.network { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; font-size: 10px; letter-spacing: .08em; }
#network-dot { width: 7px; height: 7px; border-radius: 50%; background: #65777e; }
#network-dot.online { background: #58ffad; box-shadow: 0 0 12px #58ffad; }
#ping, #player-count { color: var(--muted); }
#stats { position: absolute; left: 20px; bottom: 20px; display: grid; grid-template-columns: 155px 155px 110px 92px; gap: 9px; align-items: stretch; }
.stat, .ammo, .credits { min-height: 55px; padding: 9px 12px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); border-radius: 10px; }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
.stat span { color: var(--muted); font-size: 9px; letter-spacing: .15em; }
.stat strong { font-size: 15px; }
.stat i { grid-column: 1 / -1; display: block; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.stat i b { display: block; height: 100%; width: 100%; background: var(--cyan); transition: width .15s; }
#hp-bar { background: #55f2b2; }
#armor-bar { background: #5ac8ff; }
.ammo { display: flex; align-items: baseline; justify-content: center; gap: 5px; }
.ammo strong { font-size: 29px; letter-spacing: -.05em; }
.ammo span, .ammo em { color: var(--muted); font-style: normal; }
.credits { display: flex; align-items: center; justify-content: center; gap: 7px; }
.credits span { color: var(--amber); }
.credits strong { font-size: 20px; }
#mission-panel { position: absolute; top: 76px; left: 20px; width: 260px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); backdrop-filter: blur(10px); }
#mission-panel header { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 10px; letter-spacing: .12em; }
#mission-panel header strong { color: var(--amber); }
#mission-objective { margin: 0 0 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
#mission-progress { position: relative; height: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); }
#mission-progress b { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 35%, transparent), color-mix(in srgb, var(--cyan) 70%, transparent)); transition: width .35s ease; }
#mission-progress span { position: relative; display: grid; height: 100%; place-items: center; color: var(--ink); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.zone { margin-top: 8px; }
.zone-line { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.zone-line strong { overflow: hidden; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.zone-track { height: 4px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.zone-track b { display: block; height: 100%; background: var(--cyan); transition: width .2s; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); pointer-events: none; }
#crosshair span { position: absolute; background: rgba(235, 253, 255, .92); box-shadow: 0 0 4px #000; }
#crosshair span:nth-child(1), #crosshair span:nth-child(2) { width: 7px; height: 1px; top: 16px; }
#crosshair span:nth-child(1) { left: 2px; } #crosshair span:nth-child(2) { right: 2px; }
#crosshair span:nth-child(3), #crosshair span:nth-child(4) { width: 1px; height: 7px; left: 16px; }
#crosshair span:nth-child(3) { top: 2px; } #crosshair span:nth-child(4) { bottom: 2px; }
#crosshair i { position: absolute; width: 3px; height: 3px; left: 15px; top: 15px; border-radius: 50%; background: var(--cyan); }
#damage-vignette, #muzzle { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
#damage-vignette { background: radial-gradient(circle, transparent 40%, rgba(255, 20, 60, .72)); transition: opacity .2s; }
#damage-vignette.flash { opacity: .78; }
#muzzle { background: radial-gradient(circle at 50% 67%, rgba(255,237,166,.5), transparent 18%); transition: opacity .08s; }
#muzzle.flash { opacity: 1; }
#vehicle-hud { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); min-width: 180px; padding: 10px 18px; border: 1px solid rgba(255,203,105,.35); border-radius: 12px; background: rgba(13, 13, 10, .82); text-align: center; }
#vehicle-hud span, #vehicle-hud small, #vehicle-hud em { display: block; color: var(--muted); font-size: 9px; font-style: normal; letter-spacing: .14em; }
#vehicle-hud strong { color: var(--amber); font-size: 30px; }
#vehicle-hud small.critical { color: var(--red); font-weight: 900; }
#ability-status { position: absolute; right: 22px; bottom: 26px; min-width: 190px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(3,9,13,.78); text-align: right; }
#ability-status span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
#ability-status strong { color: var(--cyan); font-size: 10px; letter-spacing: .07em; }
#ability-status.cooldown strong { color: var(--amber); }
#killfeed { position: absolute; top: 276px; right: 20px; width: 280px; text-align: right; pointer-events: none; }
.feed-item { margin-top: 6px; padding: 7px 9px; border-right: 2px solid var(--cyan); background: linear-gradient(90deg, transparent, rgba(4,15,22,.75)); font-size: 11px; animation: feed-in .2s ease-out; }
@keyframes feed-in { from { transform: translateX(10px); opacity: 0; } }
#chat-log { position: absolute; left: 20px; bottom: 92px; width: min(410px, 55vw); pointer-events: none; }
.chat-line { margin-top: 4px; color: #c5dbe0; font-size: 11px; text-shadow: 0 1px 4px #000; }
.chat-line b { color: var(--cyan); }
#chat-box { position: absolute; left: 20px; bottom: 98px; width: min(420px, 70vw); padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(3, 12, 18, .94); }
#chat-box span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
#chat-input, #callsign, select { width: 100%; border: 1px solid rgba(118,225,255,.3); border-radius: 8px; outline: none; background: rgba(255,255,255,.05); color: var(--ink); }
#chat-input { padding: 9px; }
#callsign, select { padding: 12px; font-size: 16px; }
select option { background: #071019; color: #e7fbff; }
#chat-input:focus, #callsign:focus, select:focus, button:focus-visible, input:focus-visible { border-color: var(--cyan); outline: 2px solid color-mix(in srgb, var(--cyan) 55%, transparent); outline-offset: 2px; }
#scoreboard { position: absolute; left: 50%; top: 50%; width: min(620px, 84vw); max-height: 65vh; transform: translate(-50%, -50%); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(3, 12, 18, .94); }
#scoreboard header { display: flex; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .12em; }
#scoreboard header small { color: var(--muted); }
#scoreboard-rows { max-height: 55vh; overflow: auto; }
.score-row { display: grid; grid-template-columns: 1fr 70px 55px 55px; gap: 8px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12px; }
.score-row.me { color: var(--cyan); background: rgba(68,233,255,.06); }
.score-row span:not(:first-child) { text-align: right; color: var(--muted); }
#performance-overlay { position: absolute; top: 270px; left: 20px; z-index: 12; width: 278px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(2, 8, 13, .9); box-shadow: 0 10px 30px rgba(0,0,0,.25); font-variant-numeric: tabular-nums; pointer-events: none; }
#performance-overlay header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
#performance-overlay header small { color: var(--muted); font-size: 7px; font-weight: 600; letter-spacing: .04em; }
#performance-compact, #performance-detail { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; color: var(--muted); font-size: 9px; line-height: 1.35; }
#performance-compact strong, #performance-detail strong { color: var(--ink); font-weight: 800; text-align: right; }
#performance-detail { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
.overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: clamp(30px, 8vw, 110px); padding: 34px; background: radial-gradient(circle at 60% 40%, rgba(15,55,75,.45), rgba(1,5,8,.94) 66%); z-index: 20; }
.overlay.visible { display: flex; }
#start-screen { isolation: isolate; justify-content: space-between; overflow: hidden; background: #02070b; }
#start-screen::before { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(1,4,7,.92) 0%, rgba(1,4,7,.3) 47%, rgba(1,4,7,.76) 100%), linear-gradient(0deg, rgba(1,4,7,.8), transparent 55%); content: ""; pointer-events: none; }
.title-art-frame { position: absolute; inset: 0; z-index: -2; margin: 0; overflow: hidden; background: radial-gradient(circle at 60% 35%, #183d52, #02070b 70%); }
.title-art-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.95) contrast(1.04); }
.title-art-fallback { width: 100%; height: 100%; place-content: center; text-align: center; background: radial-gradient(circle, #173344, #02070b 68%); }
.title-art-fallback:not([hidden]) { display: grid; }
.title-art-fallback span { color: var(--orange); font-size: clamp(68px, 12vw, 170px); font-weight: 950; line-height: .8; text-shadow: 0 0 45px rgba(255,122,24,.35); }
.title-art-fallback p { color: #ffd2aa; font-size: 13px; font-weight: 900; letter-spacing: .3em; }
#start-screen.art-missing::before { background: radial-gradient(circle at 50% 35%, rgba(20,55,72,.22), rgba(1,4,7,.94) 70%); }
.title-lockup { max-width: 560px; }
.eyebrow { color: var(--orange); font-size: 11px; letter-spacing: .24em; }
.title-lockup h1 { margin: 10px 0 16px; font-size: clamp(54px, 10vw, 132px); line-height: .75; letter-spacing: -.08em; font-weight: 300; }
.title-lockup h1 strong { color: transparent; font-weight: 900; -webkit-text-stroke: 2px var(--orange); }
.title-lockup p { max-width: 530px; color: #c4d2d6; line-height: 1.6; text-shadow: 0 2px 12px #000; }
.join-card, .pause-card, .settings-card, .victory-card, .credits-card { width: min(410px, 92vw); padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(3, 9, 13, .9); backdrop-filter: blur(18px); }
.settings-card { max-height: 92vh; overflow-y: auto; }
#start-screen .join-card { border-color: rgba(255,122,24,.32); box-shadow: 0 22px 70px rgba(0,0,0,.42); }
.join-card > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; letter-spacing: .15em; }
#edition-select { margin-bottom: 8px; }
.role-description { min-height: 30px; margin: 5px 0 10px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.edition-description { display: grid; gap: 3px; min-height: 62px; margin-bottom: 2px; padding: 9px 11px; border-left: 2px solid var(--cyan); background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.edition-description strong { color: var(--ink); font-size: 12px; }
.edition-description span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.edition-description small { color: var(--cyan); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
#join-button, #resume-button, #settings-apply-button, #continue-button { width: 100%; margin-top: 12px; padding: 13px 16px; border: 0; border-radius: 9px; background: var(--cyan); color: #001016; font-weight: 900; letter-spacing: .08em; }
#join-button { background: var(--orange); color: #150700; box-shadow: 0 7px 24px rgba(255,122,24,.2); }
#join-button:hover, #resume-button:hover, #settings-apply-button:hover, #continue-button:hover { filter: brightness(1.08); }
.secondary-button, .danger-button { width: 100%; margin-top: 9px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.04); color: var(--ink); font-weight: 800; letter-spacing: .07em; }
.secondary-button:hover { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 9%, transparent); }
.danger-button { border-color: rgba(255,79,104,.38); color: #ff9aaa; }
.danger-button:hover { background: rgba(255,79,104,.1); }
.server-note { display: flex; align-items: center; gap: 7px; margin: 10px 0 16px; color: var(--muted); font-size: 10px; }
.server-note span { width: 7px; height: 7px; border-radius: 50%; background: #58ffad; }
.controls-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; color: var(--muted); font-size: 10px; }
.controls-grid b { color: var(--ink); }
.pause-card { text-align: center; }
.arrival-card { width: min(620px, 92vw); padding: 30px; border: 1px solid rgba(255,122,24,.45); border-radius: 18px; background: rgba(3,9,13,.94); box-shadow: 0 0 90px rgba(255,122,24,.14); }
.arrival-card > span { color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.arrival-card h2 { margin: 10px 0; font-size: clamp(30px, 5vw, 58px); line-height: .95; }
.arrival-card p, .arrival-card li, .arrival-card small { color: var(--muted); line-height: 1.55; }
.arrival-card strong { color: var(--cyan); }
.arrival-card small { display: block; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
#arrival-screen.visible .arrival-card { animation: arrival-card 2.4s ease both; }
@keyframes arrival-card { 0% { opacity: 0; transform: translateY(24px) scale(.98); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-12px); } }
.pause-card > span, .respawn-card > span, .settings-card > span, .victory-card > span, .credits-card > span { color: var(--cyan); font-size: 10px; letter-spacing: .2em; }
.pause-card h2 { margin-bottom: 5px; }
.pause-card p { color: var(--muted); }
#settings-screen { z-index: 32; background: rgba(1,4,8,.9); }
.settings-card h2, .victory-card h2, .credits-card h2 { margin: 7px 0 18px; font-size: 32px; }
.settings-card > label:not(.check-row) { display: flex; justify-content: space-between; margin: 14px 0 6px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.settings-card output { color: var(--cyan); font-weight: 800; }
.settings-card input[type="range"] { width: 100%; accent-color: var(--cyan); }
.binding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.binding-grid legend { padding: 0 6px; color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.binding-grid label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.binding-grid select { width: 90px; padding: 7px 8px; font-size: 10px; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 13px; color: var(--ink); font-size: 11px; }
.check-row input { width: 17px; height: 17px; accent-color: var(--cyan); }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.settings-actions button { margin-top: 0; }
#respawn-screen { background: rgba(13,0,5,.75); }
.respawn-card { text-align: center; }
.respawn-card h2 { font-size: 38px; }
#victory-screen { z-index: 31; background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--cyan) 20%, transparent), rgba(2,6,10,.94) 64%); }
.victory-card { text-align: center; box-shadow: 0 0 80px color-mix(in srgb, var(--cyan) 15%, transparent); }
.victory-card p { color: var(--muted); line-height: 1.5; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0 8px; }
.result-grid span { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 9px; letter-spacing: .1em; }
.result-grid strong { color: var(--ink); font-size: 22px; letter-spacing: normal; }
.credits-card { max-height: 90vh; overflow-y: auto; box-shadow: 0 0 80px color-mix(in srgb, var(--cyan) 12%, transparent); }
.credits-card p, .credits-card small { color: var(--muted); line-height: 1.55; }
.credits-card dl { display: grid; gap: 10px; margin: 18px 0; }
.credits-card dl div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.credits-card dt { color: var(--cyan); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.credits-card dd { margin: 5px 0 0; color: var(--ink); font-size: 12px; line-height: 1.45; }
#interaction-hint { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 11px; }
#interaction-hint b { color: var(--cyan); }
#toast { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); padding: 9px 14px; border-radius: 8px; background: rgba(4,15,22,.88); color: var(--amber); font-size: 11px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
body.reduced-effects *, body.reduced-effects *::before, body.reduced-effects *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
body.reduced-effects #muzzle, body.reduced-effects #damage-vignette { display: none; }
body.high-contrast {
  --ink: #ffffff;
  --muted: #d3e7ec;
  --line: rgba(180, 241, 255, .62);
  --panel: rgba(0, 4, 8, .96);
}
#topbar, #mission-panel, #stats, #killfeed, #chat-log, #interaction-hint,
#performance-overlay, .join-card, .pause-card, .settings-card, .victory-card,
.arrival-card { zoom: var(--text-scale); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media (max-width: 760px) {
  #minimap { width: 126px; height: 126px; top: 64px; right: 10px; }
  #topbar { left: 10px; right: 10px; top: 10px; }
  .brand small, #ping { display: none; }
  #mission-panel { left: 10px; top: 64px; width: 210px; }
  #stats { left: 10px; right: 10px; bottom: 10px; grid-template-columns: 1fr 1fr 90px; }
  .credits { display: none; }
  .overlay { flex-direction: column; justify-content: flex-start; overflow: auto; padding: 44px 18px; }
  #start-screen { justify-content: flex-start; }
  #start-screen::before { background: linear-gradient(0deg, rgba(1,4,7,.96) 0%, rgba(1,4,7,.42) 70%, rgba(1,4,7,.76) 100%); }
  .title-art-frame img { object-position: 46% center; }
  .title-lockup h1 { font-size: 68px; }
  .title-lockup p { font-size: 13px; }
  #killfeed { top: 210px; right: 10px; width: 220px; }
}
