:root {
  color-scheme: dark;
  --bg: #07050f;
  --panel: rgba(18, 18, 33, 0.78);
  --panel-strong: rgba(28, 24, 47, 0.92);
  --text: #fbfbff;
  --muted: #b8b4ce;
  --line: rgba(255, 255, 255, 0.14);
  --pink: #ff347d;
  --gold: #ffd84a;
  --lime: #71ff7a;
  --cyan: #27e9ff;
  --violet: #8f5cff;
  --danger: #ff4b4b;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 52, 125, 0.28), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(39, 233, 255, 0.22), transparent 26rem),
    linear-gradient(135deg, #07050f 0%, #151024 45%, #130813 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

#sparkCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 52, 125, 0.96), rgba(255, 216, 74, 0.92)),
    #ff347d;
  color: #150812;
  font-size: 1.6rem;
  font-weight: 950;
  box-shadow: 0 0 32px rgba(255, 52, 125, 0.55);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1.02rem;
  letter-spacing: 0;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #e5e2f3;
  font-size: 0.92rem;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.wallet-button,
.primary-action,
.secondary-action,
.spin-button,
.quick-bets button {
  border: 0;
  border-radius: 10px;
  color: var(--text);
  transition:
    transform 180ms ease,
    filter 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.wallet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.wallet-button:hover,
.primary-action:hover,
.secondary-action:hover,
.spin-button:hover,
.quick-bets button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.wallet-dot,
.signal {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 14px var(--danger);
}

.wallet-button.connected .wallet-dot,
.signal.connected {
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 42px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(4rem, 12vw, 9.6rem);
  line-height: 0.84;
  letter-spacing: 0;
  text-shadow:
    0 0 22px rgba(255, 52, 125, 0.78),
    0 0 54px rgba(39, 233, 255, 0.26);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
}

h3 {
  margin-bottom: 9px;
  font-size: 1.1rem;
}

.hero-lead {
  max-width: 660px;
  margin-bottom: 28px;
  color: #ded9f1;
  font-size: clamp(1.06rem, 2vw, 1.35rem);
  line-height: 1.55;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  font-weight: 850;
}

.primary-action {
  background: linear-gradient(135deg, var(--pink), var(--gold));
  color: #1a0810;
  box-shadow: 0 18px 42px rgba(255, 52, 125, 0.24);
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.hero-machine,
.game-panel,
.side-panel > *,
.game-card,
.activity-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-machine {
  position: relative;
  overflow: hidden;
  padding: 22px;
  min-height: 420px;
  isolation: isolate;
}

.hero-machine::after {
  position: absolute;
  inset: auto 10% -30px;
  z-index: -1;
  height: 160px;
  border-radius: 50%;
  background: rgba(113, 255, 122, 0.32);
  filter: blur(42px);
  content: "";
}

.machine-glow {
  position: absolute;
  inset: -2px;
  z-index: -1;
  background:
    conic-gradient(from 90deg, transparent, rgba(255, 52, 125, 0.42), transparent, rgba(39, 233, 255, 0.35), transparent),
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 42%);
  animation: rotateGlow 7s linear infinite;
}

.machine-top,
.ticker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.machine-top span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(113, 255, 122, 0.16);
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
}

.machine-top strong {
  color: #fff;
}

.mini-reels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 52px 0;
}

.mini-reels span {
  display: grid;
  min-height: 148px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    #171222;
  color: var(--gold);
  font-size: clamp(1.15rem, 4vw, 2.2rem);
  font-weight: 950;
  text-shadow: 0 0 18px rgba(255, 216, 74, 0.6);
  animation: floatReel 2.8s ease-in-out infinite;
}

.mini-reels span:nth-child(2) {
  color: var(--pink);
  animation-delay: 220ms;
}

.mini-reels span:nth-child(3) {
  color: var(--cyan);
  animation-delay: 440ms;
}

.ticker {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.ticker span,
.result-row span,
.stats-band span,
.field span,
.activity-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.ticker strong {
  color: var(--lime);
  font-size: 1.1rem;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stats-band div {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: rgba(18, 18, 33, 0.74);
}

.stats-band strong {
  font-size: 1.05rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
  padding: 28px 0;
}

.game-panel,
.balance-card,
.cashier-card,
.stats-card,
.wallet-card,
.paytable,
.activity-list {
  padding: clamp(18px, 3vw, 28px);
}

.side-panel {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  gap: 18px;
}

.blackjack-panel,
.roulette-panel {
  grid-column: 1;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-heading.compact {
  margin-bottom: 14px;
}

.status-pill {
  min-width: 86px;
  padding: 8px 10px;
  border: 1px solid rgba(113, 255, 122, 0.28);
  border-radius: 999px;
  background: rgba(113, 255, 122, 0.1);
  color: var(--lime);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
}

.status-pill.spinning {
  border-color: rgba(255, 216, 74, 0.38);
  background: rgba(255, 216, 74, 0.12);
  color: var(--gold);
}

.slot-machine {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 18px);
  overflow: hidden;
  padding: clamp(14px, 2.4vw, 22px);
  border: 1px solid rgba(255, 216, 74, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(255, 216, 74, 0.12) 7%, transparent 8% 92%, rgba(255, 52, 125, 0.12) 93%, transparent 94%),
    radial-gradient(circle at 50% 50%, rgba(255, 216, 74, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 58px rgba(255, 52, 125, 0.12),
    0 22px 64px rgba(0, 0, 0, 0.34);
}

.win-line {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  z-index: 3;
  height: 4px;
  background:
    linear-gradient(90deg, transparent, var(--gold), #fff, var(--gold), transparent);
  box-shadow:
    0 0 18px rgba(255, 216, 74, 0.8),
    0 0 44px rgba(255, 52, 125, 0.34);
  transform: translateY(-50%);
}

.win-line::before,
.win-line::after {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 28px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 22px rgba(255, 216, 74, 0.85);
  content: "";
  transform: translateY(-50%);
}

.win-line::before {
  left: 0;
}

.win-line::after {
  right: 0;
}

.reel {
  position: relative;
  overflow: hidden;
  height: clamp(190px, 28vw, 270px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 18% 82%, rgba(0, 0, 0, 0.26)),
    linear-gradient(180deg, #06050d 0%, #261733 48%, #080611 100%);
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.74),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 26px rgba(39, 233, 255, 0.08);
}

.reel::before {
  top: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 8px);
}

.reel::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
}

.reel .speed-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.1) 19px 20px,
      transparent 21px 38px
    );
  opacity: 0;
  transform: translateY(-30%);
}

.reel::before,
.reel::after {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  height: 28%;
  pointer-events: none;
  content: "";
}

.reel-strip {
  display: grid;
  transition: transform 1200ms cubic-bezier(0.08, 0.78, 0.1, 1);
  will-change: transform;
}

.symbol-tile {
  position: relative;
  display: grid;
  height: clamp(190px, 28vw, 270px);
  place-items: center;
  overflow: hidden;
  padding: 16px 10px;
  color: var(--gold);
  text-align: center;
  isolation: isolate;
}

.symbol-tile::before {
  position: absolute;
  inset: 18%;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 44%),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.28);
  content: "";
}

