/* =========================================================
   ШАЙБА — G5T ICE ARENA
   ========================================================= */

@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/russo-one-cyr.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("../assets/fonts/russo-one-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #04090f;
  --bg-2: #071019;
  --ink: #eef8fc;
  --muted: #8ba4b1;
  --muted-2: #5c7481;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blue: #2ee6ff;
  --blue-deep: #0a88a3;
  --orange: #ff6b3d;
  --orange-deep: #a52f10;
  --gold: #ffd166;
  --panel: rgba(7, 17, 25, 0.82);
  --font-display: "Russo One", "Arial Black", system-ui, sans-serif;
  --font-ui: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 50% 40%, #0a1a24 0%, #04090f 65%, #02060a 100%);
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

svg {
  display: block;
}

kbd {
  display: inline-block;
  padding: 0.14em 0.45em;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--font-display);
  font-size: 0.82em;
  line-height: 1.35;
  color: #d8eaf2;
  white-space: nowrap;
}

.is-hidden {
  display: none !important;
}

/* =========================================================
   CANVAS + SCREEN FX
   ========================================================= */

#app {
  position: fixed;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.screen-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.screen-fx--vignette {
  background:
    radial-gradient(120% 90% at 50% 48%, transparent 42%, rgba(0, 0, 0, 0.28) 78%, rgba(0, 0, 0, 0.62) 100%);
}

.screen-fx--grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* =========================================================
   SHARED UI
   ========================================================= */

.panel-glass {
  position: relative;
  background: linear-gradient(158deg, rgba(13, 27, 38, 0.88), rgba(4, 12, 19, 0.93));
  border: 1px solid var(--line);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

.panel-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 30%, transparent 72%, rgba(46, 230, 255, 0.03));
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #b9cfd9;
  border: 1px solid var(--line);
  background: rgba(6, 15, 22, 0.55);
  backdrop-filter: blur(10px);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(46, 230, 255, 0.35);
  background: rgba(46, 230, 255, 0.08);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0) scale(0.97);
}

.icon-btn--dark {
  background: rgba(5, 13, 20, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
}

.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico--sound-on path:first-child,
.ico--sound-off path:first-child {
  fill: currentColor;
  stroke: none;
}

.ico--sound-off {
  display: none;
}

.is-muted .ico--sound-on {
  display: none;
}
.is-muted .ico--sound-off {
  display: block;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(46, 230, 255, 0.55);
  animation: livePulse 2s infinite;
  vertical-align: middle;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 230, 255, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(46, 230, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 255, 0); }
}

.play-btn {
  position: relative;
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  background: linear-gradient(112deg, #8bf5ff 0%, #2ee6ff 46%, #14b9d6 100%);
  color: #021016;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 36px rgba(46, 230, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s, filter 0.22s;
}

.play-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -30%;
  width: 24%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transition: left 0.55s var(--ease-out);
}

.play-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 0 48px rgba(46, 230, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.play-btn:hover::before {
  left: 112%;
}

.play-btn:active {
  transform: translateY(0) scale(0.99);
}

.play-btn__label {
  position: relative;
  z-index: 1;
}

.play-btn__arrow {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease-out);
}

.play-btn:hover .play-btn__arrow {
  transform: translateX(4px);
}

.btn-ghost {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #c3d6df;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.055);
}

.text-btn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a9c0cb;
  transition: color 0.2s;
}

.text-btn:hover {
  color: var(--blue);
}

/* =========================================================
   MENU
   ========================================================= */

.menu {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(18px, 3.4vw, 48px) clamp(18px, 4vw, 64px) clamp(18px, 3vw, 40px);
  overflow: hidden;
}

.menu.is-leaving {
  animation: menuLeave 0.38s var(--ease-out) forwards;
  pointer-events: none;
}

@keyframes menuLeave {
  to { opacity: 0; transform: scale(1.015); visibility: hidden; }
}

