:root {
  --bg: #0f1117;
  --bg-soft: #151922;
  --panel: rgba(24, 28, 38, 0.72);
  --panel-strong: rgba(27, 31, 42, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f7f8fb;
  --muted: #9aa3b5;
  --red: #ff2f4f;
  --orange: #ff8a22;
  --green: #23e08b;
  --gold: #ffc857;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --glow: 0 0 32px rgba(255, 47, 79, 0.34), 0 0 58px rgba(255, 138, 34, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 47, 79, 0.15), transparent 34%),
    radial-gradient(circle at 78% 3%, rgba(255, 138, 34, 0.14), transparent 30%),
    linear-gradient(135deg, var(--bg), #11141c 44%, var(--bg-soft));
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: -3;
}

.ambient {
  position: fixed;
  width: 42vw;
  height: 42vw;
  filter: blur(68px);
  opacity: 0.18;
  z-index: -2;
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

.ambient-one {
  left: -16vw;
  top: 12vh;
  background: #ff2f4f;
}

.ambient-two {
  right: -14vw;
  bottom: -12vh;
  background: #ff8a22;
  animation-delay: -4s;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 22px;
  align-content: center;
  background: #0b0d12;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.entry-disclaimer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 18, 0.94);
}

.entry-disclaimer.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.disclaimer-card {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
  padding: 30px 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 34, 0.94);
  text-align: center;
}

.disclaimer-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}

.disclaimer-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.loader-mark,
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: var(--glow);
}

.loader-line {
  width: min(240px, 62vw);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.loader-line span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--gold));
  animation: loadLine 1.1s ease-in-out infinite;
}