.symbol-halo {
  position: absolute;
  inset: 24%;
  z-index: -2;
  border-radius: 999px;
  background: currentColor;
  filter: blur(28px);
  opacity: 0.28;
}

.symbol-mark {
  display: grid;
  min-width: min(88%, 150px);
  min-height: 76px;
  place-items: center;
  border-radius: 12px;
  color: currentColor;
  font-size: clamp(1.65rem, 4.8vw, 3.6rem);
  font-weight: 950;
  line-height: 0.95;
  text-shadow: 0 0 20px currentColor;
}

.symbol-tier {
  position: absolute;
  left: 50%;
  bottom: 17%;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.symbol-seven,
.symbol-x2 {
  color: var(--gold);
}

.symbol-clos,
.symbol-bonk {
  color: var(--pink);
}

.symbol-sol,
.symbol-rocket {
  color: var(--cyan);
}

.symbol-moon,
.symbol-lambo {
  color: var(--lime);
}

.symbol-wif {
  color: var(--violet);
}

.reel.spinning .reel-strip {
  filter: saturate(1.35) blur(0.8px);
}

.reel.spinning .symbol-mark {
  filter: blur(1.2px);
}

.reel.spinning .speed-lines {
  opacity: 1;
  animation: reelRush 180ms linear infinite;
}

.reel.locked {
  animation: reelLock 420ms ease-out;
  border-color: rgba(255, 216, 74, 0.45);
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.74),
    0 0 30px rgba(255, 216, 74, 0.22);
}

.controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.blackjack-table {
  position: relative;
  display: grid;
  gap: 16px;
  overflow: hidden;
  min-height: 520px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid rgba(113, 255, 122, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(113, 255, 122, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(16, 86, 62, 0.78), rgba(18, 16, 38, 0.9)),
    rgba(0, 0, 0, 0.24);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.44),
    0 22px 64px rgba(0, 0, 0, 0.28);
}

.blackjack-table::before {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 216, 74, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.blackjack-hand {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.hand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hand-top span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hand-top strong {
  color: var(--gold);
  font-size: 1.25rem;
}

.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 128px;
  align-items: center;
}

.playing-card {
  position: relative;
  display: grid;
  width: clamp(78px, 10vw, 104px);
  height: clamp(112px, 14vw, 148px);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(226, 230, 242, 0.95)),
    #fff;
  color: #11131d;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  transform: rotate(var(--tilt, -1deg));
  animation: cardIn 240ms ease-out;
}

