:root {
  --gold: #c9a227;
  --gold-light: #f0c84a;
  --gold-dim: #7a6118;
  --bg: #080a0f;
  --surface: #0e1118;
  --surface2: #151b26;
  --surface3: #1c2535;
  --text: #e8eaf0;
  --text-muted: #6b7694;
  --red: #e84040;
  --green: #2ecc71;
  --blue: #4b8bff;
  --radius: 12px;
  --numeric-font: "Rajdhani", "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background:
    linear-gradient(180deg, rgba(8, 10, 15, 0.86), rgba(8, 10, 15, 0.95)),
    url("/BACKGROUND.jpg") center/cover no-repeat fixed;
  color: var(--text);
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(201, 162, 39, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 12%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 70%, rgba(201, 162, 39, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 55%, rgba(255, 255, 255, 0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 32% 88%, rgba(201, 162, 39, 0.2) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.app[hidden] { display: none !important; }

.app {
  position: relative;
  z-index: 1;
  max-width: 420px;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

.bottom-stack {
  padding-bottom: 8px;
}

.header,
.window-info {
  backdrop-filter: blur(10px);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  background: linear-gradient(90deg, #0c1c1b 0%, #0e3d37 100%);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-context {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon-btn {
  background: rgba(7, 13, 13, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.header-icon-btn-text {
  font-size: 13px;
  letter-spacing: 0.8px;
}

.header-icon-btn:hover {
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold);
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.lang-switch {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 13, 13, 0.78);
  color: var(--text);
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: inset 0 0 0 1px rgba(215, 192, 157, 0.08);
  cursor: pointer;
}

.lang-flag {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  opacity: 0.52;
  filter: grayscale(0.2);
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.lang-flag.active {
  opacity: 1;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, rgba(225, 163, 36, 0.24), rgba(132, 93, 12, 0.24));
  box-shadow: 0 0 0 1px rgba(215, 192, 157, 0.22) inset;
  transform: translateY(-1px);
}

.balance-label,
.bet-label,
.best-label,
.result-mult-label,
.result-reward-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.balance-amount,
.bet-value,
.best-value,
.result-mult,
.result-reward-value,
.multiplier-value,
.round-dot {
  font-family: var(--numeric-font);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.balance-amount {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 14px rgba(240, 200, 74, 0.28);
  animation: balancePulse 2.8s ease-in-out infinite;
}

.unit {
  font-size: 10px;
  color: var(--gold-dim);
  margin-left: 3px;
  letter-spacing: 1px;
}

.window-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 20px;
  background: linear-gradient(90deg, rgba(12, 28, 27, 0.68) 0%, rgba(14, 61, 55, 0.5) 100%);
  border-bottom: 1px solid rgba(215, 192, 157, 0.1);
  font-size: 11px;
  color: #d7c09d;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.5px;
}

.window-dot,
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  animation: pulse 2s infinite;
}

.window-dot {
  background: var(--green);
  color: var(--green);
}

.window-dot.closed {
  background: var(--red);
  color: var(--red);
}

.crash-arena,
.insight-card,
.result-card,
.modal-sheet {
  background: rgba(14, 17, 24, 0.88);
}

.insights-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px 20px 0;
  max-height: 90px;
  flex-shrink: 0;
  opacity: 1;
  overflow: hidden;
  transform-origin: top center;
  transition: max-height 0.3s ease, opacity 0.24s ease, transform 0.3s ease, padding 0.3s ease;
}

.insight-card {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  overflow: hidden;
  min-height: 0;
}

.insight-header {
  padding: 9px 12px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
}

.crash-arena {
  margin: 12px 20px;
  border: 1px solid rgba(201, 162, 39, 0.12);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 300px;
  transition: margin 0.3s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.arena-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(201, 162, 39, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, rgba(201, 162, 39, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

.lock-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 84px;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(46, 204, 113, 0.22);
  background: linear-gradient(180deg, rgba(21, 56, 37, 0.9), rgba(10, 27, 19, 0.94));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.lock-chip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: lockChipPulse 0.85s ease-in-out infinite;
}

.lock-chip-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(210, 246, 224, 0.78);
}

.lock-chip-value {
  font-family: var(--numeric-font);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: #7bf0a5;
  text-shadow: 0 0 14px rgba(46, 204, 113, 0.4);
}

.graph-container {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(144px, 26vh, 340px);
  padding: 8px 8px 0;
  transition: min-height 0.3s ease, padding 0.3s ease;
}

canvas#crashGraph {
  width: 100%;
  height: 100%;
  display: block;
}

.countdown-display {
  position: absolute;
  inset: 10px 10px auto 10px;
  z-index: 3;
  text-align: center;
  padding: 28px 20px 0;
  font-family: var(--numeric-font);
  font-size: 48px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: -1px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
}

.countdown-display.show {
  opacity: 1;
  transform: translateY(0);
}

.countdown-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
}

.multiplier-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  padding: 6px 16px 10px;
  position: relative;
  transition: padding 0.3s ease;
}

.round-label,
.result-title,
.modal-title,
.status-text {
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
}

.round-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.multiplier-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 6.2ch;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  text-rendering: geometricPrecision;
  transition: color 0.08s linear, font-size 0.18s ease;
}

.multiplier-unit {
  width: 0.9ch;
  text-align: left;
  font-size: 28px;
  color: var(--text-muted);
}

.multiplier-value.running {
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(201, 162, 39, 0.28);
}

.multiplier-value.crashed {
  color: var(--red);
  text-shadow: 0 0 18px rgba(232, 64, 64, 0.28);
  animation: crashShake 0.4s;
}

.multiplier-value.cashed {
  color: var(--green);
  text-shadow: 0 0 18px rgba(46, 204, 113, 0.28);
}

.multiplier-value.idle {
  color: var(--text-muted);
}

.multiplier-value.countdown {
  color: var(--gold-light);
  font-size: 42px;
  letter-spacing: 0;
  text-shadow: 0 0 30px rgba(240, 200, 74, 0.26);
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 4px;
  height: 18px;
  color: var(--text-muted);
  transition: font-size 0.3s ease, height 0.3s ease;
}

.status-text.crashed {
  color: var(--red);
}

.status-text.running {
  color: var(--gold);
}

.status-text.cashed {
  color: var(--green);
}

.best-strip,
.round-dots {
  display: flex;
  justify-content: center;
}

.best-strip {
  align-items: center;
  gap: 8px;
  padding: 6px 16px 10px;
  flex-shrink: 0;
  transition: padding 0.3s ease;
}

.best-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light);
}

