:root {
  --bg: #070a12;
  --panel: #0d1220;
  --panel-2: #11182a;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef4ff;
  --muted: #8995ad;
  --green: #25f58a;
  --red: #ff3d5e;
  --blue: #35a7ff;
  --yellow: #ffd166;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --shadow-green: 0 0 34px rgba(37, 245, 138, 0.3);
  --shadow-red: 0 0 34px rgba(255, 61, 94, 0.28);
  --shadow-blue: 0 0 34px rgba(53, 167, 255, 0.3);
  --soft-panel: linear-gradient(145deg, rgba(18, 25, 44, 0.82), rgba(8, 12, 23, 0.9));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% -6%, rgba(53, 167, 255, 0.18), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(37, 245, 138, 0.13), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(255, 61, 94, 0.07), transparent 42%),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.topbar,
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 8px;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-icon {
  --header-icon-accent: var(--blue);
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--header-icon-accent) 34%, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  color: var(--header-icon-accent);
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--header-icon-accent) 16%, transparent), transparent 68%),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0 22px color-mix(in srgb, var(--header-icon-accent) 11%, transparent);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  will-change: transform;
}

.header-icon:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--header-icon-accent) 52%, rgba(255, 255, 255, 0.14));
  box-shadow: 0 0 26px color-mix(in srgb, var(--header-icon-accent) 18%, transparent);
}

.header-icon:active,
.icon-action:active,
.primary:active,
.secondary:active,
.ghost:active,
.mode-card:active {
  transform: translateY(0) scale(0.98);
}

.header-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon-gifts {
  --header-icon-accent: var(--yellow);
}

.screen-title {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(53, 167, 255, 0.32);
}

.screen-title:empty {
  display: none;
}

.header-back {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-back.visible {
  display: grid;
}

h1,
h2,
p {
  margin: 0;
}

h2 {
  font-size: 24px;
  line-height: 1.1;
}

.eyebrow {
  color: #aeb8cb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 6px;
}

.eyebrow.green {
  color: var(--green);
}

.eyebrow.red {
  color: var(--red);
}

.eyebrow.blue {
  color: var(--blue);
}

.eyebrow.yellow {
  color: var(--yellow);
}

.eyebrow.purple {
  color: #b78cff;
}

.view-gifts .game-header .eyebrow {
  color: var(--yellow);
}

.wallet,
.metric {
  min-width: 132px;
  padding: 0;
}

.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 0;
  max-width: min(54vw, 240px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(17, 24, 42, 0.92), rgba(7, 11, 20, 0.9));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wallet > div {
  min-width: 0;
}

.metric {
  text-align: right;
  min-width: 104px;
  max-width: 42vw;
}

.wallet span,
.metric span {
  color: var(--muted);
  font-size: 12px;
}

.wallet strong,
.metric strong {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(18px, 5.4vw, 22px);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coin-icon {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff8b7 0 12%, #ffd166 30%, #f0a500 72%, #8f5d00 100%);
  box-shadow: 0 0 20px rgba(255, 209, 102, 0.42), inset 0 -2px 7px rgba(83, 47, 0, 0.35);
}

.coin-icon::after {
  content: "К";
  color: #593900;
  font-size: 15px;
  font-weight: 900;
}

.coin-icon.small {
  width: 20px;
  height: 20px;
}

.coin-icon.small::after {
  font-size: 11px;
}

.icon-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #05110a;
  background: var(--green);
  box-shadow: var(--shadow-green);
  font-size: 22px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}

.icon-action:hover,
.primary:hover,
.secondary:hover,
.header-back:hover,
.ghost:hover {
  transform: translateY(-1px);
}

.notice {
  padding: 13px 16px;
  border: 1px solid rgba(255, 209, 102, 0.26);
  border-radius: var(--radius-md);
  color: #ffe8ad;
  background: linear-gradient(145deg, rgba(255, 209, 102, 0.11), rgba(255, 209, 102, 0.045));
  box-shadow: 0 0 28px rgba(255, 209, 102, 0.08);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.48;
}

.bottom-notice {
  margin-top: 18px;
  backdrop-filter: blur(18px);
}

.ghost,
.secondary,
.primary {
  min-height: 46px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 800;
}

.views {
  min-height: 0;
}

.view {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.view.active {
  display: block;
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.view-mines {
  --view-accent: var(--green);
  --view-accent-text: #02110a;
}

.view-crash {
  --view-accent: var(--blue);
  --view-accent-text: #02101d;
}

.view-wheel {
  --view-accent: var(--red);
  --view-accent-text: #26020a;
}

.view-gifts {
  --view-accent: var(--yellow);
  --view-accent-text: #251600;
}

.game-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(17, 24, 42, 0.55), rgba(7, 11, 20, 0.58));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.view:not(.home-view) .game-header {
  border-color: color-mix(in srgb, var(--view-accent) 28%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--view-accent) 10%, transparent), transparent 54%),
    linear-gradient(145deg, rgba(17, 24, 42, 0.58), rgba(7, 11, 20, 0.7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 30px color-mix(in srgb, var(--view-accent) 8%, transparent);
}

.game-header > div:not(.metric),
.game-header h2 {
  min-width: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mode-card {
  --card-accent: var(--blue);
  --card-accent-soft: rgba(53, 167, 255, 0.08);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  min-height: 128px;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 36%, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg);
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--card-accent) 10%, transparent), transparent 48%),
    var(--soft-panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  will-change: transform;
}

