:root {
  --bg-main: #1A2C38;
  --bg-secondary: #0F212E;
  --bg-surface: #213743;
  --bg-hover: #2F4553;
  --accent-blue: #1475E1;
  --accent-blue-hover: #105EB8;
  --accent-green: #00E701;
  --accent-green-hover: #00C701;
  --accent-green-text: #071824;
  --text-primary: #FFFFFF;
  --text-secondary: #B1BAD3;
  --border-subtle: #2F4553;
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  background: var(--bg-main);
  scrollbar-color: var(--bg-hover) var(--bg-secondary);
  scrollbar-width: thin;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}

:is(h1, h2, h3, h4) {
  letter-spacing: -0.02em;
}

:is(button, input, select, textarea) {
  font: inherit;
}

button,
input[type="submit"],
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgb(20 117 225 / 40%);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: var(--bg-hover);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body.site-shell-enabled #sideMenu,
body.site-shell-enabled #menuOverlay {
  display: none !important;
}

body.site-shell-enabled .site-content .main-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0 24px;
  border-color: transparent !important;
  background: transparent !important;
}

body.site-shell-enabled .site-content .banner-section {
  margin-bottom: 8px;
}

body.site-shell-enabled .site-content .banner {
  position: relative;
  height: 360px;
  min-height: 360px;
  aspect-ratio: auto;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: 0 10px 24px rgb(0 0 0 / 14%);
}

body.site-shell-enabled .site-content .banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.site-shell-enabled .site-content .category-bar {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  padding: 2px 1px 9px;
}

body.site-shell-enabled .site-content .game-section[hidden] {
  display: none !important;
}

body.site-shell-enabled .site-content .category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

body.site-shell-enabled .site-content .category:hover {
  border-color: var(--bg-hover);
  background: var(--bg-hover);
  color: var(--text-primary);
}

body.site-shell-enabled .site-content .category.active {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
  color: var(--text-primary);
}

body.site-shell-enabled .site-content .search-section {
  width: 100%;
  max-width: none;
  margin: 0 0 22px;
}

body.site-shell-enabled .site-content .game-preferences-status {
  min-height: 18px;
  margin: -12px 0 8px;
  color: var(--text-secondary);
  font-size: 11px;
}

body.site-shell-enabled .site-content .search-section img {
  width: 19px;
  left: 14px;
}

body.site-shell-enabled .site-content #search {
  min-height: 44px;
  padding: 10px 14px 10px 42px;
  border: 2px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font: inherit;
}

body.site-shell-enabled .site-content #search:focus {
  border-color: var(--accent-blue);
  outline: 2px solid rgb(20 117 225 / 18%);
  outline-offset: 1px;
}

body.site-shell-enabled .site-content .game-section {
  margin-top: 30px;
}

body.site-shell-enabled .site-content .heading-seeMore-section {
  margin-bottom: 14px;
}

body.site-shell-enabled .site-content .heading-section h2 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.site-shell-enabled .site-content .heading-section small,
body.site-shell-enabled .site-content .game-provider {
  color: var(--text-secondary);
}

body.site-shell-enabled .site-content .seeMore-section {
  color: var(--text-secondary);
  font-weight: 600;
}

body.site-shell-enabled .site-content .seeMore-section:hover {
  color: var(--accent-blue);
}

body.site-shell-enabled .site-content .games-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: 14px;
  overflow: visible;
  padding: 2px 2px 8px;
}

body.site-shell-enabled .site-content .game-card {
  width: auto;
  min-width: 0;
  height: auto;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: 0 8px 18px rgb(0 0 0 / 14%);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

body.site-shell-enabled .site-content .game-card:hover {
  border-color: var(--bg-hover);
  box-shadow: 0 14px 24px rgb(0 0 0 / 24%);
  transform: translateY(-4px);
}

body.site-shell-enabled .site-content .game-card:focus-visible,
body.site-shell-enabled .site-content .category:focus-visible {
  outline: 3px solid var(--accent-green);
  outline-offset: 3px;
}

body.site-shell-enabled .site-content .game-card[hidden] {
  display: none !important;
}

body.site-shell-enabled .site-content .game-card img {
  transition: transform 220ms ease;
}

body.site-shell-enabled .site-content .game-card:hover img {
  transform: scale(1.035);
}

body.site-shell-enabled .site-content .game-overlay {
  padding: 42px 12px 12px;
  background: linear-gradient(transparent, rgb(7 24 36 / 94%));
}

body.site-shell-enabled .site-content .game-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

body.site-shell-enabled .site-content .game-provider {
  margin-top: 4px;
  font-size: 11px;
}

body.site-shell-enabled .site-content .game-badge {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--accent-green);
  color: var(--accent-green-text);
  box-shadow: 0 3px 8px rgb(0 0 0 / 30%);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body.site-shell-enabled .site-content .game-favourite {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 16%) !important;
  border-radius: 50%;
  background: rgb(15 33 46 / 88%) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
  font-size: 18px;
  line-height: 1;
}