.best-new-badge {
  background: var(--gold);
  color: #000;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.best-new-badge.show {
  opacity: 1;
}

@keyframes lockChipPulse {
  0%, 100% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(122, 240, 165, 0.18) inset, 0 0 18px rgba(46, 204, 113, 0.26);
    filter: brightness(1.08);
  }
}

.round-dots {
  gap: 8px;
  padding: 0 16px 12px;
  flex-shrink: 0;
  transition: padding 0.3s ease;
}

.telegram-identity-wrap {
  padding: 0 20px 8px;
  flex-shrink: 0;
}

.telegram-identity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 13, 20, 0.82);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.telegram-identity-label {
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.telegram-identity-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(240, 200, 74, 0.18);
}

body.game-active .insights-row {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  transform: translateY(-12px) scaleY(0.92);
  pointer-events: none;
}

body.game-active .crash-arena {
  margin-top: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

body.game-active .graph-container {
  min-height: clamp(220px, 42vh, 420px);
  padding: 12px 12px 0;
}

body.game-active .multiplier-display {
  padding: 18px 16px 12px;
}

body.game-active .multiplier-value {
  font-size: 72px;
}

body.game-active .status-text {
  font-size: 13px;
  height: 20px;
}

body.game-active .best-strip {
  padding: 8px 16px 12px;
}

body.game-active .round-dots {
  padding: 0 16px 14px;
}

body.game-active .telegram-identity-wrap {
  padding-bottom: 10px;
}

.round-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  background: var(--surface2);
  transition: all 0.3s;
}

.round-dot.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.3);
}

.round-dot.cashed {
  border-color: var(--green);
  color: var(--green);
  background: rgba(46, 204, 113, 0.1);
}

.round-dot.crashed {
  border-color: var(--red);
  color: var(--red);
  background: rgba(232, 64, 64, 0.08);
}

.round-dot.best {
  border-color: var(--gold-light);
  background: rgba(201, 162, 39, 0.2);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.5);
}