.menu__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1450px 950px at 68% 44%, rgba(3, 8, 13, 0) 0%, rgba(3, 8, 13, 0.16) 48%, rgba(3, 8, 13, 0.84) 100%),
    linear-gradient(90deg, rgba(3, 8, 13, 0.95) 0%, rgba(3, 8, 13, 0.76) 33%, rgba(3, 8, 13, 0.16) 64%, rgba(3, 8, 13, 0.4) 100%);
}

.menu__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: riseIn 0.7s var(--ease-out) both;
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c3d7df;
}

.mini-brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(46, 230, 255, 0.38);
  background: linear-gradient(150deg, rgba(46, 230, 255, 0.15), rgba(46, 230, 255, 0.02));
  color: var(--blue);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: 0 0 20px rgba(46, 230, 255, 0.12);
}

.mini-brand__text {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: #8fa8b3;
}

.menu__top-actions {
  display: flex;
  gap: 10px;
}

.menu__main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 4vw, 66px);
  width: 100%;
  margin: auto 0;
  padding: 2vh 0 1vh;
}

.hero {
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 6px;
  animation: riseIn 0.85s 0.06s var(--ease-out) both;
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 clamp(12px, 1.8vw, 22px);
  font-family: var(--font-display);
  font-size: clamp(9px, 0.78vw, 11px);
  letter-spacing: 0.24em;
  color: #8ca4af;
  text-transform: uppercase;
}

.hero__logo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(68px, 9.4vw, 148px);
  line-height: 0.84;
  letter-spacing: 0.005em;
  color: #f4fbff;
  text-transform: uppercase;
  text-shadow:
    0 0 80px rgba(46, 230, 255, 0.16),
    0 16px 44px rgba(0, 0, 0, 0.55);
}

.hero__logo-dot {
  color: var(--blue);
  text-shadow: 0 0 32px rgba(46, 230, 255, 0.6);
}

.hero__tagline {
  margin: clamp(14px, 1.8vw, 24px) 0 0;
  font-size: clamp(13px, 1.2vw, 17px);
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #a8bdc7;
  text-transform: uppercase;
}

.menu__panel {
  flex: 0 0 auto;
  width: clamp(330px, 30vw, 410px);
  padding: 22px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: riseIn 0.85s 0.15s var(--ease-out) both;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field__label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #7e96a2;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.28);
}

.segmented--three {
  grid-template-columns: repeat(3, 1fr);
}