body.site-shell-enabled .site-content .game-favourite.is-active {
  background: var(--accent-blue) !important;
  color: var(--text-primary) !important;
}

body.site-shell-enabled .site-content .stake-promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 8px;
}

body.site-shell-enabled .site-content .stake-promo-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: 0 10px 22px rgb(0 0 0 / 16%);
  transition: transform 180ms ease, border-color 180ms ease;
}

body.site-shell-enabled .site-content .stake-promo-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  bottom: -100px;
  border-radius: 50%;
  background: rgb(20 117 225 / 25%);
}

body.site-shell-enabled .site-content .stake-promo-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
}

body.site-shell-enabled .site-content .stake-promo-card--vip::after { background: rgb(0 231 1 / 16%); }
body.site-shell-enabled .site-content .stake-promo-card--challenge::after { background: rgb(217 169 58 / 18%); }
body.site-shell-enabled .site-content .stake-promo-kicker { display: block; margin-bottom: 20px; color: var(--text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
body.site-shell-enabled .site-content .stake-promo-card strong { display: block; font-size: 22px; }
body.site-shell-enabled .site-content .stake-promo-card p { max-width: 260px; color: var(--text-secondary); line-height: 1.5; }
body.site-shell-enabled .site-content .stake-promo-action { position: absolute; z-index: 2; left: 22px; bottom: 18px; color: var(--accent-blue); font-size: 12px; font-weight: 800; }

@media (max-width: 760px) {
  body.site-shell-enabled .site-content .stake-promo-grid { grid-template-columns: 1fr; }
  body.site-shell-enabled .site-content .stake-promo-card { min-height: 155px; }
}

body.site-shell-enabled .site-content .game-count,
body.site-shell-enabled .site-content .home-activity-note {
  color: var(--text-secondary);
  font-size: 12px;
}

body.site-shell-enabled .site-content .game-empty-state {
  margin: 4px 0 0;
  padding: 18px;
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  text-align: center;
}

body.site-shell-enabled .site-content .game-empty-state[hidden] {
  display: none;
}

body.site-shell-enabled .site-content .hr-container {
  margin: 36px 0 20px;
  border-color: var(--border-subtle);
}

body.site-shell-enabled .site-content .hr-text {
  background: var(--bg-main);
  color: var(--text-secondary);
  letter-spacing: .08em;
}

body.site-shell-enabled .site-content .winner-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.site-shell-enabled .site-content .winner-card {
  min-height: 64px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-surface);
  transition: border-color 160ms ease, background 160ms ease;
}

body.site-shell-enabled .site-content .winner-card:nth-child(even) {
  background: var(--bg-main);
}

body.site-shell-enabled .site-content .winner-card:hover {
  border-color: var(--bg-hover);
}

body.site-shell-enabled .site-content .winner-avatar {
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--text-primary);
}

body.site-shell-enabled .site-content .winner-name {
  color: var(--text-primary);
}

body.site-shell-enabled .site-content .winner-game {
  color: var(--text-secondary);
}

body.site-shell-enabled .site-content .winner-amount {
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
}

body.site-shell-enabled footer {
  border-color: var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

@media (max-width: 760px) {
  body.site-shell-enabled .site-content .main-container {
    padding-bottom: 8px;
  }

  body.site-shell-enabled .site-content .games-row {
    grid-template-columns: repeat(auto-fill, minmax(min(135px, 47%), 1fr));
    gap: 10px;
  }

  body.site-shell-enabled .site-content .winner-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  body.site-shell-enabled .site-content .games-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.site-guest > header:not(.site-topbar),
body.site-guest .side-menu,
body.site-guest .menu-overlay,
body.site-guest .wallet-details-overlay {
  display: none !important;
}

body.site-guest .site-topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.site-guest .site-bottom-nav {
  display: none !important;
}

body.site-guest .site-topbar__right {
  grid-column: 2;
  gap: 9px;
}

.site-auth-button,
.site-auth-button:hover,
.guest-promo__register,
.guest-promo__signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.site-auth-button--register,
.site-auth-button--register:hover,
.guest-promo__register {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-text);
}

.site-auth-button--register:hover,
.guest-promo__register:hover {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
}

.site-auth-button--signin,
.site-auth-button--signin:hover,
.guest-promo__signin {
  border-color: rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 10%);
  color: var(--color-text);
  backdrop-filter: blur(8px);
}

