:root {
  color-scheme: dark;
  --panel: rgba(13, 18, 32, 0.86);
  --panel-line: rgba(255, 255, 255, 0.16);
  --text: #f7fbff;
  --muted: #aeb9c9;
  --accent: #ffcf5a;
  --accent-2: #4dd0ff;
  --danger: #ff6a5c;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 52% 48%, rgba(255, 161, 54, 0.22), transparent 22rem),
    radial-gradient(circle at 24% 36%, rgba(255, 51, 156, 0.18), transparent 24rem),
    radial-gradient(circle at 78% 52%, rgba(33, 143, 255, 0.2), transparent 28rem),
    linear-gradient(135deg, #02030b 0%, #13062f 48%, #03101e 100%);
}

.not-found-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.not-found-shell img {
  width: min(360px, 86vw);
}

.not-found-shell h1 {
  color: #f7fbff;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
  text-shadow: 0 0 18px rgba(77, 208, 255, 0.46);
}

.not-found-shell a {
  color: #ffcf5a;
  font-weight: 900;
  text-decoration: none;
}

.game-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
}

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(280px, 1fr) minmax(130px, 190px) 68px 68px;
  gap: clamp(12px, 2.3vw, 38px);
  align-items: start;
  justify-content: stretch;
  padding: 28px clamp(20px, 3.8vw, 44px) 0;
  pointer-events: none;
  z-index: 14;
}

h1,
p {
  margin: 0;
}

h1 {
  line-height: 0;
}

.hud-panel {
  --panel-shape: polygon(8% 0, 100% 0, 100% 32%, 78% 100%, 6% 100%, 0 78%, 0 18%);
  position: relative;
  isolation: isolate;
  min-height: 82px;
  display: grid;
  grid-template-columns: 54px auto;
  grid-template-rows: 1fr 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 14px 24px 14px 20px;
  color: #f7fbff;
  background: transparent;
  pointer-events: auto;
}

.hud-energy {
  --panel-shape: polygon(7% 0, 100% 0, 100% 18%, 88% 37%, 88% 82%, 80% 100%, 7% 100%, 0 86%, 0 14%);
  grid-column: 1;
  grid-row: 1;
  min-height: 164px;
  grid-template-columns: 58px auto;
  grid-template-rows: 34px 42px 2px 34px 36px;
  align-items: center;
  padding: 18px 28px 18px 22px;
}

.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  clip-path: var(--panel-shape);
  pointer-events: none;
}

.hud-panel::before {
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(39, 176, 255, 0.96), rgba(97, 224, 255, 0.56), rgba(39, 176, 255, 0.88));
  filter: drop-shadow(0 0 14px rgba(0, 177, 255, 0.24));
}

.hud-panel::after {
  z-index: -1;
  inset: 1.5px;
  background:
    radial-gradient(circle at 24% 18%, rgba(77, 208, 255, 0.18), transparent 6rem),
    linear-gradient(180deg, rgba(7, 16, 34, 0.9), rgba(3, 7, 18, 0.82));
}

.hud-panel > * {
  position: relative;
  z-index: 1;
}

.hud-score {
  --panel-shape: polygon(7% 0, 93% 0, 100% 30%, 100% 70%, 93% 100%, 7% 100%, 0 70%, 0 30%);
  grid-column: 2;
  grid-row: 1;
  width: min(430px, 100%);
  min-height: 112px;
  justify-self: center;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding-block: 13px 16px;
}

.hud-lives {
  --panel-shape: polygon(10% 0, 88% 0, 100% 18%, 100% 82%, 88% 100%, 10% 100%, 0 82%, 0 18%);
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: 40px auto;
  min-width: 150px;
  padding-inline: 18px;
}

.hud-label {
  align-self: end;
  color: #f8fbff;
  font-size: clamp(0.78rem, 1.2vw, 1rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.42);
}

.hud-panel strong {
  align-self: start;
  color: #ffe8a2;
  font-size: clamp(1.72rem, 2.7vw, 2.15rem);
  font-weight: 900;
  line-height: 1.05;
  text-shadow:
    0 0 10px rgba(255, 207, 90, 0.72),
    0 0 22px rgba(255, 110, 42, 0.28);
}

.hud-energy > strong {
  font-size: clamp(1.36rem, 2.2vw, 1.72rem);
}

.hud-score strong {
  color: #77e7ff;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  text-shadow:
    0 0 10px rgba(77, 208, 255, 0.78),
    0 0 22px rgba(77, 208, 255, 0.28);
}

.score-multiplier {
  display: inline-flex;
  gap: 14px;
  margin-top: 4px;
  color: #ffcf5a;
  font-size: clamp(0.68rem, 1.1vw, 0.88rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 207, 90, 0.42);
}

.score-multiplier b {
  color: #ffdf6f;
}

.hud-lives strong {
  color: #ff515f;
  text-shadow:
    0 0 10px rgba(255, 81, 95, 0.82),
    0 0 22px rgba(255, 40, 54, 0.36);
}