.playing-card:nth-child(2n) {
  --tilt: 1.5deg;
}

.playing-card:nth-child(3n) {
  --tilt: -2deg;
}

.playing-card.red {
  color: #d9224b;
}

.playing-card.black {
  color: #151827;
}

.playing-card.hidden {
  border-color: rgba(255, 216, 74, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 52, 125, 0.9), rgba(39, 233, 255, 0.86)),
    #171222;
  color: #fff;
}

.playing-card strong {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.playing-card small {
  position: absolute;
  right: 9px;
  bottom: 8px;
  font-size: 0.78rem;
  font-weight: 950;
}

.blackjack-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 74px;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}

.blackjack-center span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.blackjack-center strong {
  color: var(--lime);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  text-align: center;
  text-shadow: 0 0 18px rgba(113, 255, 122, 0.32);
}

.blackjack-controls {
  grid-template-columns: minmax(160px, 1fr) repeat(3, auto);
}

.table-button {
  min-width: 88px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 850;
  transition:
    transform 180ms ease,
    background 180ms ease,
    filter 180ms ease;
}

.table-button.deal {
  border: 0;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  color: #19040b;
}

.table-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.table-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.roulette-table {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  overflow: hidden;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid rgba(255, 216, 74, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 50%, rgba(255, 52, 125, 0.22), transparent 34%),
    radial-gradient(circle at 78% 50%, rgba(39, 233, 255, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(19, 13, 31, 0.92), rgba(8, 8, 16, 0.92));
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.42),
    0 22px 64px rgba(0, 0, 0, 0.28);
}

.roulette-wheel-wrap {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
}

.roulette-pointer {
  position: absolute;
  top: 6px;
  z-index: 4;
  width: 0;
  height: 0;
  border-right: 14px solid transparent;
  border-left: 14px solid transparent;
  border-top: 34px solid var(--gold);
  filter: drop-shadow(0 0 14px rgba(255, 216, 74, 0.78));
}

.roulette-wheel {
  position: relative;
  display: grid;
  width: min(300px, 72vw);
  aspect-ratio: 1;
  place-items: center;
  border: 12px solid #17101f;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0a0710 0 23%, transparent 24%),
    repeating-conic-gradient(
      from -4deg,
      #1ab56f 0deg 9.7deg,
      #d91f4f 9.7deg 19.4deg,
      #12131a 19.4deg 29.1deg
    );
  box-shadow:
    inset 0 0 0 8px rgba(255, 216, 74, 0.42),
    inset 0 0 44px rgba(0, 0, 0, 0.84),
    0 0 44px rgba(255, 52, 125, 0.2);
  transition: transform 2500ms cubic-bezier(0.08, 0.76, 0.14, 1);
}

.roulette-wheel::before {
  position: absolute;
  inset: 26px;
  border: 2px dashed rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  content: "";
}

.roulette-center {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 216, 74, 0.44);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 216, 74, 0.18), transparent 54%),
    #100b16;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.55);
}

.roulette-center span {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 950;
  line-height: 1;
}

.roulette-center strong {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 950;
}

.roulette-center strong.red {
  color: var(--pink);
}

.roulette-center strong.black {
  color: #f3f5ff;
}

.roulette-center strong.green {
  color: var(--lime);
}

.roulette-board {
  display: grid;
  gap: 14px;
}

.roulette-result {
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-weight: 850;
}

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

.roulette-cell {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

.roulette-cell.red {
  background: rgba(217, 31, 79, 0.8);
}

.roulette-cell.black {
  background: rgba(12, 13, 20, 0.9);
}

.roulette-cell.green {
  background: rgba(26, 181, 111, 0.86);
}

.roulette-controls {
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 1fr) minmax(86px, 0.5fr) auto;
}

.field {
  display: grid;
  gap: 7px;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 13px;
  outline: none;
}

.field select {
  appearance: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(39, 233, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(39, 233, 255, 0.12);
}

.field.hidden {
  display: none;
}

.quick-bets {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 8px;
}

.quick-bets button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  font-weight: 850;
}

.spin-button {
  position: relative;
  min-width: 132px;
  min-height: 56px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: #03100e;
  font-size: 1.04rem;
  font-weight: 950;
  box-shadow: 0 18px 46px rgba(39, 233, 255, 0.24);
}

.spin-button.skip-mode {
  background: linear-gradient(135deg, var(--gold), var(--pink));
  color: #19040b;
  box-shadow: 0 18px 46px rgba(255, 52, 125, 0.28);
}

.spin-button::before {
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 52%;
  background: rgba(255, 255, 255, 0.55);
  content: "";
  transform: skewX(-18deg);
  animation: buttonShine 2.6s ease-in-out infinite;
}