.site-auth-button--signin:hover,
.guest-promo__signin:hover {
  background: rgb(255 255 255 / 17%);
}

.site-auth-button:focus-visible,
.guest-promo-card :focus-visible {
  outline: 3px solid var(--accent-green);
  outline-offset: 3px;
}

.guest-promo-overlay {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(3 9 16 / 78%);
  backdrop-filter: blur(5px);
}

.guest-promo-overlay[hidden] {
  display: none;
}

.guest-promo-card {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-secondary);
  box-shadow: 0 28px 80px rgb(0 0 0 / 48%);
  animation: guest-promo-enter 220ms ease-out both;
}

.guest-promo__close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 50%;
  background: rgb(8 15 24 / 72%);
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}

.guest-promo__image {
  display: block;
  width: 100%;
  max-height: 170px;
  object-fit: cover;
  object-position: center;
}

.guest-promo__copy {
  padding: 22px 24px 24px;
  text-align: center;
}

.guest-promo__eyebrow {
  margin: 0 0 8px;
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.guest-promo__copy h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(22px, 5vw, 29px);
}

.guest-promo__copy > p:not(.guest-promo__eyebrow) {
  margin: 10px 0 20px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guest-promo__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes guest-promo-enter {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.guest-promo-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  body.site-guest .site-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    height: var(--site-header-height);
    padding: 0 12px;
  }

  body.site-guest .site-topbar__left {
    grid-column: 1;
    grid-row: 1;
  }

  body.site-guest .site-topbar__right {
    grid-column: 2;
    grid-row: 1;
    width: auto;
  }

  .site-auth-button {
    min-height: 36px;
    padding: 0 12px;
  }

  .guest-promo__image {
    max-height: 130px;
  }

  .guest-promo__copy {
    padding: 20px 17px;
  }
}

.wallet-toast-root {
  position: fixed;
  z-index: 1200;
  top: 82px;
  right: 18px;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.wallet-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  box-sizing: border-box;
  padding: 18px 16px 14px 14px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-left: 3px solid #e8ad36;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d2b3c, #111b2b);
  box-shadow: 0 16px 40px rgb(0 0 0 / 38%);
  color: #fff;
  pointer-events: auto;
  animation: wallet-toast-in 320ms cubic-bezier(.2, .8, .2, 1) both;
}

.wallet-toast--success {
  border-left-color: #42cf83;
}

.wallet-toast--failed {
  border-left-color: #f06370;
}

.wallet-toast--closing {
  animation: wallet-toast-out 200ms ease-in both;
}

.wallet-toast__close {
  position: absolute;
  top: 4px;
  left: 7px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c1ccdc;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.wallet-toast__close:hover {
  background: rgb(255 255 255 / 10%);
  color: #fff;
}

.wallet-toast__icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-top: 8px;
  border-radius: 50%;
  background: rgb(232 173 54 / 13%);
}

.wallet-toast--success .wallet-toast__icon {
  background: rgb(66 207 131 / 13%);
}

.wallet-toast--failed .wallet-toast__icon {
  background: rgb(240 99 112 / 13%);
}

.wallet-toast__icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.wallet-toast__copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding-top: 6px;
}

.wallet-toast__copy strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .035em;
}

.wallet-toast__copy > span:not(.wallet-toast__amount) {
  color: #c1ccdc;
  font-size: 11px;
  line-height: 1.45;
}

.wallet-toast__amount {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.withdrawal-form-error {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #8b4556;
  border-radius: 10px;
  background: linear-gradient(135deg, #402433, #291d2b);
  color: #ffd7dc;
  font-size: 13px;
  line-height: 1.5;
}

@keyframes wallet-toast-in {
  from {
    opacity: 0;
    transform: translateX(calc(100% + 24px));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes wallet-toast-out {
  to {
    opacity: 0;
    transform: translateX(calc(100% + 24px));
  }
}

@media (max-width: 760px) {
  .wallet-toast-root {
    top: 70px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }
}