#status {
  display: none;
  margin-top: -2px;
  color: rgba(168, 233, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.energy-icon {
  grid-row: 1 / 3;
  width: 52px;
  height: 64px;
  align-self: center;
  justify-self: center;
  background: url("assets/hud/energy-icon.png") center / 132% auto no-repeat;
  filter:
    drop-shadow(0 0 9px rgba(255, 228, 93, 0.76))
    drop-shadow(0 0 18px rgba(255, 144, 26, 0.32));
}

.hud-divider {
  grid-column: 1 / 3;
  grid-row: 3;
  height: 2px;
  width: calc(100% - 10px);
  justify-self: center;
  background: linear-gradient(90deg, rgba(77, 208, 255, 0.08), rgba(77, 208, 255, 0.9), rgba(77, 208, 255, 0.08));
  box-shadow: 0 0 9px rgba(77, 208, 255, 0.58);
}

.collected-icon {
  grid-column: 1;
  grid-row: 4 / 6;
  width: 44px;
  height: 44px;
  align-self: center;
  justify-self: center;
  background: url("assets/hud/energy-orb.png") center / contain no-repeat;
  filter:
    drop-shadow(0 0 8px rgba(255, 207, 90, 0.8))
    drop-shadow(0 0 16px rgba(255, 132, 34, 0.36));
}

.hud-collected-label {
  grid-column: 2;
  grid-row: 4;
}

.hud-collected-value {
  grid-column: 2;
  grid-row: 5;
  color: #f7fbff;
  font-size: clamp(1.08rem, 1.72vw, 1.36rem);
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.46),
    0 0 18px rgba(77, 208, 255, 0.22);
}

.heart-icon {
  grid-row: 1 / 3;
  width: 46px;
  height: 46px;
  align-self: center;
  justify-self: center;
  background: url("assets/hud/lives-heart.png") center / 124% auto no-repeat;
  filter:
    drop-shadow(0 0 10px rgba(255, 74, 88, 0.78))
    drop-shadow(0 0 18px rgba(255, 42, 63, 0.34));
}

.menu-wrap {
  grid-column: 5;
  grid-row: 1;
  position: relative;
  z-index: 8;
  width: 68px;
  height: 68px;
  pointer-events: auto;
}

.menu-button {
  position: relative;
}

.menu-lines {
  position: relative;
  display: block;
  width: 30px;
  height: 22px;
  background: linear-gradient(#77e7ff, #77e7ff) center / 100% 5px no-repeat;
  filter: drop-shadow(0 0 10px rgba(77, 208, 255, 0.86));
}

.menu-lines::before,
.menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #77e7ff;
  box-shadow: 0 0 12px rgba(77, 208, 255, 0.85);
}

.menu-lines::before {
  top: 0;
}

.menu-lines::after {
  bottom: 0;
}

.menu-button[aria-expanded="true"] {
  border-color: #8cf1ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 34px rgba(77, 208, 255, 0.48);
}

.actions {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 14px);
  z-index: 9;
  width: 178px;
  display: grid;
  gap: 10px;
  pointer-events: auto;
  animation: menuReveal 150ms ease both;
}

.actions[hidden] {
  display: none;
}

@keyframes menuReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.actions button {
  --button-shape: polygon(8% 0, 100% 0, 100% 72%, 88% 100%, 0 100%, 0 20%);
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 10px 14px;
  background: transparent;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.38);
}

.actions button::before,
.actions button::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: var(--button-shape);
  pointer-events: none;
}

.actions button::before {
  z-index: -2;
  background: linear-gradient(90deg, rgba(39, 176, 255, 0.96), rgba(97, 224, 255, 0.46));
  filter: drop-shadow(0 0 12px rgba(0, 177, 255, 0.22));
}

.actions button::after {
  z-index: -1;
  inset: 1.5px;
  background:
    radial-gradient(circle at 20% 50%, rgba(77, 208, 255, 0.18), transparent 42px),
    linear-gradient(180deg, rgba(8, 18, 37, 0.94), rgba(3, 7, 18, 0.88));
}

.actions button:hover,
.actions button:focus-visible {
  background: transparent;
  transform: translateX(2px);
}

.actions button:hover::before,
.actions button:focus-visible::before {
  background: linear-gradient(90deg, rgba(119, 231, 255, 1), rgba(255, 207, 90, 0.72));
}

.menu-action-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 30px;
  filter: drop-shadow(0 0 8px rgba(77, 208, 255, 0.42));
}

.rocket-action-icon {
  transform: rotate(47deg) scale(1.18);
  filter:
    drop-shadow(0 0 8px rgba(77, 208, 255, 0.42))
    drop-shadow(0 0 12px rgba(255, 207, 90, 0.24));
}

.account-action-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  object-fit: cover;
  border: 1px solid rgba(119, 231, 255, 0.56);
  border-radius: 50%;
  filter:
    drop-shadow(0 0 8px rgba(77, 208, 255, 0.58))
    drop-shadow(0 0 12px rgba(255, 207, 90, 0.2));
}

.rules-action-icon {
  transform: scale(1.34);
  filter:
    drop-shadow(0 0 8px rgba(77, 208, 255, 0.58))
    drop-shadow(0 0 12px rgba(255, 207, 90, 0.24));
}