.app {
  width: min(1760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(28, 32, 43, 0.78), rgba(18, 21, 29, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.topbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 18px;
  z-index: 20;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border-radius: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  background: transparent;
}

.desktop-nav,
.drawer-nav {
  display: flex;
  gap: 6px;
}

.desktop-nav {
  margin-left: 18px;
}

.nav-link,
.drawer-nav button {
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 16px;
  background: transparent;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.drawer-nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.user-strip {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-btn,
.icon-btn,
.hamburger,
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  transition: 0.25s ease;
}

.music-btn.active,
.music-btn:hover,
.avatar:hover,
.hamburger:hover {
  background: rgba(255, 47, 79, 0.18);
  box-shadow: var(--glow);
}

.money-click {
  width: 50px;
  color: #baffdc;
  font-size: 13px;
  background: rgba(35, 224, 139, 0.12);
}

.money-click:hover {
  background: rgba(35, 224, 139, 0.2);
}

.hamburger {
  display: none;
}

.hamburger span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.balance-pill,
.login-btn,
.primary-btn,
.ghost-btn,
.cash-btn,
.mini-btn,
.chat-form button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 16px;
  color: var(--text);
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.balance-pill {
  background: rgba(35, 224, 139, 0.12);
  color: #baffdc;
}

.login-btn,
.primary-btn,
.chat-form button {
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: var(--glow);
}

.ghost-btn,
.cash-btn,
.mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.cash-btn {
  color: #bdffdf;
  background: rgba(35, 224, 139, 0.12);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.cash-btn:not(:disabled):hover,
.mini-btn:hover,
.chat-form button:hover,
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.content {
  min-width: 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: pageIn 0.45s ease both;
}

.hero {
  min-height: 520px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 24px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(110deg, rgba(255, 47, 79, 0.22), transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 80px);
  mask-image: linear-gradient(90deg, black, transparent 88%);
  pointer-events: none;
}

.hero-copy,
.hero-game {
  position: relative;
  z-index: 1;
}

.eyebrow,
.game-card span,
.stat span,
.wallet-card span,
.coef-box span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 12px 0;
  font-size: clamp(52px, 8vw, 116px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p {
  width: min(620px, 100%);
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-game {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.ticker-card {
  position: absolute;
  top: 34px;
  right: 18px;
  z-index: 2;
  min-width: 170px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.ticker-card span {
  color: var(--muted);
  font-size: 13px;
}

.ticker-card strong {
  display: block;
  margin-top: 6px;
  color: #fff1cf;
  font-size: 32px;
}

.orbital-board {
  width: min(390px, 72vw);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  transform: rotate(-8deg);
}

.orbital-board i {
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.03);
  animation: tilePulse 2.4s ease-in-out infinite;
}

.orbital-board i:nth-child(4n) {
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.7), rgba(255, 138, 34, 0.42));
  box-shadow: var(--glow);
}

.stat-grid,
.game-cards,
.two-col,
.wallet-grid,
.game-layout {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.stat-grid {
  grid-template-columns: repeat(4, 1fr);
}

.stat,
.panel,
.game-card,
.wallet-card,
.game-panel,
.side-panel {
  border-radius: 24px;
}

.stat {
  padding: 20px;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.section-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head {
  margin: 28px 0 14px;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

.game-cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.game-card {
  min-height: 230px;
  position: relative;
  overflow: hidden;
  padding: 24px;
  transition: 0.28s ease;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -44px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 47, 79, 0.24);
  filter: blur(8px);
}

.game-card strong {
  display: block;
  margin: 10px 0;
  font-size: 28px;
}

.game-card p {
  color: var(--muted);
  line-height: 1.55;
}

..game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 138, 34, 0.36);
  box-shadow: var(--shadow), var(--glow);
}

.case-result {
  display: grid;
  gap: 10px;
  min-height: 128px;
  padding: 24px;
  text-align: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-result.opening {
  animation: pulse 1.2s ease-in-out infinite alternate;
}

.case-result span {
  color: var(--muted);
}

.case-result strong {
  font-size: clamp(2rem, 3.2vw, 3rem);
  color: var(--gold);
}

.case-open-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.case-open-mode .mini-btn {
  flex: 1 1 160px;
  min-width: 140px;
}

.case-open-mode .mini-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.case-open-mode .mini-btn:hover {
  transform: translateY(-1px);
}

.cases-controls {
  grid-template-columns: 1fr minmax(160px, 1fr);
}

@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 200, 80, 0.12); }
  to { box-shadow: 0 0 0 18px rgba(255, 200, 80, 0); }
}

.coin-stage {
  min-height: 320px;
  display: grid;
  place-items: center;
  gap: 18px;
  margin-top: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 200, 87, 0.14), transparent 34%),
    rgba(9, 10, 14, 0.45);
}

.coin-face {
  width: min(230px, 58vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff7d6;
  font-size: clamp(40px, 8vw, 76px);
  font-weight: 900;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.72), transparent 12%),
    linear-gradient(135deg, #ffc857, #ff8a22 48%, #ff2f4f);
  box-shadow: 0 0 44px rgba(255, 138, 34, 0.34), inset 0 0 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.coin-face:hover {
  transform: translateY(-4px) rotate(-3deg);
  box-shadow: 0 0 70px rgba(255, 138, 34, 0.48), inset 0 0 32px rgba(0, 0, 0, 0.25);
}

.coin-face.flipping {
  animation: coinFlip 0.92s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coin-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
}

.coin-meta strong {
  color: #fff1cf;
  font-size: 34px;
}

.coin-choice {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.coin-choice > span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.segmented button {
  min-height: 38px;
  border-radius: 13px;
  color: var(--muted);
  background: rgba(9, 10, 14, 0.62);
  border: 1px solid var(--line);
}

.segmented button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: var(--glow);
}

.ladder-board {
  display: grid;
  gap: 10px;
  width: min(700px, 100%);
  margin: 22px auto 0;
}

.ladder-row {
  display: grid;
  grid-template-columns: 82px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.ladder-row.current .ladder-step {
  border-color: rgba(255, 138, 34, 0.42);
  box-shadow: 0 0 26px rgba(255, 138, 34, 0.15);
}

.ladder-rank {
  display: grid;
  place-items: center;
  height: 54px;
  border-radius: 18px;
  color: var(--muted);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.055);
}

.ladder-step {
  min-height: 54px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.ladder-step:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

.ladder-step.completed {
  opacity: 0.55;
}

.ladder-step.safe {
  color: #d9ffeb;
  background: linear-gradient(135deg, rgba(35, 224, 139, 0.88), rgba(22, 142, 91, 0.88));
}

.ladder-step.trap {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.96), rgba(143, 15, 34, 0.96));
}

.ladder-step.locked {
  opacity: 0.35;
}

.two-col,
.wallet-grid,
.game-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.panel,
.game-panel,
.side-panel,
.wallet-card {
  padding: 22px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #baffdc;
}

.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.wins-list,
.history-list,
.players-list,
.leaderboard,
.chat-feed {
  display: grid;
  gap: 10px;
}

.win-row,
.history-row,
.player-row,
.leader-row,
.chat-msg,
.transaction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.mini-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.8), rgba(255, 138, 34, 0.66));
  color: white;
  font-weight: 900;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.amount {
  color: #baffdc;
  font-weight: 900;
}

.pulse-bars {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 22px;
}

.pulse-bars i {
  flex: 1;
  min-width: 9px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--orange), var(--red));
  box-shadow: 0 0 22px rgba(255, 47, 79, 0.22);
  animation: barPulse 1.8s ease-in-out infinite alternate;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 14px;
}

label,
.coef-box {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 13px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(9, 10, 14, 0.62);
}

select option {
  background: #151922;
}

.coef-box strong {
  color: var(--text);
  font-size: 22px;
}

