html,
body {
  min-height: 100%;
}

.roulette-page {
  width: 100%;
  min-height: calc(100vh - 90px);
  padding: 28px;
}

.roulette-shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.roulette-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.86)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 38%);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 26px;
  padding: 24px;
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.roulette-header h1 {
  color: #ffffff;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 10px;
}

.roulette-header p {
  max-width: 780px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.6;
}

.roulette-wallets {
  min-width: 360px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wallet-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 20px;
  padding: 18px;
}

.wallet-card span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 7px;
}

.wallet-card strong {
  color: #38bdf8;
  font-size: 28px;
  font-weight: 950;
  text-shadow: 0 0 26px rgba(56, 189, 248, 0.32);
}

.gems-wallet strong {
  color: #a78bfa;
  text-shadow: 0 0 26px rgba(167, 139, 250, 0.35);
}

.roulette-game-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at center, rgba(99, 102, 241, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(20, 28, 67, 0.98), rgba(10, 15, 40, 0.96));
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 30px;
  padding: 18px;
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.roulette-game-card::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -190px;
  top: -190px;
  background: rgba(236, 72, 153, 0.16);
  border-radius: 999px;
  filter: blur(100px);
  pointer-events: none;
}

.roulette-game-card::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  left: -190px;
  bottom: -190px;
  background: rgba(124, 58, 237, 0.17);
  border-radius: 999px;
  filter: blur(100px);
  pointer-events: none;
}

.roulette-game-card > * {
  position: relative;
  z-index: 2;
}

.roulette-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.round-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 16px;
  padding: 12px 14px;
}

.round-status span {
  width: 10px;
  height: 10px;
  background: #facc15;
  border-radius: 50%;
  box-shadow: 0 0 18px #facc15;
}

.round-status.betting span {
  background: #22c55e;
  box-shadow: 0 0 18px #22c55e;
}

.round-status.spinning span {
  background: #38bdf8;
  box-shadow: 0 0 18px #38bdf8;
}

.round-status.cooldown span {
  background: #f97316;
  box-shadow: 0 0 18px #f97316;
}

.live-round-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.live-round-meta div,
.current-bet-box,
.currency-toggle-btn {
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 16px;
  padding: 10px 13px;
}

.live-round-meta span,
.current-bet-box span,
.column-total span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.live-round-meta strong,
.current-bet-box strong,
.column-total strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
}

.roulette-arena {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 20px;
  background:
    radial-gradient(circle at center, rgba(99, 102, 241, 0.24), transparent 50%),
    linear-gradient(135deg, rgba(36, 43, 93, 0.92), rgba(23, 28, 65, 0.95));
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 24px;
  padding: 36px 0 36px;
}