.mode-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--card-accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--card-accent) 55%, transparent);
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--card-accent) 58%, rgba(255, 255, 255, 0.18));
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.26), 0 0 34px color-mix(in srgb, var(--card-accent) 18%, transparent);
}

.mode-mines {
  --card-accent: var(--green);
  --card-accent-soft: rgba(37, 245, 138, 0.1);
}

.mode-crash {
  --card-accent: var(--blue);
  --card-accent-soft: rgba(53, 167, 255, 0.1);
}

.mode-wheel {
  --card-accent: var(--red);
  --card-accent-soft: rgba(255, 61, 94, 0.095);
}

.mode-gifts {
  --card-accent: var(--yellow);
  --card-accent-soft: rgba(255, 209, 102, 0.1);
}

.mode-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  z-index: 1;
}

.mode-copy span {
  color: #b4bed1;
  max-width: 36ch;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.mode-copy strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.18;
}

.mode-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--card-accent) 38%, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  color: var(--card-accent);
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--card-accent) 18%, transparent), transparent 68%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 0 26px color-mix(in srgb, var(--card-accent) 13%, transparent);
  z-index: 1;
}

.mode-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--card-accent) 34%, transparent));
}

.metric {
  justify-self: end;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  background: rgba(7, 10, 18, 0.42);
  align-items: end;
}

.view:not(.home-view) .control-grid,
.view:not(.home-view) input,
.view:not(.home-view) select,
.view:not(.home-view) .goal {
  border-color: color-mix(in srgb, var(--view-accent) 22%, rgba(255, 255, 255, 0.08));
}