.segmented button {
  min-height: 38px;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #8aa2ae;
  text-transform: uppercase;
  transition: color 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.segmented button:hover {
  color: #e7f5fa;
  background: rgba(255, 255, 255, 0.04);
}

.segmented button.is-active {
  color: #eaffff;
  border-color: rgba(46, 230, 255, 0.32);
  background: linear-gradient(180deg, rgba(46, 230, 255, 0.19), rgba(46, 230, 255, 0.06));
  box-shadow: 0 0 20px rgba(46, 230, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.menu__links {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 2px;
}

.menu__sep {
  width: 1px;
  height: 12px;
  background: var(--line-strong);
}

.menu__hint {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #67808c;
  white-space: nowrap;
}

.menu__hint kbd {
  font-size: 9px;
  padding: 0.1em 0.34em;
}

.menu__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.19em;
  color: #5d747f;
  text-transform: uppercase;
  animation: riseIn 0.9s 0.24s var(--ease-out) both;
}

.menu__domain {
  margin-left: auto;
  color: #78909c;
}

.menu__live-badge {
  position: absolute;
  z-index: 2;
  right: clamp(18px, 4vw, 64px);
  bottom: clamp(58px, 8vh, 88px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(4, 12, 19, 0.62);
  backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.17em;
  color: #8fa7b2;
  animation: riseIn 1s 0.3s var(--ease-out) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HUD
   ========================================================= */

.hud {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  padding: var(--safe-top) clamp(14px, 2vw, 28px) var(--safe-bottom);
}

.hud__top {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.scoreboard {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(4, 12, 19, 0.76);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.scoreboard__team {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
}

.scoreboard__tag {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #7f98a4;
  text-transform: uppercase;
}

.scoreboard__team--blue .scoreboard__tag {
  color: rgba(46, 230, 255, 0.8);
}

.scoreboard__team--orange .scoreboard__tag {
  color: rgba(255, 107, 61, 0.85);
}

.scoreboard__score {
  min-width: 24px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: #f2fbff;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
  transition: transform 0.2s var(--ease-out), color 0.2s;
}

.scoreboard__score.is-pop {
  animation: scorePop 0.55s var(--ease-out);
}

.scoreboard__team--blue .scoreboard__score.is-pop {
  color: var(--blue);
}

.scoreboard__team--orange .scoreboard__score.is-pop {
  color: var(--orange);
}

@keyframes scorePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.65); filter: brightness(1.5); }
  100% { transform: scale(1); }
}

.scoreboard__clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  padding: 7px 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.028);
}

.scoreboard__time {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.scoreboard__clock.is-overtime .scoreboard__time {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 209, 102, 0.35);
}

.scoreboard__label {
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.17em;
  color: #718a95;
  text-transform: uppercase;
  white-space: nowrap;
}

.scoreboard__clock.is-overtime .scoreboard__label {
  color: var(--gold);
}

.hud__actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hud__badge {
  position: absolute;
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 12, 19, 0.48);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: #75909b;
  text-transform: uppercase;
  white-space: nowrap;
}

.hud__bottom {
  position: absolute;
  left: clamp(14px, 2vw, 28px);
  right: clamp(14px, 2vw, 28px);
  bottom: var(--safe-bottom);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.stamina {
  width: 216px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 12, 19, 0.55);
  backdrop-filter: blur(12px);
  transition: opacity 0.25s, border-color 0.25s;
}

.stamina__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: #7e97a2;
}

.stamina__head kbd {
  font-size: 7px;
  opacity: 0.75;
}

.stamina__bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stamina__bar i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, #18b9d4, #6ff1ff 65%, #e8feff);
  box-shadow: 0 0 12px rgba(46, 230, 255, 0.4);
  transition: transform 0.09s linear, background 0.25s;
}

.stamina.is-low .stamina__bar i {
  background: linear-gradient(90deg, #b64422, #ff8a5c 70%, #ffd2b8);
  box-shadow: 0 0 12px rgba(255, 107, 61, 0.4);
}

.stamina.is-low {
  border-color: rgba(255, 107, 61, 0.2);
}

.controls-hint {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 12, 19, 0.52);
  backdrop-filter: blur(10px);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #8ea6b1;
  transition: opacity 0.7s;
  white-space: nowrap;
}

.controls-hint kbd {
  font-size: 8px;
  padding: 0.12em 0.36em;
}

.controls-hint span {
  opacity: 0.35;
  padding: 0 2px;
}

.controls-hint.is-faded {
  opacity: 0;
}

/* =========================================================
   COUNTDOWN
   ========================================================= */

.countdown {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  background: radial-gradient(520px 360px at 50% 50%, rgba(3, 9, 14, 0.45), transparent 70%);
}

.countdown__label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.48em;
  color: #b8d1dc;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
  animation: cdLabel 0.5s var(--ease-out) both;
}

@keyframes cdLabel {
  from { opacity: 0; letter-spacing: 0.7em; }
  to { opacity: 1; letter-spacing: 0.48em; }
}

.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(96px, 14vw, 180px);
  line-height: 0.9;
  color: #fff;
  text-shadow:
    0 0 60px rgba(46, 230, 255, 0.35),
    0 10px 44px rgba(0, 0, 0, 0.65);
}

.countdown__num.is-anim {
  animation: cdPop 0.58s var(--ease-out) both;
}