.bet-display,
.controls {
  padding: 0 20px;
}

.bet-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.bet-value-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.bet-value {
  font-size: 14px;
  font-weight: 700;
}

.bet-change-icon {
  font-size: 12px;
  opacity: 0.75;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.btn,
.btn-sm {
  border: none;
  border-radius: var(--radius);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.btn {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  letter-spacing: 2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #e1a324 0%, #b98116 52%, #845d0c 100%);
  color: #202122;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
  box-shadow:
    0 18px 34px rgba(132, 93, 12, 0.34),
    0 0 0 1px rgba(215, 192, 157, 0.3) inset,
    0 -10px 18px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:not(:disabled):hover,
.btn-primary:not(:disabled):focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 22px 40px rgba(132, 93, 12, 0.42),
    0 0 0 1px rgba(215, 192, 157, 0.36) inset,
    0 -10px 18px rgba(255, 255, 255, 0.14) inset;
}

.btn-primary:not(:disabled):active {
  transform: translateY(1px) scale(0.995);
  filter: brightness(0.98);
}

.btn-danger {
  background: linear-gradient(135deg, #c0392b, #e84040);
  color: #fff;
  box-shadow: 0 4px 20px rgba(232, 64, 64, 0.3);
  font-size: 22px;
}

.btn-disabled {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #3b444f 0%, #2d353e 52%, #21282f 100%);
  color: rgba(226, 232, 240, 0.88);
  box-shadow:
    0 14px 28px rgba(10, 12, 15, 0.34),
    0 0 0 1px rgba(160, 174, 192, 0.12) inset;
}

.btn-armed {
  animation: armedPulse 0.55s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 24px rgba(46, 204, 113, 0.55);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.live-dot {
  background: var(--gold);
  color: var(--gold);
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
}

.history-list-compact {
  gap: 5px;
  padding: 8px 10px 10px;
}

.history-chip {
  font-family: var(--numeric-font);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  padding: 4px 8px;
  border-radius: 6px;
  animation: chipIn 0.3s ease;
}

.history-chip.low {
  background: rgba(232, 64, 64, 0.15);
  color: var(--red);
  border: 1px solid rgba(232, 64, 64, 0.3);
}

.history-chip.mid {
  background: rgba(224, 224, 224, 0.08);
  color: #e0e0e0;
  border: 1px solid rgba(224, 224, 224, 0.2);
}

.history-chip.high {
  background: rgba(201, 162, 39, 0.14);
  color: var(--gold-light);
  border: 1px solid rgba(201, 162, 39, 0.26);
}

body.session-locked .bet-display {
  opacity: 0.45;
  filter: grayscale(0.15);
}

.toast,
.result-overlay,
.modal-overlay,
.access-gate {
  position: fixed;
  z-index: 100;
}

.toast {
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: linear-gradient(135deg, var(--surface3), var(--surface2));
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.result-overlay,
.modal-overlay {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}

.access-gate {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.result-overlay {
  background: rgba(8, 10, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.access-gate {
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-overlay.show,
.modal-overlay.show,
.access-gate.show {
  opacity: 1;
  pointer-events: all;
}

.result-card {
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 24px;
  padding: 36px 40px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 0 60px rgba(201, 162, 39, 0.15);
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.access-gate-card {
  width: min(320px, 88vw);
  padding: 32px 28px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.access-gate-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #1a1a1a;
}

.access-gate-text {
  margin-top: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #555555;
  font-size: 14px;
  line-height: 1.5;
}

.result-overlay.show .result-card,
.modal-overlay.show .modal-sheet {
  transform: scale(1);
}

.result-title,
.modal-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 16px;
}

.result-mult {
  font-size: 52px;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 40px rgba(201, 162, 39, 0.6);
}

.result-reward {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin: 24px 0;
}

.result-reward-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold-light);
}

.result-next {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-sm {
  padding: 12px 28px;
  font-size: 15px;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #000;
}

.btn-sm-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-overlay {
  background: rgba(8, 10, 15, 0.85);
  display: flex;
  align-items: flex-end;
}

.modal-sheet {
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 24px 24px 0 0;
  padding: 24px 24px 40px;
  width: 100%;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.paytable-subtitle {
  margin: -6px 0 14px;
  color: var(--text-muted);
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.paytable-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.paytable-table {
  width: 100%;
  border-collapse: collapse;
}

.paytable-table th,
.paytable-table td {
  padding: 11px 12px;
  text-align: left;
}

.paytable-table th {
  color: var(--text-muted);
  font-family: "Rajdhani", sans-serif;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
}

.paytable-table td {
  font-family: var(--numeric-font);
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.paytable-table td:last-child {
  color: var(--gold-light);
}

.vip-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.vip-row.active {
  border-color: rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.08);
}

.vip-row.locked {
  cursor: default;
}

.vip-row-name {
  flex: 1;
  font-family: "Rajdhani", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.vip-row-detail {
  font-family: var(--numeric-font);
  font-size: 10px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-muted);
  text-align: right;
}

.vip-row-detail span {
  display: block;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes crashShake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(8px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(5px);
  }
}

@keyframes chipIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Shooting stars for the splash screen */
.shooting-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.shooting-stars .star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  background: linear-gradient(-45deg, #c9a227, rgba(0, 0, 0, 0));
  border-radius: 999px;
  filter: drop-shadow(0 0 6px #c9a227);
  animation: shoot 3s ease-in-out infinite;
}

.shooting-stars .star:nth-child(2) {
  top: 20%;
  left: 40%;
  animation-delay: 0.8s;
  animation-duration: 2.5s;
}

.shooting-stars .star:nth-child(3) {
  top: 65%;
  left: 80%;
  animation-delay: 1.5s;
  animation-duration: 3.2s;
}

@keyframes shoot {
  0% { transform: translateX(0) translateY(0) rotate(45deg); opacity: 1; height: 2px; }
  70% { opacity: 1; height: 2px; }
  100% { transform: translateX(-300px) translateY(300px) rotate(45deg); opacity: 0; height: 400px; }
}

@keyframes armedPulse {
  0%,
  100% {
    transform: scale(1);
    filter: saturate(1);
  }

  50% {
    transform: scale(1.035);
    filter: saturate(1.2);
  }
}

/* Shooting stars for the splash screen */
.shooting-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.shooting-stars .star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  background: linear-gradient(-45deg, #c9a227, rgba(0, 0, 0, 0));
  border-radius: 999px;
  filter: drop-shadow(0 0 6px #c9a227);
  animation: shoot 3s ease-in-out infinite;
}

.shooting-stars .star:nth-child(2) {
  top: 20%;
  left: 40%;
  animation-delay: 0.8s;
  animation-duration: 2.5s;
}

.shooting-stars .star:nth-child(3) {
  top: 65%;
  left: 80%;
  animation-delay: 1.5s;
  animation-duration: 3.2s;
}

@keyframes shoot {
  0% { transform: translateX(0) translateY(0) rotate(45deg); opacity: 1; height: 2px; }
  70% { opacity: 1; height: 2px; }
  100% { transform: translateX(-300px) translateY(300px) rotate(45deg); opacity: 0; height: 400px; }
}

@keyframes balancePulse {
  0%,
  100% {
    text-shadow: 0 0 12px rgba(240, 200, 74, 0.2);
  }

  50% {
    text-shadow: 0 0 20px rgba(240, 200, 74, 0.42);
  }
}

@keyframes kenBurns {
  0%, 100% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(-2%, 2%);
  }
}

body.game-active .shooting-stars {
  display: none;
}

.how-to-play-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--text);
  text-align: center;
  max-width: 340px;
  margin: 0 auto;
}

#howToPlayModal .modal-sheet {
  text-align: center;
}

#howToPlayModal .modal-handle {
  display: none;
}

@media (max-width: 420px) {
  .how-to-play-text {
    font-size: 15px;
  }

  .insights-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .graph-container {
    min-height: clamp(132px, 23vh, 260px);
  }

  body.game-active .graph-container {
    min-height: clamp(196px, 38vh, 320px);
  }

  .multiplier-value {
    font-size: 50px;
  }

  .multiplier-value.countdown {
    font-size: 34px;
  }

  body.game-active .multiplier-value {
    font-size: 64px;
  }

  .result-card {
    padding: 28px 24px;
  }

  .telegram-identity {
    max-width: 100%;
  }
}