.view:not(.home-view) .control-grid,
.view:not(.home-view) .goal {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--view-accent) 5%, rgba(7, 10, 18, 0.58)), rgba(7, 10, 18, 0.6));
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(9, 14, 25, 0.78);
  padding: 0 14px;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus {
  border-color: color-mix(in srgb, var(--view-accent, var(--blue)) 66%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 0 28px color-mix(in srgb, var(--view-accent, var(--blue)) 24%, transparent);
}

.primary {
  padding: 0 20px;
  color: var(--view-accent-text, #02110a);
  background: var(--view-accent, var(--green));
  box-shadow: 0 0 34px color-mix(in srgb, var(--view-accent, var(--green)) 30%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
  will-change: transform;
}

.secondary {
  padding: 0 20px;
  border: 1px solid color-mix(in srgb, var(--view-accent, var(--blue)) 42%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--view-accent, var(--blue)) 15%, transparent);
  color: var(--text);
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  will-change: transform;
}

.secondary:disabled,
.primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.ghost {
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  will-change: transform;
}

.compact-action {
  min-height: 48px;
  min-width: 76px;
  color: var(--text);
  background: color-mix(in srgb, var(--view-accent, var(--green)) 10%, transparent);
  border-color: color-mix(in srgb, var(--view-accent, var(--green)) 30%, rgba(255, 255, 255, 0.1));
}

.mines-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 11px;
  max-width: 520px;
  margin: 0 auto;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.mines-board.inactive {
  filter: saturate(0.45);
  opacity: 0.45;
}

.cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(26, 35, 58, 0.96), rgba(9, 14, 25, 0.96));
  color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

.cell:disabled {
  cursor: not-allowed;
}

.cell:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--green) 46%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 0 24px rgba(37, 245, 138, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.cell.safe {
  color: #052113;
  background: var(--green);
  box-shadow: var(--shadow-green);
  animation: pop 0.22s ease both;
}

.cell.mine {
  color: #240209;
  background: var(--red);
  box-shadow: var(--shadow-red);
  animation: shake 0.32s ease both;
}

.cell::after {
  content: attr(data-symbol);
  display: grid;
  height: 100%;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
}

.status-line {
  margin-top: 16px;
  color: color-mix(in srgb, var(--view-accent, #a8b2c7) 28%, #a8b2c7);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.crash-stage {
  position: relative;
  overflow: hidden;
  height: 340px;
  border: 1px solid rgba(53, 167, 255, 0.22);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #070b14;
  background-size: 42px 42px;
  box-shadow: inset 0 0 42px rgba(53, 167, 255, 0.08), 0 18px 54px rgba(0, 0, 0, 0.18);
}

#crashCanvas {
  width: 100%;
  height: 100%;
}

.rocket {
  position: absolute;
  left: 36px;
  bottom: 30px;
  width: 46px;
  height: 72px;
  transform: rotate(42deg);
  transition: left 0.06s linear, bottom 0.06s linear, filter 0.18s ease;
  filter: drop-shadow(0 0 18px rgba(53, 167, 255, 0.62));
  will-change: left, bottom;
}

.rocket-body,
.rocket-window,
.rocket-fin,
.rocket-flame {
  position: absolute;
  display: block;
}

.rocket-body {
  left: 11px;
  top: 0;
  width: 24px;
  height: 54px;
  border-radius: 50% 50% 12px 12px;
  background:
    radial-gradient(circle at 50% 28%, #e9fbff 0 11%, transparent 12%),
    linear-gradient(90deg, #d8f2ff 0 18%, #ffffff 42%, #35a7ff 72%, #17629a 100%);
  box-shadow: inset -4px -8px 12px rgba(7, 10, 18, 0.22);
}

.rocket-window {
  left: 17px;
  top: 17px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(7, 10, 18, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #7bd7ff 45%, #0e426e 100%);
}

.rocket-fin {
  bottom: 14px;
  width: 14px;
  height: 20px;
  background: linear-gradient(180deg, #ff3d5e, #8e1430);
}

.rocket-fin-left {
  left: 3px;
  border-radius: 12px 0 0 6px;
  transform: skewY(26deg);
}

.rocket-fin-right {
  right: 3px;
  border-radius: 0 12px 6px 0;
  transform: skewY(-26deg);
}

.rocket-flame {
  left: 15px;
  bottom: 0;
  width: 16px;
  height: 27px;
  border-radius: 50% 50% 999px 999px;
  background: linear-gradient(var(--yellow), #ff7a1a 52%, rgba(255, 61, 94, 0));
  filter: blur(0.4px);
  transform: translateY(19px);
}

.rocket.crashed {
  filter: drop-shadow(0 0 20px rgba(255, 61, 94, 0.7));
}

.rocket.crashed .rocket-body {
  background: linear-gradient(135deg, #ffbec9, var(--red) 54%, #651122);
}

.rocket.crashed .rocket-flame {
  opacity: 0.15;
}

.wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 20px 10px 10px;
}

#wheelCanvas {
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: drop-shadow(0 0 35px rgba(255, 61, 94, 0.24));
}

.wheel-pointer {
  position: absolute;
  top: 4px;
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--red);
  filter: drop-shadow(0 0 12px rgba(255, 61, 94, 0.55));
}

.goals-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.goal {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(7, 10, 18, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.goal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.goal-top span {
  color: var(--muted);
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  box-shadow: 0 0 24px rgba(255, 209, 102, 0.24);
}

.goal-bottom {
  display: block;
}

dialog {
  width: min(92vw, 420px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--panel);
  box-shadow: 0 24px 120px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.modal {
  position: relative;
  display: grid;
  gap: 14px;
}

.modal p {
  color: var(--muted);
  line-height: 1.45;
}

.modal-close {
  position: absolute;
  top: -8px;
  right: -4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 24px;
}

.topup-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(255, 209, 102, 0.08);
}

.topup-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topup-summary strong {
  color: var(--yellow);
  font-size: 20px;
}

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

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pop {
  50% {
    transform: scale(1.06);
  }
}

@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

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

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    align-items: center;
    gap: 10px;
  }

  .screen-title {
    font-size: 20px;
  }

  .wallet {
    min-width: 126px;
  }

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

  .primary,
  .secondary {
    width: 100%;
  }

  .mines-board {
    gap: 8px;
  }
}

@media (max-width: 440px) {
  h2 {
    font-size: 19px;
  }

  .game-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .metric {
    min-width: 112px;
  }

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

  .crash-stage {
    height: 290px;
  }

  .goal-bottom {
    grid-template-columns: 1fr;
  }

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

  .mode-card {
    grid-template-columns: minmax(0, 1fr) 48px;
    min-height: 122px;
    padding: 19px;
    gap: 16px;
  }

  .mode-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .mode-icon svg {
    width: 25px;
    height: 25px;
  }
}
