/* ZARYA — Siberian Bulwark. Steel blue-grey, particle pink, hazard orange. */
@font-face {
  font-family: 'Russo One';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/russo-one-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/russo-one-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2122, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Russo One';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/russo-one-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6-02CB, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --steel: #8fa3b8;
  --steel-dark: #2b3140;
  --steel-panel: rgba(20, 26, 36, 0.82);
  --pink: #ff5fa8;
  --pink-hot: #ff9ccb;
  --orange: #ff8c2e;
  --ice: #dfe9f2;
  --font-display: 'Russo One', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --font-body: 'Arial Narrow', 'Helvetica Neue Condensed', 'Roboto Condensed', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #141a24; }
body { font-family: var(--font-body); color: var(--ice); -webkit-user-select: none; user-select: none; }
.hidden { display: none !important; }

#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#mood-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(10, 14, 22, .42) 100%);
}

/* ============================= HUD ============================= */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.plate {
  background: var(--steel-panel);
  border: 1px solid rgba(143, 163, 184, 0.35);
  border-left: 3px solid var(--pink);
  padding: 8px 12px;
  backdrop-filter: blur(2px);
}
.plate-label { font-family: var(--font-display); font-size: 10px; letter-spacing: 2px; color: var(--steel); }

#hud-tl { position: absolute; top: 14px; left: 14px; }
.bar { position: relative; width: 240px; height: 14px; background: #10151e; margin-top: 5px; border: 1px solid rgba(143,163,184,.4); overflow: hidden; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; transform-origin: left; }
.bar-fill.health { background: linear-gradient(90deg, #d7e6f4, #ffffff); width: 47%; }
.bar-fill.shield { background: linear-gradient(90deg, #4fb7ff, #9fdcff); left: 0; width: 53%; opacity: .9; }
#ally-pips { margin-top: 6px; display: flex; gap: 6px; }
.ally-pip { width: 64px; }
.ally-pip .ap-name { font-size: 9px; letter-spacing: 1px; color: var(--steel); font-family: var(--font-display); }
.ally-pip .ap-bar { height: 5px; background: #10151e; border: 1px solid rgba(143,163,184,.35); }
.ally-pip .ap-fill { height: 100%; background: #7dd8a0; transform-origin: left; }
.ally-pip.dead .ap-fill { background: #66222e; }
.ally-pip.bubbled .ap-name { color: var(--pink-hot); }

#hud-tc { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); }
#wave-plate { display: flex; gap: 14px; align-items: baseline; font-family: var(--font-display); }
#wave-label { font-size: 15px; letter-spacing: 3px; color: var(--ice); }
#enemies-left { font-size: 13px; color: var(--orange); }
#enemies-left::before { content: 'HOSTILES '; font-size: 9px; color: var(--steel); letter-spacing: 1px; }

#hud-tr { position: absolute; top: 14px; right: 14px; text-align: right; }
.score-plate { border-left: 1px solid rgba(143,163,184,.35); border-right: 3px solid var(--orange); }
#score { font-family: var(--font-display); font-size: 26px; color: var(--ice); line-height: 1; }
#score-feed { margin-top: 4px; font-size: 11px; color: var(--pink-hot); min-height: 16px; font-family: var(--font-display); letter-spacing: 1px; }

#hud-br { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: flex-end; gap: 10px; }
#charge-plate { text-align: center; padding: 6px 10px 8px; }
#charge-ring .ring-bg { fill: none; stroke: #10151e; stroke-width: 7; }
#charge-ring .ring-fg {
  fill: none; stroke: var(--pink); stroke-width: 7; stroke-linecap: butt;
  stroke-dasharray: 213.6; stroke-dashoffset: 213.6;
  transform: rotate(-90deg); transform-origin: center;
  filter: drop-shadow(0 0 4px rgba(255, 95, 168, .8));
}
#charge-num { font-family: var(--font-display); font-size: 22px; fill: var(--ice); }
#charge-plate.full #charge-num { fill: var(--pink-hot); }
#charge-plate.full { animation: gravPulse 1s infinite; }
@keyframes gravPulse { 50% { box-shadow: 0 0 22px rgba(255,95,168,.55); } }

#abilities { display: flex; flex-direction: column; gap: 6px; }
.ab {
  position: relative; width: 118px; padding: 5px 8px; background: var(--steel-panel);
  border: 1px solid rgba(143,163,184,.35); display: flex; gap: 8px; align-items: baseline; overflow: hidden;
}
.ab-key { font-family: var(--font-display); font-size: 11px; color: var(--orange); }
.ab-name { font-family: var(--font-display); font-size: 10px; letter-spacing: 1px; color: var(--ice); }
.ab-cd { position: absolute; inset: 0; background: rgba(10, 13, 19, .78); transform: scaleY(0); transform-origin: bottom; }
.ab.ready { border-color: rgba(255, 95, 168, .6); }
#ab-grav.ready { border-color: var(--pink); box-shadow: 0 0 14px rgba(255, 95, 168, .5); }
#ab-grav.ready .ab-name { color: var(--pink-hot); }

#crosshair { position: fixed; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; z-index: 21; }
.ch-ring { position: absolute; inset: 0; border: 1.5px solid rgba(255, 95, 168, .9); border-radius: 50%; }
.ch-dot { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: var(--pink-hot); border-radius: 50%; }

#banner { position: absolute; top: 22%; left: 0; right: 0; text-align: center; pointer-events: none; }
#banner-main {
  font-family: var(--font-display); font-size: 42px; letter-spacing: 8px; color: var(--ice);
  text-shadow: 0 0 24px rgba(255, 95, 168, .6), 0 2px 0 #000;
}
#banner-sub { font-family: var(--font-display); font-size: 15px; letter-spacing: 4px; color: var(--pink-hot); margin-top: 6px; }
#banner.show { animation: bannerIn 2.6s ease forwards; }
@keyframes bannerIn {
  0% { opacity: 0; transform: scale(1.15); }
  12% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

#hit-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(255, 40, 60, .45) 100%); transition: opacity .12s; }
#grav-vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(160, 60, 255, .35) 100%); transition: opacity .4s; }

/* ============================= TOUCH ============================= */
/* touch controls exist only in the run — never over the title screen */
#touch-ui { position: fixed; inset: 0; z-index: 25; pointer-events: none; display: none; }
body.playing #touch-ui:not(.hidden) { display: block; }
#stick-zone { position: absolute; left: 0; bottom: 0; width: 45%; height: 60%; pointer-events: auto; }
#stick-base {
  position: absolute; left: 60px; bottom: 90px; width: 110px; height: 110px; border-radius: 50%;
  border: 2px solid rgba(143,163,184,.5); background: rgba(20,26,36,.4);
}
#stick-nub {
  position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px;
  border-radius: 50%; background: rgba(255,95,168,.55); border: 2px solid var(--pink);
}
#touch-buttons { position: absolute; right: 12px; bottom: 86px; display: grid; grid-template-columns: repeat(2, 64px); gap: 10px; pointer-events: auto; }
.tbtn {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(143,163,184,.6);
  background: rgba(20,26,36,.72); color: var(--ice); font-family: var(--font-display); font-size: 11px;
  pointer-events: auto; touch-action: none;
}
.tbtn:active { background: rgba(255,95,168,.5); }
.tbtn-big { width: 84px; height: 84px; font-size: 14px; border-color: var(--pink); color: var(--pink-hot); }
#tb-grav.ready { border-color: var(--pink); box-shadow: 0 0 16px rgba(255,95,168,.7); color: var(--pink-hot); }

/* ============================= TITLE ============================= */
#title-screen {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: flex-start;
  background: linear-gradient(100deg, rgba(12, 16, 23, .92) 0%, rgba(12, 16, 23, .72) 42%, rgba(12, 16, 23, .12) 75%, rgba(12, 16, 23, 0) 100%);
}
.title-steel { position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(143,163,184,.05) 118px 120px),
    linear-gradient(0deg, rgba(255,140,46,.06), transparent 30%);
}
.title-inner { position: relative; padding: 0 6vw; max-width: 640px; }
.title-eyebrow { font-family: var(--font-display); font-size: 12px; letter-spacing: 4px; color: var(--orange); margin-bottom: 10px; }
.title-name {
  font-family: var(--font-display); font-size: clamp(64px, 13vw, 128px); line-height: .9; color: var(--ice);
  text-shadow: 0 0 34px rgba(255, 95, 168, .35), 0 4px 0 #0a0d13;
  letter-spacing: 4px;
}
.title-cyr { display: block; font-size: .28em; letter-spacing: 18px; color: var(--pink); margin-top: 8px; }
.title-sub { font-family: var(--font-display); font-size: 13px; letter-spacing: 3px; color: var(--steel); margin-top: 14px; }
.title-quote { font-family: var(--font-display); font-size: 15px; color: var(--pink-hot); margin-top: 18px; letter-spacing: 1px; }
#deploy-btn {
  margin-top: 26px; font-family: var(--font-display); font-size: 22px; letter-spacing: 4px;
  padding: 14px 44px; color: #0d1118; background: linear-gradient(180deg, var(--pink-hot), var(--pink));
  border: none; cursor: pointer; box-shadow: 0 0 26px rgba(255,95,168,.45), 0 4px 0 #7c2450;
  transition: transform .08s, box-shadow .2s;
}
#deploy-btn:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(255,95,168,.7), 0 6px 0 #7c2450; }
#deploy-btn:active { transform: translateY(2px); box-shadow: 0 0 18px rgba(255,95,168,.4), 0 2px 0 #7c2450; }
.title-controls { margin-top: 26px; font-size: 14px; line-height: 1.75; color: var(--steel); letter-spacing: .5px; }
.title-controls b { color: var(--ice); font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; }
.title-tip { margin-top: 10px; color: var(--orange); font-family: var(--font-display); font-size: 11px; letter-spacing: 2px; }

/* ============================= END / PAUSE ============================= */
#end-screen {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 13, 19, .78); backdrop-filter: blur(3px);
}
.end-inner { text-align: center; padding: 30px; }
#end-title { font-family: var(--font-display); font-size: clamp(40px, 8vw, 84px); letter-spacing: 8px; color: var(--ice); text-shadow: 0 0 30px rgba(255,95,168,.4); }
#end-title.defeat { color: #b8c2cf; text-shadow: 0 0 24px rgba(80,100,130,.5); }
#end-quote { font-family: var(--font-display); font-size: 15px; letter-spacing: 3px; color: var(--pink-hot); margin-top: 12px; }
#end-stats { margin: 26px auto 0; display: inline-block; text-align: left; font-size: 16px; line-height: 2; color: var(--steel); letter-spacing: 1px; }
#end-stats b { color: var(--ice); font-family: var(--font-display); font-size: 14px; }
#end-stats .es-total { border-top: 1px solid rgba(143,163,184,.4); margin-top: 8px; padding-top: 8px; font-size: 20px; color: var(--pink-hot); font-family: var(--font-display); letter-spacing: 2px; }
#restart-btn {
  margin-top: 30px; font-family: var(--font-display); font-size: 18px; letter-spacing: 3px;
  padding: 12px 36px; color: var(--ice); background: transparent; border: 2px solid var(--pink); cursor: pointer;
}
#restart-btn:hover { background: rgba(255,95,168,.18); }
.key-hint { color: var(--steel); font-size: 13px; }
#pause-screen { position: fixed; inset: 0; z-index: 39; display: flex; align-items: center; justify-content: center; background: rgba(10,13,19,.6); }
.pause-inner { font-family: var(--font-display); font-size: 40px; letter-spacing: 10px; color: var(--ice); text-align: center; }
.pause-inner span { display: block; font-size: 13px; letter-spacing: 3px; color: var(--steel); margin-top: 8px; }
#mute-ind { position: fixed; bottom: 14px; left: 14px; z-index: 30; font-family: var(--font-display); font-size: 11px; letter-spacing: 2px; color: var(--orange); background: var(--steel-panel); padding: 5px 10px; border: 1px solid rgba(255,140,46,.4); }