.mines-board {
  --grid: 6;
  display: grid;
  grid-template-columns: repeat(var(--grid), minmax(0, 1fr));
  gap: 9px;
  width: min(680px, 100%);
  margin: 20px auto 0;
}

.mine-cell {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: clamp(12px, 2vw, 20px);
  color: #fff;
  font-size: clamp(16px, 2.4vw, 28px);
  font-weight: 900;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.035);
  transition: transform 0.18s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.mine-cell:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--glow);
}

.mine-cell.safe {
  background: linear-gradient(135deg, rgba(35, 224, 139, 0.9), rgba(22, 142, 91, 0.9));
  animation: popCell 0.28s ease both;
}

.mine-cell.mine {
  background: linear-gradient(135deg, rgba(255, 47, 79, 0.96), rgba(143, 15, 34, 0.96));
  animation: shakeCell 0.32s ease both;
}

.mine-cell:disabled {
  cursor: default;
}

.crash-stage {
  position: relative;
  height: min(440px, 52vh);
  min-height: 300px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    rgba(9, 10, 14, 0.5);
  background-size: 44px 44px;
  border: 1px solid var(--line);
}

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

.crash-state {
  position: absolute;
  left: 20px;
  top: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff1cf;
  font-weight: 900;
  background: rgba(255, 138, 34, 0.12);
}

.crash-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.result-pill {
  padding: 9px 11px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.075);
}

.result-pill.hot {
  background: rgba(35, 224, 139, 0.18);
  color: #baffdc;
}

.result-pill.low {
  background: rgba(255, 47, 79, 0.16);
  color: #ffc7d0;
}

.compact {
  margin-top: 16px;
}

.wallet-card {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.wallet-card strong {
  font-size: clamp(44px, 7vw, 76px);
}

.money-big-btn {
  min-width: min(260px, 100%);
}

.leaderboard-panel {
  max-width: 900px;
}

.chat {
  position: sticky;
  top: 110px;
  height: calc(100vh - 128px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
}

.chat-feed {
  overflow: auto;
  align-content: start;
  padding-right: 2px;
}

.chat-msg {
  align-items: start;
  justify-content: start;
  animation: msgIn 0.28s ease both;
}

.chat-msg p {
  margin: 2px 0 0;
  color: #d7dce8;
  line-height: 1.4;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(360px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 18px;
  color: white;
  background: rgba(24, 28, 38, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: toastIn 0.28s ease both;
}

.toast.good {
  border-color: rgba(35, 224, 139, 0.34);
}

.toast.bad {
  border-color: rgba(255, 47, 79, 0.42);
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
}

.mobile-drawer.open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  width: min(330px, 86vw);
  right: auto;
  padding: 18px;
  background: rgba(12, 14, 20, 0.96);
  border-right: 1px solid var(--line);
  transform: translateX(-18px);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.drawer-nav {
  flex-direction: column;
}

.reveal {
  animation: revealUp 0.72s ease both;
}

@keyframes floatGlow {
  to { transform: translate3d(30px, -22px, 0) scale(1.05); }
}

@keyframes loadLine {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(230%); }
}

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

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

@keyframes tilePulse {
  50% { transform: translateY(-8px); filter: brightness(1.3); }
}

@keyframes barPulse {
  to { filter: brightness(1.35); transform: scaleY(0.92); }
}

@keyframes popCell {
  from { transform: scale(0.78) rotate(-4deg); }
  to { transform: scale(1) rotate(0); }
}

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

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes coinFlip {
  0% { transform: rotateY(0) scale(1); }
  45% { transform: rotateY(900deg) scale(1.08); }
  100% { transform: rotateY(1800deg) scale(1); }
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: 1fr;
  }

  .chat {
    position: static;
    height: 430px;
  }

  .game-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .app {
    padding: 12px;
    gap: 12px;
  }

  .topbar {
    top: 12px;
    height: auto;
    border-radius: 20px;
  }

  .hamburger {
    display: grid;
  }

  .desktop-nav {
    display: none;
  }

  .logo span:last-child,
  .login-btn {
    display: none;
  }

  .hero,
  .game-layout,
  .two-col,
  .wallet-grid,
  .game-cards {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 28px;
  }

  .hero h1 {
    font-size: clamp(48px, 16vw, 78px);
  }

  .hero-game {
    min-height: 300px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .control-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .user-strip {
    gap: 6px;
  }

  .music-btn,
  .avatar,
  .hamburger {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .balance-pill {
    min-height: 40px;
    padding: 0 12px;
  }

  .stat-grid,
  .control-grid,
  .crash-controls {
    grid-template-columns: 1fr;
  }

  .hero p {
    font-size: 15px;
  }

  .mines-board {
    gap: 6px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }
}