.roulette-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  left: 50%;
  top: 50%;
  background: rgba(236, 72, 153, 0.15);
  border-radius: 999px;
  filter: blur(90px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.roulette-top-labels {
  position: relative;
  z-index: 5;
  min-height: 24px;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.result-pill {
  width: 39px;
  min-width: 39px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.red-pill {
  background: #ec3378;
}

.black-pill {
  background: #8b2be2;
}

.white-pill {
  color: #020617;
  background: #f8fafc;
}

.roulette-stage-text {
  position: relative;
  z-index: 5;
  text-align: center;
}

.roulette-stage-text strong {
  display: block;
  color: #ffffff;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1;
  letter-spacing: -1.4px;
  text-shadow: 0 0 34px rgba(56, 189, 248, 0.28);
}

.roulette-stage-text p {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 850;
}

.roulette-pointer,
.roulette-bottom-pointer {
  position: absolute;
  left: 50%;
  z-index: 8;
  transform: translateX(-50%);
  pointer-events: none;
}

.roulette-pointer {
  top: calc(50% + 16px);
}

.roulette-bottom-pointer {
  top: calc(50% + 110px);
  bottom: auto;
}

.roulette-pointer span,
.roulette-bottom-pointer span {
  display: block;
  width: 0;
  height: 0;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
}

.roulette-pointer span {
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 12px solid rgba(226, 232, 240, 0.52);
}

.roulette-bottom-pointer span {
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 12px solid rgba(226, 232, 240, 0.52);
}

.roulette-window {
  position: relative;
  z-index: 4;
  overflow: hidden;
  width: 100%;
  height: 108px;
  background: rgba(2, 6, 23, 0.18);
}

.roulette-window::before,
.roulette-window::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 18%;
  pointer-events: none;
}

.roulette-window::before {
  left: 0;
  background: linear-gradient(90deg, rgba(23, 28, 65, 1), transparent);
}

.roulette-window::after {
  right: 0;
  background: linear-gradient(270deg, rgba(23, 28, 65, 1), transparent);
}

.roulette-strip {
  height: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  transform: translateX(0);
  will-change: transform;
}

.roulette-tile {
  flex: 0 0 84px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.roulette-tile.red {
  background: linear-gradient(135deg, #fb4a86, #db2777);
}

.roulette-tile.black {
  background: linear-gradient(135deg, #9633e9, #6d28d9);
}

.roulette-tile.white {
  color: #111827;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  box-shadow:
    0 0 30px rgba(255, 255, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.recent-results,
.recent-results-list,
.history-pill {
  display: none !important;
}

.bet-control-panel {
  display: grid;
  gap: 12px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(129, 140, 248, 0.16);
  border-radius: 22px;
  padding: 16px;
}

.bet-summary {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.currency-toggle-btn {
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.currency-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  transform: translateY(-2px);
}

.currency-toggle-btn.gems-active {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.45);
}

.current-bet-box {
  min-width: 175px;
}

.current-bet-box strong {
  color: #38bdf8;
  font-size: 20px;
}

.current-bet-box.gems-mode strong {
  color: #a78bfa;
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}

.chip-btn {
  min-width: 68px;
  height: 44px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(129, 140, 248, 0.18), transparent 50%),
    linear-gradient(135deg, #202a5c, #121735);
  border: 1px solid rgba(129, 140, 248, 0.36);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.2s ease;
}

.chip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.2);
}

.gem-chip {
  border-color: rgba(167, 139, 250, 0.55);
}

.custom-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.input-box {
  min-width: 190px;
  flex: 1;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 16px;
  padding: 9px 12px;
}

.input-box span {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}

.input-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

.add-bet-btn,
.clear-bet-btn {
  border-radius: 15px;
  padding: 0 17px;
  min-height: 54px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: 0.2s ease;
}

.add-bet-btn {
  color: #031622;
  background: #38bdf8;
  border: 1px solid #38bdf8;
}

.clear-bet-btn {
  color: #ffffff;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(129, 140, 248, 0.28);
}

.live-bet-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bet-column {
  min-height: 290px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: 20px;
}

.place-color-bet {
  width: calc(100% - 20px);
  min-height: 54px;
  margin: 10px;
  border: none;
  border-radius: 10px;
  display: grid;
  gap: 3px;
  place-items: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.place-color-bet span {
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.82;
}

.place-color-bet strong {
  font-size: 14px;
  font-weight: 950;
}

.place-color-bet.white {
  color: #271500;
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.place-color-bet.red {
  color: #ffffff;
  background: linear-gradient(135deg, #fb4a86, #db2777);
}

.place-color-bet.black {
  color: #ffffff;
  background: linear-gradient(135deg, #9633e9, #6d28d9);
}

.place-color-bet:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.column-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 14px 12px;
  border-bottom: 1px solid rgba(129, 140, 248, 0.12);
}

.column-total strong {
  color: #cbd5e1;
}

.bet-list {
  display: grid;
  gap: 0;
}

.bet-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(129, 140, 248, 0.08);
}

.bet-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.025);
}

.bet-row img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.bet-name {
  min-width: 0;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-amount {
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.empty-bets {
  padding: 20px 14px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.fairness-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fairness-panel > div {
  min-width: 0;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: 20px;
  padding: 16px;
}

.fairness-panel h2 {
  color: #ffffff;
  font-size: 20px;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.fairness-panel p {
  overflow-wrap: anywhere;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 750;
}

.place-color-bet:disabled {
  opacity: 1;
  filter: none;
}

.place-color-bet:disabled:hover {
  transform: none;
}

button:disabled,
input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.place-color-bet:disabled {
  opacity: 1 !important;
  cursor: pointer;
}

@media (max-width: 1050px) {
  .roulette-header {
    flex-direction: column;
  }

  .roulette-wallets {
    min-width: 0;
    width: 100%;
  }

  .live-bet-columns {
    grid-template-columns: 1fr;
  }

  .fairness-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .roulette-page {
    padding: 22px 16px 42px;
  }

  .roulette-header,
  .roulette-game-card,
  .roulette-arena {
    border-radius: 22px;
  }

  .roulette-header,
  .roulette-game-card {
    padding: 18px;
  }

  .roulette-wallets {
    grid-template-columns: 1fr;
  }

  .roulette-live-top,
  .bet-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .live-round-meta {
    justify-content: flex-start;
  }

  .roulette-arena {
    min-height: 330px;
  }

  .roulette-window {
    height: 94px;
  }

  .roulette-tile {
    flex-basis: 68px;
    height: 66px;
    font-size: 16px;
  }

  .custom-row {
    flex-direction: column;
  }

  .input-box,
  .add-bet-btn,
  .clear-bet-btn,
  .currency-toggle-btn,
  .current-bet-box {
    width: 100%;
  }

  .chip-row {
    justify-content: center;
  }

  .roulette-pointer {
    top: 232px;
  }

  .roulette-bottom-pointer {
    bottom: 78px;
  }
}