.spin-button span {
  position: relative;
}

.spin-button:disabled,
.wallet-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.result-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.result-row div {
  display: grid;
  gap: 7px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.result-row strong {
  font-size: 1.05rem;
}

.balance-card p,
.stats-card p,
.wallet-card p,
.game-card p {
  color: var(--muted);
  line-height: 1.5;
}

.balance-amount {
  margin-bottom: 10px;
  color: var(--lime);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 18px rgba(113, 255, 122, 0.34);
}

.balance-sol {
  margin: -2px 0 12px;
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 850;
}

.balance-actions {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.balance-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(113, 255, 122, 0.28);
  border-radius: 8px;
  background: rgba(113, 255, 122, 0.12);
  color: var(--lime);
  font-weight: 850;
  transition:
    transform 180ms ease,
    background 180ms ease,
    filter 180ms ease;
}

.balance-button:hover {
  transform: translateY(-1px);
  background: rgba(113, 255, 122, 0.18);
  filter: brightness(1.08);
}

.balance-button.test {
  border-color: rgba(39, 233, 255, 0.32);
  background: rgba(39, 233, 255, 0.12);
  color: var(--cyan);
}

.balance-button.test:hover {
  background: rgba(39, 233, 255, 0.18);
}

.balance-button.withdraw {
  border-color: rgba(255, 216, 74, 0.32);
  background: rgba(255, 216, 74, 0.12);
  color: var(--gold);
}

.balance-button.withdraw:hover {
  background: rgba(255, 216, 74, 0.18);
}

.rate-box {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 216, 74, 0.22);
  border-radius: 8px;
  background: rgba(255, 216, 74, 0.08);
}

.rate-box span,
.cashier-quote {
  color: var(--muted);
  font-size: 0.84rem;
}

.rate-box strong {
  color: var(--gold);
}

.cashier-form {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cashier-form + .cashier-form {
  margin-top: 16px;
}

.cashier-quote {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  line-height: 1.35;
}

.stat-list {
  display: grid;
  gap: 10px;
}

.stat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.stat-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-list strong {
  color: var(--cyan);
  text-align: right;
}

.address-box {
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: #e9e4fa;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paytable ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.paytable li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.paytable span {
  color: #e7e2f6;
  font-size: 0.94rem;
}

.paytable strong {
  color: var(--gold);
}

.games-section,
.activity-section {
  padding: 44px 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.game-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 20px;
}

.game-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 52, 125, 0.18), transparent 48%, rgba(39, 233, 255, 0.16));
  opacity: 0;
  content: "";
  transition: opacity 180ms ease;
}

.game-card:hover::before,
.game-card.active::before {
  opacity: 1;
}

.game-card > * {
  position: relative;
}

.game-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 950;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.activity-item strong {
  text-align: right;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(390px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(11, 9, 19, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes floatReel {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes reelRush {
  from {
    transform: translateY(-34%);
  }

  to {
    transform: translateY(34%);
  }
}

@keyframes reelLock {
  0% {
    transform: translateY(-8px) scale(1.01);
  }

  48% {
    transform: translateY(5px) scale(0.99);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes buttonShine {
  0%,
  45% {
    transform: translateX(0) skewX(-18deg);
  }

  100% {
    transform: translateX(410%) skewX(-18deg);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(var(--tilt, -1deg)) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--tilt, -1deg)) scale(1);
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
  }

  .hero-shell,
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .blackjack-panel,
  .roulette-panel,
  .side-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-shell {
    min-height: auto;
  }

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

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

  .blackjack-controls,
  .roulette-controls,
  .roulette-table {
    grid-template-columns: 1fr;
  }

  .quick-bets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  main,
  .topbar {
    width: min(100% - 22px, 1180px);
  }

  .brand-copy small,
  .nav-links {
    display: none;
  }

  .wallet-button {
    max-width: 178px;
    padding: 0 11px;
    font-size: 0.82rem;
  }

  .hero-shell {
    padding-top: 28px;
  }

  h1 {
    font-size: 4.1rem;
  }

  .hero-machine {
    min-height: auto;
  }

  .mini-reels {
    margin: 34px 0;
  }

  .stats-band,
  .games-grid,
  .result-row {
    grid-template-columns: 1fr;
  }

  .slot-machine {
    gap: 7px;
  }

  .blackjack-table {
    min-height: auto;
  }

  .roulette-wheel-wrap {
    min-height: 260px;
  }

  .reel,
  .symbol-tile {
    height: 166px;
  }

  .symbol-mark {
    min-height: 58px;
    font-size: 1.35rem;
  }

  .symbol-tier {
    bottom: 15%;
    font-size: 0.58rem;
  }

  .panel-heading,
  .section-heading,
  .activity-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-item strong {
    text-align: left;
  }
}

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