.reset-action-icon {
  transform: scale(1.36);
  filter:
    drop-shadow(0 0 8px rgba(77, 208, 255, 0.62))
    drop-shadow(0 0 12px rgba(255, 207, 90, 0.28));
}

button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 11px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  outline: none;
  border-color: rgba(77, 208, 255, 0.8);
  background: rgba(77, 208, 255, 0.18);
}

.pause-button {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(77, 208, 255, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(77, 208, 255, 0.16), rgba(6, 16, 32, 0.78) 62%),
    rgba(4, 9, 19, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 22px rgba(77, 208, 255, 0.32);
  pointer-events: auto;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pause-button:hover,
.pause-button:focus-visible {
  border-color: #8cf1ff;
  background:
    radial-gradient(circle, rgba(77, 208, 255, 0.28), rgba(6, 16, 32, 0.84) 64%),
    rgba(4, 9, 19, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 30px rgba(77, 208, 255, 0.45);
  transform: translateY(-1px);
}

.pause-bars {
  width: 24px;
  height: 30px;
  display: grid;
  grid-template-columns: 8px 8px;
  gap: 8px;
}

.pause-bars::before,
.pause-bars::after {
  content: "";
  border-radius: 999px;
  background: #77e7ff;
  box-shadow: 0 0 12px rgba(77, 208, 255, 0.85);
}

.play-triangle {
  display: none;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #77e7ff;
  filter: drop-shadow(0 0 10px rgba(77, 208, 255, 0.85));
}

.pause-button[data-state="start"] .pause-bars,
.pause-button[data-state="resume"] .pause-bars {
  display: none;
}

.pause-button[data-state="start"] .play-triangle,
.pause-button[data-state="resume"] .play-triangle {
  display: block;
}

#startBtn {
  grid-column: 4;
  grid-row: 1;
}

#settingsBtn {
  gap: 10px;
}

#settingsBtn:hover,
#settingsBtn:focus-visible {
  background: transparent;
}

#settingsBtn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 28px;
  filter: drop-shadow(0 0 8px rgba(77, 208, 255, 0.34));
}

#rocketsBtn {
  gap: 10px;
}

#rocketsBtn:hover,
#rocketsBtn:focus-visible {
  background: transparent;
}

.button-rocket {
  position: relative;
  width: 24px;
  height: 34px;
  flex: 0 0 24px;
  transform: rotate(48deg);
}

.button-rocket-body {
  position: absolute;
  left: 7px;
  top: 2px;
  width: 11px;
  height: 25px;
  border-radius: 50% 50% 44% 44%;
  background: #f7fbff;
}

.button-rocket-window {
  position: absolute;
  left: 9px;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: #14213d;
}

.button-rocket-wing {
  position: absolute;
  top: 18px;
  width: 9px;
  height: 13px;
  background: #ff6a5c;
}

.button-rocket-wing.left {
  left: 1px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.button-rocket-wing.right {
  right: 1px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.button-rocket-flame {
  position: absolute;
  left: 8px;
  bottom: 0;
  width: 9px;
  height: 13px;
  background: linear-gradient(#ffcf5a, #ff6a5c);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.reset-icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid #77e7ff;
  border-left-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(77, 208, 255, 0.54));
}

.reset-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 0;
  width: 0;
  height: 0;
  border-left: 8px solid #77e7ff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: rotate(-18deg);
}

.rules-overlay,
.settings-overlay,
.rockets-overlay,
.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 48%, rgba(77, 208, 255, 0.12), transparent 24rem),
    rgba(0, 0, 0, 0.24);
  pointer-events: auto;
}

.account-overlay {
  z-index: 35;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 207, 90, 0.14), transparent 18rem),
    radial-gradient(circle at 50% 50%, rgba(77, 208, 255, 0.16), transparent 28rem),
    rgba(2, 8, 18, 0.78);
  backdrop-filter: blur(7px);
}

.rules-overlay[hidden],
.settings-overlay[hidden],
.rockets-overlay[hidden],
.account-overlay[hidden] {
  display: none;
}

.rules-card,
.settings-card,
.rockets-card,
.account-card {
  --rules-shape: polygon(8% 0, 92% 0, 100% 14%, 100% 86%, 92% 100%, 8% 100%, 0 86%, 0 14%);
  position: relative;
  isolation: isolate;
  width: min(520px, calc(100vw - 32px));
  margin: 0;
  padding: 34px 40px 36px;
  color: #f7fbff;
  text-align: left;
  filter: drop-shadow(0 0 26px rgba(77, 208, 255, 0.2));
}

.settings-card {
  width: min(560px, calc(100vw - 32px));
}

.account-card {
  width: min(480px, calc(100vw - 32px));
  text-align: center;
}

.rockets-card {
  width: min(1120px, calc(100vw - 40px));
  max-height: min(780px, calc(100dvh - 48px));
  overflow: auto;
  padding-top: 46px;
}