@keyframes cdPop {
  0% { opacity: 0; transform: scale(2.1); filter: blur(10px); }
  28% { opacity: 1; filter: blur(0); }
  100% { opacity: 0.92; transform: scale(1); }
}

.countdown.is-go .countdown__num {
  font-size: clamp(62px, 8vw, 110px);
  color: var(--blue);
  animation: cdGo 0.7s var(--ease-out) both;
}

@keyframes cdGo {
  0% { opacity: 0; transform: scale(1.5); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.96); }
}

/* =========================================================
   GOAL BANNER
   ========================================================= */

.goal-banner {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  --goal-color: #2ee6ff;
  --goal-deep: #0a6578;
}

.goal-banner__band {
  position: absolute;
  left: -5%;
  right: -5%;
  top: 50%;
  height: clamp(180px, 28vh, 280px);
  transform: translateY(-50%) skewY(-4deg);
  background:
    linear-gradient(90deg, rgba(3, 8, 13, 0.94), var(--goal-deep) 22%, var(--goal-color) 50%, var(--goal-deep) 78%, rgba(3, 8, 13, 0.94)),
    repeating-linear-gradient(115deg, transparent 0 42px, rgba(255, 255, 255, 0.08) 42px 44px);
  background-blend-mode: normal, overlay;
  box-shadow: 0 0 90px color-mix(in srgb, var(--goal-color) 30%, transparent);
  opacity: 0.97;
}

.goal-banner.is-visible .goal-banner__band {
  animation: goalBand 0.58s var(--ease-out) both;
}

@keyframes goalBand {
  from { transform: translate(-108%, -50%) skewY(-4deg); }
  to { transform: translate(0, -50%) skewY(-4deg); }
}

.goal-banner__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  transform: translateY(-2px);
}

.goal-banner__title {
  font-family: var(--font-display);
  font-size: clamp(78px, 12vw, 168px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.12),
    0 18px 60px rgba(0, 0, 0, 0.45);
  transform: skewX(-6deg);
}

.goal-banner.is-visible .goal-banner__title {
  animation: goalTitle 0.62s 0.06s var(--ease-out) both;
}

@keyframes goalTitle {
  0% { opacity: 0; transform: skewX(-6deg) scale(1.7); filter: blur(10px); }
  35% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: skewX(-6deg) scale(1); }
}