@media (max-width: 700px) {
  .plate { padding: 5px 8px; }
  .plate-label { font-size: 8px; letter-spacing: 1.5px; }
  .bar { width: 118px; height: 11px; }
  #ally-pips { gap: 4px; }
  .ally-pip { width: 48px; }
  #hud-tl { top: 6px; left: 6px; }
  #hud-tl .plate-label { max-width: 118px; overflow: hidden; white-space: nowrap; }
  /* wave plate drops below the corner plates so nothing collides */
  #hud-tc { top: 68px; }
  #wave-plate { gap: 8px; }
  #wave-label { font-size: 12px; letter-spacing: 2px; }
  #enemies-left { font-size: 11px; }
  #hud-tr { top: 6px; right: 6px; }
  #score { font-size: 17px; }
  #score-feed { font-size: 9px; }
  /* charge plate + abilities ride above the touch buttons, clear of the joystick */
  #hud-br { right: 10px; bottom: 336px; transform: scale(.72); transform-origin: bottom right; }
  #banner { top: 30%; }
  #banner-main { font-size: 26px; letter-spacing: 4px; }
  #banner-sub { font-size: 12px; }
  #mute-ind { bottom: auto; top: 64px; left: 6px; }
  .title-inner { padding: 0 7vw; }
  .title-eyebrow { font-size: 10px; letter-spacing: 3px; }
  .title-sub { font-size: 11px; }
  .title-quote { font-size: 13px; margin-top: 12px; }
  #deploy-btn { margin-top: 18px; font-size: 18px; padding: 12px 34px; }
  .title-controls { margin-top: 18px; font-size: 11.5px; line-height: 1.7; }
  .title-tip { font-size: 10px; }
}