.rules-card::before,
.rules-card::after,
.settings-card::before,
.settings-card::after,
.rockets-card::before,
.rockets-card::after,
.account-card::before,
.account-card::after {
  content: "";
  position: absolute;
  clip-path: var(--rules-shape);
  pointer-events: none;
}

.rules-card::before,
.settings-card::before,
.rockets-card::before,
.account-card::before {
  z-index: -2;
  inset: 0;
  background: linear-gradient(90deg, rgba(39, 176, 255, 0.96), rgba(97, 224, 255, 0.48), rgba(39, 176, 255, 0.86));
}

.rules-card::after,
.settings-card::after,
.rockets-card::after,
.account-card::after {
  z-index: -1;
  inset: 1.5px;
  background:
    radial-gradient(circle at 18% 8%, rgba(77, 208, 255, 0.18), transparent 9rem),
    linear-gradient(180deg, rgba(8, 18, 37, 0.96), rgba(3, 7, 18, 0.92));
}

.rules-kicker {
  display: block;
  color: rgba(119, 231, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.rules-card h2,
.settings-card h2,
.rockets-card h2,
.account-card h2 {
  margin: 8px 0 18px;
  color: #f8fbff;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.48),
    0 0 24px rgba(77, 208, 255, 0.3);
}

.account-card p {
  margin: 0 auto 20px;
  max-width: 24rem;
  color: rgba(206, 245, 255, 0.82);
  font-weight: 800;
  line-height: 1.35;
}

.account-panel {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.account-panel[hidden],
.account-form[hidden] {
  display: none;
}

.account-current {
  margin-bottom: 0;
  padding: 14px 16px;
  border: 1px solid rgba(119, 231, 255, 0.28);
  border-radius: 8px;
  background: rgba(3, 8, 20, 0.64);
}

.account-current strong {
  display: block;
  margin-top: 4px;
  color: #ffcf5a;
  font-size: 1.24rem;
  line-height: 1;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.account-recovery-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.account-recovery-actions[hidden] {
  display: none;
}

.account-actions button {
  min-height: 46px;
  border: 1px solid rgba(119, 231, 255, 0.42);
  border-radius: 8px;
  color: #dff8ff;
  background: rgba(9, 24, 48, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.account-actions button:first-child {
  border-color: rgba(255, 207, 90, 0.7);
  color: #061126;
  background: linear-gradient(180deg, #ffe082, #ffbf3e);
}

.account-recovery-actions button {
  min-height: 42px;
  border: 1px solid rgba(119, 231, 255, 0.38);
  border-radius: 8px;
  color: #dff8ff;
  background: rgba(9, 24, 48, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 16px rgba(77, 208, 255, 0.08);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 1000;
  cursor: pointer;
}

.account-recovery-actions button:hover,
.account-recovery-actions button:focus-visible {
  border-color: rgba(77, 208, 255, 0.78);
  background: rgba(12, 48, 84, 0.82);
}

.account-form {
  display: grid;
  gap: 14px;
}

.account-form label {
  display: grid;
  gap: 8px;
  color: rgba(119, 231, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.account-form label[hidden] {
  display: none;
}

.password-control {
  position: relative;
  display: block;
}

.account-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(119, 231, 255, 0.28);
  border-radius: 8px;
  padding: 0 14px;
  color: #f8fbff;
  background: rgba(3, 8, 20, 0.78);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 16px rgba(77, 208, 255, 0.08);
  font: inherit;
  font-weight: 900;
}

.password-control input {
  padding-right: 74px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 56px;
  min-height: 32px;
  border: 1px solid rgba(119, 231, 255, 0.32);
  border-radius: 7px;
  color: #dff8ff;
  background: rgba(9, 24, 48, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle[aria-pressed="true"] {
  border-color: rgba(255, 207, 90, 0.72);
  color: #061126;
  background: linear-gradient(180deg, #ffe082, #ffbf3e);
}

.account-form input:focus {
  outline: 2px solid rgba(77, 208, 255, 0.72);
  outline-offset: 2px;
}

.account-form button,
.account-mode-btn {
  min-height: 48px;
  border: 1px solid rgba(255, 207, 90, 0.7);
  border-radius: 8px;
  color: #061126;
  background: linear-gradient(180deg, #ffe082, #ffbf3e);
  box-shadow:
    0 0 18px rgba(255, 207, 90, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.account-form button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.account-mode-btn {
  margin-top: 14px;
  border-color: rgba(119, 231, 255, 0.4);
  color: #dff8ff;
  background: rgba(9, 24, 48, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.account-status {
  min-height: 1.2em;
  margin: 14px 0 0;
  color: #ffcf5a;
  font-size: 0.9rem;
}

.rules-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-card li {
  position: relative;
  padding-left: 22px;
  color: rgba(206, 245, 255, 0.92);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.rules-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #77e7ff;
  box-shadow: 0 0 10px rgba(77, 208, 255, 0.82);
}

.game-settings-panel {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.game-settings-panel .settings-hero-icon {
  width: 84px;
  height: 84px;
}

.game-settings-panel .settings-row {
  width: 100%;
}

.overlay-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding-right: 84px;
}

.game-coin-badge {
  position: static;
  z-index: 1;
  min-width: 136px;
  flex: 0 0 auto;
}

.rockets-card .game-coin-badge {
  position: static;
  min-width: 108px;
  min-height: 42px;
  margin-right: 0;
  grid-template-columns: 28px auto;
  column-gap: 7px;
  padding: 6px 10px 6px 8px;
}

.rockets-card .game-coin-badge .coin-icon {
  width: 28px;
  height: 28px;
}

.rockets-card .game-coin-badge strong {
  font-size: 0.95rem;
}

.rockets-card .game-coin-badge span:not(.coin-icon) {
  font-size: 0.54rem;
}

.rockets-card .rules-close {
  z-index: 3;
  top: 17px;
  right: 22px;
  min-height: 34px;
  padding: 8px 12px;
}

.game-rocket-grid {
  width: 100%;
  max-height: min(520px, calc(100dvh - 250px));
  margin: 18px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 2px 4px 6px;
  scrollbar-color: rgba(77, 208, 255, 0.7) rgba(3, 8, 19, 0.62);
  scrollbar-width: thin;
}

.game-rocket-grid::-webkit-scrollbar {
  width: 8px;
}

.game-rocket-grid::-webkit-scrollbar-track {
  background: rgba(3, 8, 19, 0.62);
}

.game-rocket-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(77, 208, 255, 0.72);
  box-shadow: 0 0 10px rgba(77, 208, 255, 0.34);
}

.game-rocket-grid .rocket-card {
  clip-path: polygon(9% 0, 100% 0, 100% 78%, 88% 100%, 0 100%, 0 16%);
  min-height: 164px;
  padding: 14px 10px;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(77, 208, 255, 0.09), transparent 5rem),
    rgba(8, 13, 24, 0.58);
}

.game-rocket-grid .rocket-preview {
  width: 82px;
  height: 82px;
}

.rules-close {
  position: absolute;
  top: 18px;
  right: 22px;
  min-width: 0;
  padding: 7px 11px;
  border-color: rgba(77, 208, 255, 0.58);
  background: rgba(77, 208, 255, 0.1);
  color: #bdf4ff;
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
}

.rules-close:hover,
.rules-close:focus-visible {
  border-color: rgba(119, 231, 255, 0.96);
  background: rgba(77, 208, 255, 0.18);
}

.system-bars {
  position: absolute;
  left: clamp(18px, 3.2vw, 34px);
  bottom: clamp(18px, 3vh, 34px);
  z-index: 6;
  width: min(370px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  pointer-events: none;
}

.fps-counter {
  position: absolute;
  top: 132px;
  right: clamp(18px, 3.2vw, 42px);
  z-index: 12;
  min-width: 72px;
  padding: 7px 11px;
  border: 1px solid rgba(77, 208, 255, 0.62);
  border-radius: 4px;
  color: #77e7ff;
  background: rgba(3, 10, 23, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 16px rgba(77, 208, 255, 0.2);
  font-size: 0.72rem;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(77, 208, 255, 0.62);
  pointer-events: none;
}

.fps-counter[hidden] {
  display: none;
}

.system-bar {
  --bar-shape: polygon(5% 0, 64% 0, 70% 18%, 96% 18%, 100% 42%, 100% 78%, 96% 100%, 4% 100%, 0 78%, 4% 50%, 0 24%);
  --bar-color: #24cfff;
  --bar-glow: rgba(36, 207, 255, 0.44);
  position: relative;
  isolation: isolate;
  min-height: 64px;
  display: grid;
  grid-template-columns: 46px 72px minmax(110px, 1fr) 58px;
  align-items: center;
  gap: 9px;
  padding: 11px 18px 10px 16px;
  color: #f7fbff;
}

.system-bar::before,
.system-bar::after {
  content: "";
  position: absolute;
  clip-path: var(--bar-shape);
  pointer-events: auto;
}

.system-bar::before {
  z-index: -2;
  inset: 0;
  background: linear-gradient(90deg, rgba(39, 176, 255, 0.96), rgba(97, 224, 255, 0.5), rgba(39, 176, 255, 0.86));
  filter: drop-shadow(0 0 13px rgba(0, 177, 255, 0.22));
}

.system-bar::after {
  z-index: -1;
  inset: 1.5px;
  background:
    radial-gradient(circle at 16% 50%, rgba(77, 208, 255, 0.24), transparent 4rem),
    linear-gradient(180deg, rgba(7, 18, 39, 0.95), rgba(3, 7, 18, 0.9));
}

.system-shield {
  --bar-color: #31e879;
  --bar-glow: rgba(49, 232, 121, 0.44);
}

.system-icon {
  width: 34px;
  height: 34px;
  justify-self: center;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--bar-glow));
}

.system-rocket-icon {
  transform: rotate(45deg) scale(1.1);
}

.shield-system-icon {
  position: relative;
  border: 2px solid var(--bar-color);
  border-radius: 13px 13px 16px 16px;
  clip-path: polygon(50% 0, 88% 14%, 88% 54%, 50% 100%, 12% 54%, 12% 14%);
  background:
    linear-gradient(90deg, rgba(49, 232, 121, 0.26), rgba(49, 232, 121, 0.08)),
    rgba(2, 16, 20, 0.8);
}

.shield-system-icon::after {
  content: "";
  position: absolute;
  inset: 5px 10px 6px 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.42);
}

.system-label {
  color: #f8fbff;
  font-size: clamp(0.72rem, 1.45vw, 1rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.42);
}

.system-track {
  height: 18px;
  padding: 3px;
  border: 1px solid rgba(77, 208, 255, 0.28);
  border-radius: 4px;
  background: rgba(2, 8, 18, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 13px rgba(0, 0, 0, 0.22);
}

.system-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 82%, #ffffff), var(--bar-color));
  box-shadow: 0 0 12px var(--bar-glow);
  transition: width 120ms linear;
}

.controls-panel {
  --controls-shape: polygon(12% 0, 92% 0, 100% 12%, 100% 88%, 92% 100%, 8% 100%, 0 88%, 0 12%);
  position: absolute;
  right: clamp(24px, 3.6vw, 50px);
  top: 44%;
  z-index: 7;
  width: 220px;
  padding: 22px 24px 20px;
  color: #f7fbff;
  filter: drop-shadow(0 0 18px rgba(0, 177, 255, 0.2));
  pointer-events: none;
}

.controls-panel::before,
.controls-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: var(--controls-shape);
  pointer-events: none;
}

.controls-panel::before {
  z-index: -2;
  background: linear-gradient(90deg, rgba(39, 176, 255, 0.92), rgba(97, 224, 255, 0.5));
}

.controls-panel::after {
  z-index: -1;
  inset: 1.5px;
  background:
    radial-gradient(circle at 85% 12%, rgba(77, 208, 255, 0.16), transparent 5rem),
    rgba(3, 10, 23, 0.82);
}

.controls-panel h2 {
  margin: 0 0 14px;
  color: #77e7ff;
  font-size: 0.88rem;
  font-weight: 1000;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(77, 208, 255, 0.65);
}

.controls-panel p {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  color: rgba(247, 251, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.controls-panel kbd {
  min-width: 34px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 5px;
  color: #f8fbff;
  background: rgba(3, 7, 18, 0.66);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.76rem;
  text-align: center;
}

.system-bar strong {
  color: #f8fbff;
  font-size: clamp(0.92rem, 1.9vw, 1.18rem);
  font-weight: 900;
  line-height: 1;
  text-align: right;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.44);
}

.system-bar.is-empty {
  opacity: 0.72;
}

.system-boost {
  cursor: pointer;
}

.system-bar.is-empty .system-track {
  border-color: rgba(77, 208, 255, 0.2);
  background: rgba(2, 8, 18, 0.48);
}

.system-bar.is-empty .system-label,
.system-bar.is-empty strong {
  color: rgba(247, 251, 255, 0.72);
}

.play-area {
  position: relative;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.mobile-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  display: none;
  gap: 8px;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.mobile-controls div {
  display: flex;
  gap: 8px;
}

.mobile-controls button {
  width: 52px;
  height: 52px;
  padding: 0;
  background: rgba(9, 15, 27, 0.72);
  backdrop-filter: blur(12px);
}

.rockets-page,
.settings-page {
  overflow: auto;
}

.rockets-shell,
.settings-shell {
  position: relative;
  min-height: 100dvh;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 207, 90, 0.18), transparent 18rem),
    linear-gradient(135deg, #070a12 0%, #101827 55%, #07161e 100%);
}

.rockets-shell h1,
.settings-shell h1 {
  margin-top: 18px;
}

.settings-panel {
  width: min(440px, 100%);
  margin: 34px auto 0;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(8, 13, 24, 0.62);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.settings-hero-icon {
  width: 116px;
  height: 116px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(77, 208, 255, 0.22));
}

.settings-row {
  width: min(300px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-weight: 800;
}

.setting-toggle-row {
  cursor: default;
}

.settings-row select {
  min-width: 128px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(7, 10, 18, 0.82);
  font: inherit;
  font-weight: 800;
}

#settingsResetCoinsBtn,
#settingsResetAllBtn {
  width: min(260px, 100%);
}

.settings-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.settings-switch:hover,
.settings-switch:focus-visible {
  background: transparent;
  outline: none;
}

.settings-switch:hover .switch-track,
.settings-switch:focus-visible .switch-track {
  border-color: rgba(77, 208, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(77, 208, 255, 0.16);
}

.switch-track {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(8, 13, 24, 0.78);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-track span {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease, background 160ms ease;
}

.settings-switch[aria-pressed="true"] .switch-track {
  border-color: rgba(69, 209, 158, 0.76);
  background: rgba(69, 209, 158, 0.28);
}

.settings-switch[aria-pressed="true"] .switch-track span {
  background: #45d19e;
  transform: translateX(22px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rocket-grid {
  width: min(980px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 16px;
}

.rocket-card {
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(8, 13, 24, 0.58);
  color: var(--text);
  text-align: center;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.rocket-card:hover,
.rocket-card:focus-visible {
  border-color: rgba(77, 208, 255, 0.78);
  background: rgba(77, 208, 255, 0.12);
  transform: translateY(-2px);
}

.rocket-card.is-selected {
  border-color: var(--accent);
  background: rgba(255, 207, 90, 0.16);
  box-shadow: 0 0 0 3px rgba(255, 207, 90, 0.18), 0 18px 36px rgba(255, 207, 90, 0.16);
}

.rocket-card[data-rarity="rare"] {
  border-color: rgba(77, 208, 255, 0.28);
}

.rocket-card[data-rarity="epic"] {
  border-color: rgba(180, 112, 255, 0.34);
}

.rocket-card[data-rarity="legendary"] {
  border-color: rgba(255, 207, 90, 0.38);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 207, 90, 0.13), transparent 5rem),
    rgba(8, 13, 24, 0.58);
}

.rocket-card.can-buy {
  border-color: rgba(69, 209, 158, 0.48);
  background:
    linear-gradient(180deg, rgba(69, 209, 158, 0.13), rgba(8, 13, 24, 0.58)),
    rgba(8, 13, 24, 0.58);
}

.rocket-card.can-buy:hover,
.rocket-card.can-buy:focus-visible {
  border-color: rgba(69, 209, 158, 0.9);
  box-shadow: 0 0 0 3px rgba(69, 209, 158, 0.16), 0 18px 34px rgba(69, 209, 158, 0.14);
}

.rocket-card.is-locked {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 24, 0.34);
  color: rgba(247, 251, 255, 0.52);
}

.rocket-card.is-locked .rocket-preview {
  opacity: 0.45;
  filter: grayscale(0.7);
}

.rocket-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.36));
}

.rocket-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.rocket-rarity {
  min-width: 84px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #aeb9c9;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.rocket-rarity.is-common {
  color: #b8c2d1;
}

.rocket-rarity.is-rare {
  color: #4dd0ff;
  background: rgba(77, 208, 255, 0.1);
}

.rocket-rarity.is-epic {
  color: #b470ff;
  background: rgba(180, 112, 255, 0.12);
}

.rocket-rarity.is-legendary {
  color: #ffcf5a;
  background: rgba(255, 207, 90, 0.13);
  box-shadow: 0 0 18px rgba(255, 207, 90, 0.12);
}

.rocket-price {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.rocket-card.is-owned .rocket-price {
  color: #45d19e;
}

.rocket-card.is-locked .rocket-price {
  color: rgba(255, 207, 90, 0.62);
}

.coin-badge {
  position: fixed;
  right: 26px;
  top: 22px;
  z-index: 12;
  min-width: 148px;
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px auto;
  grid-template-rows: 1fr 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(255, 207, 90, 0.44);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 207, 90, 0.16), rgba(8, 13, 24, 0.9)),
    rgba(8, 13, 24, 0.76);
  box-shadow: 0 0 0 4px rgba(255, 207, 90, 0.08), 0 16px 34px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.coin-badge strong {
  grid-column: 2;
  align-self: end;
  font-size: 1.1rem;
  line-height: 1;
}

.coin-badge span:not(.coin-icon) {
  grid-column: 2;
  align-self: start;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coin-icon {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  background: url("assets/coin-small.png") center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(255, 207, 90, 0.34));
}

.coin-alert {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: min(460px, calc(100vw - 36px));
  min-height: 184px;
  display: grid;
  grid-template-rows: 92px auto;
  align-items: center;
  justify-items: center;
  padding: 22px 26px 24px;
  border: 2px solid rgba(255, 84, 84, 0.9);
  border-radius: 8px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 84, 84, 0.28), transparent 72%),
    rgba(7, 10, 18, 0.94);
  box-shadow: 0 0 0 6px rgba(255, 84, 84, 0.14), 0 24px 70px rgba(0, 0, 0, 0.62);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -44%) scale(0.78) rotate(-2deg);
}

.coin-alert-rocket {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
}

.coin-alert p {
  max-width: 360px;
  margin: 0;
  line-height: 1.12;
}

.coin-alert .rocket-preview {
  width: 82px;
  height: 82px;
  margin: 0 auto;
}

.coin-alert.is-showing {
  animation: coin-alert-pop 2.2s ease forwards;
}

@keyframes coin-alert-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -38%) scale(0.72) rotate(-4deg);
  }
  14% {
    opacity: 1;
    transform: translate(-50%, -54%) scale(1.08) rotate(2deg);
  }
  24% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  76% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -62%) scale(0.9);
  }
}

.back-link {
  position: absolute;
  left: 24px;
  top: 22px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(77, 208, 255, 0.24), rgba(8, 13, 24, 0.92));
  box-shadow: 0 0 0 4px rgba(77, 208, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.34);
  text-decoration: none;
}

.back-arrow {
  width: 16px;
  height: 16px;
  border-left: 5px solid currentColor;
  border-bottom: 5px solid currentColor;
  transform: translateX(3px) rotate(45deg);
}

.back-link:hover,
.back-link:focus-visible {
  outline: none;
  border-color: var(--accent-2);
  background: linear-gradient(180deg, rgba(255, 207, 90, 0.34), rgba(8, 13, 24, 0.92));
  box-shadow: 0 0 0 5px rgba(255, 207, 90, 0.16), 0 18px 38px rgba(0, 0, 0, 0.38);
  transform: translateX(-2px);
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .game-shell {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    grid-template-rows: 1fr;
  }

  .hud {
    grid-template-columns: minmax(144px, 1fr) minmax(94px, 0.78fr) 54px 54px;
    gap: 6px;
    padding: 12px 12px 0;
    align-items: start;
  }

  .menu-wrap {
    grid-column: 4;
    grid-row: 1;
    width: 56px;
    height: 56px;
  }

  .hud-panel {
    min-height: 62px;
    column-gap: 8px;
    padding: 9px 10px;
  }

  .hud-energy {
    --panel-shape: polygon(8% 0, 92% 0, 100% 12%, 100% 84%, 88% 100%, 8% 100%, 0 88%, 0 12%);
    grid-column: 1;
    grid-row: 1;
    min-height: 126px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: 24px 30px 2px 26px 28px;
    padding: 10px 20px 10px 12px;
  }

  .hud-score {
    grid-column: 1 / 3;
    grid-row: 2;
    min-height: 58px;
  }

  .hud-lives {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .energy-icon {
    width: 40px;
    height: 50px;
  }

  .collected-icon {
    width: 34px;
    height: 34px;
  }

  .heart-icon {
    width: 38px;
    height: 38px;
  }

  .hud-label {
    font-size: 0.64rem;
  }

  .hud-panel strong {
    font-size: 1.18rem;
  }

  .hud-energy > strong {
    font-size: 1.12rem;
  }

  .hud-collected-value {
    font-size: 0.86rem;
  }

  .pause-button {
    width: 56px;
    height: 56px;
    align-self: start;
  }

  #startBtn {
    grid-column: 3;
    grid-row: 1;
  }

  .menu-lines {
    width: 25px;
    height: 19px;
    background-size: 100% 4px;
  }

  .menu-lines::before,
  .menu-lines::after {
    height: 4px;
  }

  .actions {
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: min(172px, calc(100vw - 24px));
    z-index: 15;
  }

  .actions button {
    min-height: 48px;
    padding: 9px 12px;
  }

  .system-bars {
    left: 50%;
    right: auto;
    bottom: 14px;
    width: min(364px, calc(100vw - 28px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    transform: translateX(-50%);
  }

  .fps-counter {
    top: 168px;
    right: 12px;
    min-width: 60px;
    padding: 6px 8px;
    font-size: 0.6rem;
  }

  .system-bar {
    min-height: 44px;
    grid-template-columns: 24px 40px minmax(34px, 1fr) 34px;
    gap: 5px;
    padding: 8px 8px 7px 7px;
  }

  .system-icon {
    width: 27px;
    height: 27px;
  }

  .system-label {
    font-size: 0.6rem;
  }

  .system-track {
    height: 12px;
    padding: 2px;
  }

  .system-bar strong {
    font-size: 0.68rem;
  }

  .controls-panel {
    display: none;
  }

  .rules-overlay,
  .settings-overlay,
  .rockets-overlay,
  .account-overlay {
    align-items: start;
    padding: 118px 16px 20px;
  }

  .rules-card,
  .settings-card,
  .rockets-card,
  .account-card {
    padding: 30px 24px 28px;
  }

  .rockets-card {
    padding-top: 52px;
  }

  .rules-card h2,
  .settings-card h2,
  .rockets-card h2,
  .account-card h2 {
    margin-bottom: 14px;
  }

  .rules-card li {
    font-size: 0.9rem;
  }

  .rules-close {
    top: 14px;
    right: 18px;
  }

  .game-settings-panel .settings-hero-icon {
    width: 68px;
    height: 68px;
  }

  .overlay-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-right: 0;
  }

  .game-coin-badge {
    min-width: 128px;
    width: max-content;
  }

  .rockets-card .game-coin-badge {
    min-width: 92px;
    min-height: 36px;
    margin-right: 0;
    grid-template-columns: 24px auto;
    column-gap: 6px;
    padding: 5px 8px 5px 7px;
  }

  .rockets-card .game-coin-badge .coin-icon {
    width: 24px;
    height: 24px;
  }

  .rockets-card .game-coin-badge strong {
    font-size: 0.82rem;
  }

  .rockets-card .game-coin-badge span:not(.coin-icon) {
    font-size: 0.48rem;
  }

  .rockets-card .rules-close {
    right: 16px;
    min-height: 30px;
    padding: 7px 10px;
    font-size: 0.62rem;
  }

  .game-rocket-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    max-height: calc(100dvh - 300px);
    gap: 10px;
  }

  .game-rocket-grid .rocket-card {
    min-height: 148px;
  }

  .game-rocket-grid .rocket-preview {
    width: 68px;
    height: 68px;
  }

  .mobile-controls {
    bottom: 82px;
    display: flex;
  }
}