.goal-banner__sub {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(12px, 1.3vw, 18px);
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.goal-banner.is-visible .goal-banner__sub {
  animation: riseIn 0.5s 0.22s var(--ease-out) both;
}

/* =========================================================
   OVERLAYS
   ========================================================= */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(2, 7, 11, 0.6);
  backdrop-filter: blur(12px) saturate(0.9);
  -webkit-backdrop-filter: blur(12px) saturate(0.9);
  animation: overlayIn 0.25s ease both;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay__card {
  width: min(420px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 30px 28px 26px;
  border-radius: 22px;
  text-align: center;
  animation: cardIn 0.42s var(--ease-out) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.overlay__kicker {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: #78929e;
  text-transform: uppercase;
}

.overlay__card h2 {
  margin: 8px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: #f2fbff;
  text-transform: uppercase;
}

.pause-score,
.end-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 58px;
  line-height: 1;
}

.pause-score i,
.end-score i {
  font-style: normal;
  font-size: 30px;
  color: #4c626c;
  transform: translateY(-2px);
}

.pause-score__blue,
.end-score__blue {
  color: var(--blue);
  text-shadow: 0 0 34px rgba(46, 230, 255, 0.26);
}

.pause-score__orange,
.end-score__orange {
  color: var(--orange);
  text-shadow: 0 0 34px rgba(255, 107, 61, 0.24);
}

.pause-card .play-btn {
  margin-bottom: 10px;
}

.pause-card .btn-ghost {
  margin-bottom: 8px;
}

.pause-card__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pause-card__foot .text-btn {
  font-size: 10px;
  color: #7e97a2;
}

.pause-card__foot .text-btn:hover {
  color: var(--blue);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: #89a2ae;
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.how-card {
  width: min(620px, 100%);
  text-align: left;
}

.how-card h2 {
  margin-bottom: 20px;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.how-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.how-item kbd {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.how-item p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9db4be;
}

.how-item p kbd {
  font-size: 8px;
}

.how-note {
  margin: 16px 0 20px;
  font-size: 12px;
  line-height: 1.55;
  color: #8ba3ae;
}

.how-card .play-btn {
  min-height: 52px;
  font-size: 14px;
}

.end-card h2 {
  margin-bottom: 6px;
}

.end-card h2.is-loss {
  color: var(--orange);
  text-shadow: 0 0 40px rgba(255, 107, 61, 0.25);
}

.end-card h2.is-win {
  color: #f4fbff;
  text-shadow: 0 0 40px rgba(46, 230, 255, 0.3);
}

.end-score {
  margin: 16px 0 22px;
}

.end-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.end-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.end-stats b {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: #f0faff;
}

.end-stats span {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #748d99;
  text-transform: uppercase;
}

.end-card .play-btn {
  margin-bottom: 10px;
}

/* =========================================================
   TOUCH
   ========================================================= */

.touch-controls {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.joystick {
  position: absolute;
  left: max(22px, env(safe-area-inset-left));
  bottom: max(22px, env(safe-area-inset-bottom));
  width: 138px;
  height: 138px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.07), rgba(4, 12, 19, 0.5) 62%, rgba(4, 12, 19, 0.18));
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.28);
}

.joystick__ring {
  position: absolute;
  inset: 21px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.joystick__stick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  border: 1px solid rgba(46, 230, 255, 0.4);
  background: radial-gradient(circle at 38% 30%, rgba(150, 248, 255, 0.34), rgba(11, 89, 105, 0.66));
  box-shadow: 0 0 22px rgba(46, 230, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  will-change: transform;
}

.touch-actions {
  position: absolute;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}

.touch-btn {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: #dff8ff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(8px);
  transition: transform 0.1s, background 0.1s;
}

.touch-btn:active,
.touch-btn.is-pressed {
  transform: scale(0.93);
}

.touch-btn--kick {
  width: 96px;
  height: 96px;
  font-size: 11px;
  background: radial-gradient(circle at 38% 30%, rgba(255, 145, 106, 0.75), rgba(158, 46, 17, 0.68));
  border-color: rgba(255, 155, 118, 0.4);
  box-shadow: 0 0 30px rgba(255, 107, 61, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.touch-btn--sprint {
  width: 64px;
  height: 64px;
  font-size: 8px;
  color: #a9c5d0;
  background: rgba(6, 16, 24, 0.62);
}

/* =========================================================
   MISC
   ========================================================= */

.rotate-hint {
  position: absolute;
  top: calc(var(--safe-top) + 74px);
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 12, 19, 0.82);
  backdrop-filter: blur(12px);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #a5bdc8;
  white-space: nowrap;
  animation: riseIn 0.4s var(--ease-out) both;
}

.rotate-hint__icon {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 15px;
}

.rotate-hint button {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #78909c;
  font-size: 14px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 66px);
  z-index: 19;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, 0.22);
  background: rgba(4, 12, 19, 0.84);
  backdrop-filter: blur(12px);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  white-space: nowrap;
  animation: toastIn 0.3s var(--ease-out) both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.noscript {
  position: absolute;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1150px) {
  .menu__main {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 22px;
    width: min(560px, 100%);
    margin: auto 0;
  }

  .hero__logo {
    font-size: clamp(60px, 12vw, 104px);
  }

  .menu__panel {
    width: min(430px, 100%);
  }

  .menu__live-badge {
    display: none;
  }

  .menu__shade {
    background:
      radial-gradient(1000px 700px at 60% 40%, rgba(3, 8, 13, 0.1), rgba(3, 8, 13, 0.9) 100%),
      linear-gradient(90deg, rgba(3, 8, 13, 0.94), rgba(3, 8, 13, 0.7) 55%, rgba(3, 8, 13, 0.5));
  }
}

@media (max-width: 700px) {
  .menu {
    padding: 16px 16px 14px;
    overflow-y: auto;
  }

  .menu__main {
    margin: auto 0;
    padding: 6vh 0 2vh;
  }

  .hero__logo {
    font-size: clamp(56px, 18vw, 88px);
  }

  .hero__tagline {
    font-size: 11px;
    margin-top: 12px;
  }

  .hero__kicker {
    margin-bottom: 12px;
    font-size: 8px;
    letter-spacing: 0.16em;
  }

  .menu__panel {
    padding: 16px;
    gap: 14px;
    border-radius: 16px;
  }

  .segmented button {
    min-height: 36px;
    font-size: 10px;
  }

  .play-btn {
    min-height: 56px;
    font-size: 16px;
  }

  .menu__hint {
    display: none;
  }

  .menu__bottom {
    display: none;
  }

  .mini-brand__text {
    display: none;
  }

  .scoreboard__tag {
    display: none;
  }

  .scoreboard__team {
    padding: 8px 12px;
  }

  .scoreboard__score {
    font-size: 24px;
  }

  .scoreboard__clock {
    min-width: 84px;
    padding: 7px 10px;
  }

  .scoreboard__time {
    font-size: 20px;
  }

  .hud__actions {
    gap: 6px;
  }

  .hud__actions .icon-btn {
    width: 38px;
    height: 38px;
  }

  .hud__badge {
    display: none;
  }

  .stamina {
    width: 150px;
    padding: 8px 10px;
  }

  .controls-hint {
    display: none;
  }

  .overlay__card {
    padding: 24px 18px 20px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-card {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  .goal-banner__band {
    height: 30vh;
  }

  .toast {
    bottom: calc(var(--safe-bottom) + 150px);
    max-width: calc(100vw - 40px);
    white-space: normal;
    text-align: center;
  }
}

@media (max-height: 650px) and (min-width: 701px) {
  .menu__main {
    padding: 0;
  }

  .hero__logo {
    font-size: clamp(52px, 8vw, 86px);
  }

  .hero__tagline {
    margin-top: 10px;
    font-size: 11px;
  }

  .hero__kicker {
    margin-bottom: 9px;
  }

  .menu__panel {
    padding: 16px;
    gap: 12px;
  }

  .field {
    gap: 6px;
  }

  .segmented button {
    min-height: 33px;
  }

  .play-btn {
    min-height: 54px;
  }

  .menu__links {
    padding-top: 0;
  }
}

/* touch devices */
body.is-touch .controls-hint {
  display: none;
}

body.is-touch .stamina {
  position: absolute;
  left: 0;
  bottom: 150px;
  width: 168px;
}

body.is-touch .stamina__head kbd {
  display: none;
}

body.is-touch .hud__bottom {
  align-items: flex-start;
}

body.is-touch .hud__badge {
  display: none;
}

/* Телефон в альбомной ориентации: компактное меню и управление */
@media (max-height: 560px) and (orientation: landscape) {
  .menu {
    padding: 10px 16px;
    overflow-y: auto;
  }

  .menu__main {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    gap: clamp(16px, 3vw, 30px);
    margin: auto 0;
    padding: 0;
  }

  .hero {
    flex: 1 1 auto;
    padding: 0;
  }

  .hero__kicker {
    display: none;
  }

  .hero__logo {
    font-size: clamp(40px, 8vw, 72px);
  }

  .hero__tagline {
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.11em;
  }

  .menu__panel {
    width: min(360px, 46vw);
    padding: 12px;
    gap: 9px;
    border-radius: 14px;
  }

  .field {
    gap: 5px;
  }

  .field__label {
    font-size: 8px;
  }

  .segmented {
    padding: 3px;
  }

  .segmented button {
    min-height: 30px;
    font-size: 9px;
  }

  .play-btn {
    min-height: 46px;
    font-size: 13px;
  }

  .menu__links {
    padding-top: 0;
  }

  .menu__links .text-btn {
    font-size: 10px;
  }

  .menu__hint,
  .menu__bottom,
  .menu__live-badge {
    display: none;
  }

  .menu__top .mini-brand__mark {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .menu__top .icon-btn {
    width: 36px;
    height: 36px;
  }

  /* HUD */
  .scoreboard__team {
    padding: 6px 11px;
    gap: 8px;
  }

  .scoreboard__score {
    font-size: 22px;
  }

  .scoreboard__clock {
    min-width: 82px;
    padding: 5px 9px;
  }

  .scoreboard__time {
    font-size: 19px;
  }

  .scoreboard__label {
    font-size: 7px;
  }

  .scoreboard__tag {
    font-size: 8px;
  }

  .hud__actions .icon-btn {
    width: 36px;
    height: 36px;
  }

  .hud__badge {
    top: 68px;
  }

  /* Touch */
  .joystick {
    width: 108px;
    height: 108px;
    left: 14px;
    bottom: 14px;
  }

  .joystick__ring {
    inset: 17px;
  }

  .joystick__stick {
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
  }

  .touch-actions {
    right: 14px;
    bottom: 16px;
    gap: 9px;
  }

  .touch-btn--kick {
    width: 78px;
    height: 78px;
    font-size: 9px;
  }

  .touch-btn--sprint {
    width: 52px;
    height: 52px;
    font-size: 7px;
  }

  body.is-touch .stamina {
    bottom: 124px;
    width: 142px;
    padding: 6px 9px;
  }

  .stamina__head {
    margin-bottom: 4px;
    font-size: 7px;
  }

  .stamina__bar {
    height: 5px;
  }

  .toast {
    bottom: 108px;
    font-size: 9px;
    padding: 8px 14px;
  }

  .countdown__num {
    font-size: clamp(80px, 16vw, 140px);
  }

  .goal-banner__title {
    font-size: clamp(64px, 14vw, 120px);
  }

  /* Оверлеи */
  .overlay {
    padding: 10px;
  }

  .overlay__card {
    padding: 18px 20px 14px;
    max-height: calc(100dvh - 20px);
  }

  .overlay__card h2 {
    margin: 5px 0 12px;
    font-size: 30px;
  }

  .pause-score,
  .end-score {
    gap: 12px;
    margin-bottom: 14px;
    font-size: 42px;
  }

  .pause-score i,
  .end-score i {
    font-size: 22px;
  }

  .end-stats {
    gap: 6px;
    margin-bottom: 14px;
  }

  .end-stats > div {
    padding: 8px 4px;
  }

  .end-stats b {
    font-size: 20px;
  }

  .end-stats span {
    font-size: 7px;
  }

  .btn-ghost {
    min-height: 38px;
    font-size: 10px;
  }

  .pause-card .btn-ghost {
    margin-bottom: 6px;
  }

  .pause-card__foot {
    margin-top: 10px;
    padding-top: 10px;
  }

  .how-card {
    width: min(610px, 100%);
  }

  .how-card h2 {
    margin-bottom: 12px;
  }

  .how-grid {
    gap: 7px;
  }

  .how-item {
    padding: 9px 11px;
  }

  .how-item p {
    margin-top: 5px;
    font-size: 11px;
  }

  .how-note {
    margin: 10px 0 12px;
    font-size: 10px;
  }
}

@media (max-width: 700px) {
  .rotate-hint {
    left: 12px;
    right: 12px;
    transform: none;
    justify-content: center;
    white-space: normal;
    text-align: left;
    border-radius: 14px;
  }
}

@media (pointer: coarse) {
  .mini-brand__text {
    display: none;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
