@font-face { font-family: Rajdhani; src: url('/fonts/rajdhani.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --drop-accent: #b8f2cc;
  --accent-strong: #3ee6b0;
  --ink: #f2f6f2;
  --ink-soft: rgba(242, 246, 242, .72);
  --ink-faint: rgba(242, 246, 242, .46);
  --glass: rgba(10, 22, 24, .62);
  --glass-strong: rgba(9, 18, 20, .88);
  --line: rgba(242, 246, 242, .16);
  --shield: #58b8ff;
  --health: #f4f7ef;
  --danger: #ff7a55;
  --warn: #ffc24a;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0c1a1c; color: var(--ink); font-family: Rajdhani, 'Segoe UI', system-ui, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#grade { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 44%, rgba(255, 140, 90, .55) 100%); }

/* Menu */
.screen { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(16px, 2.4vw, 34px); background: linear-gradient(100deg, rgba(8, 18, 20, .82) 0%, rgba(8, 18, 20, .46) 44%, rgba(8, 18, 20, 0) 72%); overflow-y: auto; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: .14em; }
.mark b { color: var(--drop-accent); font-weight: 700; }
.glyph { width: 18px; height: 22px; background: var(--drop-accent); clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); }
.hero { align-self: center; max-width: 620px; padding-block: 16px; }
.kicker { margin: 0 0 8px; color: var(--drop-accent); font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(42px, 6.4vw, 84px); line-height: .96; font-weight: 700; letter-spacing: -.01em; }
h1 em { color: var(--drop-accent); font-style: normal; }
.lede { margin: 16px 0 22px; max-width: 34em; color: var(--ink-soft); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.3; font-weight: 500; }
.options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.options label { display: grid; gap: 3px; min-width: 150px; color: var(--ink-faint); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
select { min-height: 44px; padding: 8px 10px; background: rgba(9, 18, 20, .72); border: 1px solid var(--line); border-radius: 8px; font-size: 17px; letter-spacing: 0; font-weight: 600; text-transform: none; color: var(--ink); }
select option { background: #101f22; color: var(--ink); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.primary, .secondary, .quiet { cursor: pointer; border-radius: 8px; font-weight: 700; }
.primary { min-height: 52px; padding: 0 26px; font-size: 21px; color: #07211a; background: var(--drop-accent); border: 0; transition: background .12s, transform .08s; }
.primary:hover:not(:disabled) { background: #d6ffe4; }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:disabled { opacity: .55; cursor: progress; }
.secondary { display: inline-flex; align-items: center; min-height: 52px; padding: 0 18px; font-size: 18px; background: rgba(9, 18, 20, .6); color: var(--ink); border: 1px solid var(--line); text-decoration: none; }
.secondary:hover:not(:disabled) { border-color: var(--drop-accent); }
.secondary:disabled { opacity: .5; }
.quiet { min-height: 38px; padding: 0 12px; background: transparent; color: var(--ink-soft); border: 1px solid transparent; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; }
.quiet:hover { color: var(--ink); border-color: var(--line); }
:focus-visible { outline: 2px solid var(--drop-accent); outline-offset: 2px; }
.small { color: var(--ink-faint); font-size: 16px; line-height: 1.3; font-weight: 500; }
.progress { height: 3px; margin-top: 8px; max-width: 360px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--drop-accent); transition: width .2s; }
.last { color: var(--ink-faint); font-size: 16px; font-weight: 600; letter-spacing: .06em; }

/* Panels */
.panel { position: fixed; z-index: 30; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 18px 20px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(10px); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel h2 { margin: 0; font-size: 28px; }
.panel h3 { margin: 16px 0 2px; font-size: 19px; color: var(--drop-accent); }
.icon { width: 44px; height: 44px; font-size: 26px; background: none; border: 0; color: var(--ink-soft); cursor: pointer; }
.row { display: grid; grid-template-columns: 1fr minmax(120px, 190px) 46px; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 600; }
.row output { color: var(--ink-faint); text-align: right; }
.row input[type=checkbox] { justify-self: start; width: 22px; height: 22px; accent-color: var(--accent-strong); }
input[type=range] { width: 100%; accent-color: var(--accent-strong); }
#binds { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; margin: 8px 0; }
.bind { display: flex; justify-content: space-between; align-items: center; min-height: 40px; font-size: 16px; font-weight: 600; gap: 8px; }
.bind button { min-width: 74px; min-height: 34px; padding: 0 8px; cursor: pointer; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 6px; font-weight: 700; color: var(--ink); }
.bind button.waiting { background: var(--drop-accent); color: #07211a; }
.panel-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.agent { display: grid; grid-template-columns: 1fr 104px 110px 44px; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.agent input[type=text] { min-height: 44px; padding: 0 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 6px; font-size: 17px; font-weight: 600; }
.agent .sl { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px; align-items: center; color: var(--ink-faint); font-size: 15px; }
.agent .rm { min-height: 44px; background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); cursor: pointer; }

/* Overlays */
.overlay { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 16px; background: rgba(6, 14, 16, .6); backdrop-filter: blur(6px); }
.overlay > div { display: grid; gap: 10px; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 14px; }
.overlay h2 { margin: 0; font-size: 36px; line-height: 1; }
#summary > div { width: min(620px, 100%); padding: 28px; background: rgba(9, 18, 20, .78); }
#summary h2 { font-size: clamp(40px, 7vw, 68px); letter-spacing: -.01em; }
#summary.won h2 { color: var(--drop-accent); }
#sum-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#sum-stats span { display: grid; padding: 8px 10px; background: rgba(255, 255, 255, .05); border-radius: 8px; color: var(--ink-faint); font-size: 14px; font-weight: 600; }
#sum-stats b { color: var(--ink); font-size: 26px; line-height: 1.1; }
#sum-squad div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 17px; font-weight: 600; color: var(--ink-soft); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); user-select: none; -webkit-user-select: none; }
#compass { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: min(620px, 64vw); height: 46px; border-radius: 8px; background: rgba(8, 18, 20, .42); }
#zonebar { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); width: min(300px, 56vw); padding: 1px 6px 2px; border-radius: 6px; background: rgba(8, 18, 20, .42); text-align: center; font-size: 15px; font-weight: 700; letter-spacing: .05em; }
#zonebar i { display: block; height: 3px; margin-top: 2px; background: var(--warn); transform-origin: left; }
#zonebar.outside span { color: var(--danger); }
#squad { position: absolute; top: 14px; left: 14px; display: grid; gap: 5px; width: 186px; }
.mate { display: grid; grid-template-columns: 10px 1fr; column-gap: 7px; align-items: center; font-size: 16px; font-weight: 700; }
.mate i { grid-row: span 2; width: 10px; height: 10px; border-radius: 3px; }
.mate .m { grid-column: 2; height: 4px; background: rgba(255, 255, 255, .2); border-radius: 2px; overflow: hidden; }
.mate .m b { display: block; height: 100%; background: var(--health); }
.mate.downed { color: var(--warn); }
.mate.downed .m b { background: var(--danger); }
.mate.out { opacity: .4; text-decoration: line-through; }
#feed { position: absolute; top: 234px; right: 14px; display: grid; justify-items: end; gap: 2px; width: 280px; font-size: 16px; font-weight: 600; }
.line { padding: 1px 8px; background: rgba(0, 0, 0, .32); border-radius: 4px; animation: fade 6s forwards; }
.line b { color: var(--drop-accent); }
.line.me { background: rgba(62, 230, 176, .22); }
@keyframes fade { 85% { opacity: 1; } 100% { opacity: 0; } }
#minimap-wrap { position: absolute; top: 12px; right: 12px; width: 210px; }
#minimap { width: 210px; height: 210px; display: block; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); }
#alive { position: absolute; left: 8px; top: 6px; font-size: 16px; font-weight: 700; }
#bigmap { position: fixed; z-index: 15; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(92vmin, 760px); height: min(92vmin, 760px); border-radius: 12px; border: 1px solid var(--line); pointer-events: none; }
#markers, #numbers { position: absolute; inset: 0; overflow: hidden; }
.marker { position: absolute; transform: translate(-50%, -100%); font-size: 15px; font-weight: 700; color: var(--drop-accent); white-space: nowrap; }
.marker.down { color: var(--warn); }
.num { position: absolute; transform: translate(-50%, -50%); font-size: 22px; font-weight: 700; color: #fff; }
.num.head { color: var(--warn); font-size: 27px; }
.num.shield { color: #a9dcff; }
#crosshair { position: absolute; top: 50%; left: 50%; width: 0; height: 0; }
#crosshair i { position: absolute; background: rgba(255, 255, 255, .92); box-shadow: 0 0 2px rgba(0, 0, 0, .7); }
#crosshair .t, #crosshair .b { width: 2px; height: 8px; left: -1px; }
#crosshair .l, #crosshair .r { height: 2px; width: 8px; top: -1px; }
#crosshair b { position: absolute; left: -1px; top: -1px; width: 2px; height: 2px; background: #fff; }
#crosshair.off { display: none; }
#reddot { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #5dffc8; box-shadow: 0 0 5px rgba(93, 255, 200, .9); opacity: 0; }
#stamina { position: absolute; top: 50%; left: 50%; width: 80px; height: 80px; transform: translate(-50%, -50%) rotate(-90deg); opacity: 0; transition: opacity .2s; }
#stamina circle { fill: none; stroke: var(--drop-accent); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100 100; }
#stamina.low circle { stroke: var(--danger); }
#hitmarker { position: absolute; top: 50%; left: 50%; opacity: 0; }
#hitmarker i { position: absolute; left: -1px; top: -9px; width: 2px; height: 7px; background: #fff; transform-origin: 1px 9px; }
#hitmarker i:nth-child(1) { transform: rotate(45deg) translateY(-3px); }
#hitmarker i:nth-child(2) { transform: rotate(135deg) translateY(-3px); }
#hitmarker i:nth-child(3) { transform: rotate(225deg) translateY(-3px); }
#hitmarker i:nth-child(4) { transform: rotate(315deg) translateY(-3px); }
#hitmarker.head i { background: var(--warn); height: 9px; }
#hurt-dir { position: absolute; top: 50%; left: 50%; width: 0; height: 0; opacity: 0; }
#hurt-dir i { position: absolute; left: -44px; top: -176px; width: 88px; height: 26px; background: radial-gradient(ellipse at center, var(--danger), transparent 70%); }
#prompt { position: absolute; top: 62%; left: 50%; transform: translateX(-50%); padding: 3px 12px; background: rgba(0, 0, 0, .4); border-radius: 6px; font-size: 19px; font-weight: 700; white-space: nowrap; }
#prompt:empty { display: none; }
#toast { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); font-size: 26px; font-weight: 700; text-align: center; }
#progress-ring { position: absolute; top: 56%; left: 50%; width: 200px; transform: translateX(-50%); display: none; text-align: center; font-size: 16px; font-weight: 700; }
#progress-ring i { display: block; height: 4px; background: var(--drop-accent); transform-origin: left; }
#glide-readout { position: absolute; top: 50%; left: calc(50% + 60px); font-size: 18px; font-weight: 700; color: var(--ink-soft); }
.vitals { position: absolute; bottom: 16px; left: 16px; display: grid; gap: 4px; width: min(300px, 44vw); }
.bar-row { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; letter-spacing: .05em; }
.bar-row b { font-size: 20px; text-align: right; letter-spacing: 0; }
.meter { height: 9px; background: rgba(255, 255, 255, .18); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 100%; transform-origin: left; }
.meter.shield i { background: var(--shield); }
.meter.health i { background: var(--health); }
.kit { position: absolute; bottom: 16px; right: 16px; display: grid; justify-items: end; gap: 4px; }
#slots { display: flex; gap: 6px; }
.slot { min-width: 96px; padding: 3px 8px 4px; background: var(--glass-strong); border: 1px solid transparent; border-radius: 7px; opacity: .86; }
.slot.cur { opacity: 1; border-color: var(--drop-accent); }
.slot small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink-soft); white-space: nowrap; }
.slot b { font-size: 26px; line-height: 1; }
.slot span { font-size: 16px; color: var(--ink-faint); font-weight: 600; }
.slot.empty { opacity: .3; }
.counts { display: flex; gap: 14px; font-size: 17px; color: var(--ink-soft); font-weight: 600; }
.counts b { color: var(--ink); }
#pause-btn { position: absolute; top: 230px; left: 8px; pointer-events: auto; display: none; }
#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0, transparent 33vmin, rgba(5, 10, 12, .96) 33.6vmin); }
#scope::before, #scope::after { content: ''; position: absolute; background: rgba(0, 0, 0, .7); }
#scope::before { top: 50%; left: calc(50% - 33vmin); width: 66vmin; height: 1px; }
#scope::after { left: 50%; top: calc(50% - 33vmin); height: 66vmin; width: 1px; }

/* Touch */
#touch { display: none; position: absolute; inset: 0; pointer-events: none; }
body.touch #touch { display: block; }
body.touch #pause-btn { display: inline-flex; top: 132px; left: auto; right: 8px; background: var(--glass); }
body.touch #minimap-wrap { width: 118px; }
body.touch #minimap { width: 118px; height: 118px; }
body.touch #feed { top: 176px; width: 190px; font-size: 14px; }
body.touch #squad { width: 112px; top: 8px; left: 8px; }
body.touch .mate { font-size: 13px; }
body.touch #compass { width: 40vw; height: 26px; top: 6px; background: rgba(8, 18, 20, .34); }
body.touch #zonebar { top: 34px; width: 40vw; font-size: 12px; }
body.touch .vitals { bottom: auto; top: 118px; left: 8px; width: 124px; gap: 2px; }
body.touch .bar-row { grid-template-columns: 1fr 24px; }
body.touch .bar-row span { display: none; }
body.touch .bar-row b { font-size: 14px; }
body.touch .kit { bottom: auto; top: 182px; left: 8px; right: auto; justify-items: start; }
body.touch #slots { flex-direction: column; gap: 3px; }
body.touch .slot { min-width: 96px; padding: 1px 6px; pointer-events: auto; }
body.touch .slot b { font-size: 16px; }
body.touch .slot small { font-size: 11px; }
body.touch .counts { font-size: 14px; gap: 8px; }
#stick { position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); width: 132px; height: 132px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); pointer-events: auto; touch-action: none; }
#stick i { position: absolute; left: 41px; top: 41px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .26); }
#look { position: absolute; top: 0; right: 0; bottom: 0; left: 40%; pointer-events: auto; touch-action: none; }
.t { position: absolute; width: 58px; height: 58px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 700; pointer-events: auto; touch-action: none; }
.t.on { background: rgba(184, 242, 204, .4); }
.t.fire { right: 14px; bottom: 96px; width: 78px; height: 78px; background: rgba(255, 122, 85, .34); font-size: 15px; }
.t.ads { right: 100px; bottom: 150px; }
.t.jump { right: 14px; bottom: 22px; width: 64px; height: 64px; }
.t.crouch { right: 86px; bottom: 22px; }
.t.reload { right: 100px; bottom: 86px; }
.t.use { right: 158px; bottom: 54px; }
.t.wall { right: 14px; bottom: 182px; }
.t.ramp { right: 14px; bottom: 246px; }
.t.swap { right: 78px; bottom: 214px; }
@media (orientation: landscape) and (max-height: 500px) {
  .hero { align-self: start; padding-block: 2px; }
  h1 { font-size: 34px; }
  .lede { margin: 6px 0 8px; font-size: 15px; }
  .t.ramp { bottom: 120px; right: 164px; }
  .t.swap { right: 164px; bottom: 184px; }
  body.touch .kit { top: auto; bottom: 4px; left: 50%; transform: translateX(-54%); justify-items: center; }
  body.touch #slots { flex-direction: row; }
  body.touch .counts { display: none; }
  body.touch #pause-btn { top: 8px; right: 136px; }
}
@media (orientation: portrait) {
  body.touch #toast { top: 168px; width: 62vw; font-size: 16px; }
  body.touch #minimap-wrap { width: 92px; }
  body.touch #minimap { width: 92px; height: 92px; }
  body.touch #pause-btn { top: 106px; }
  body.touch .kit { top: auto; bottom: 160px; left: 8px; }
  body.touch #slots { flex-direction: row; }
  body.touch .slot { min-width: 62px; padding: 1px 5px; }
  body.touch .slot small { font-size: 10px; }
  body.touch #feed { top: 200px; }
}
@media (max-width: 640px) {
  .hero { align-self: start; }
  #binds { grid-template-columns: 1fr; }
  .agent { grid-template-columns: 1fr 96px 44px; }
  .agent select:nth-of-type(2) { grid-column: 1 / 3; }
  .row { grid-template-columns: 1fr 120px 40px; }
  .options label { flex: 1 1 100%; }
  .cta .primary, .cta .secondary { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .primary { transition: none; } }
