:root {
  --bg: #0e0816;
  --bg-elevated: #141018;
  --bg-card: #1a1428;
  --bg-card-2: #221a32;
  --bg-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --purple: #961dff;
  --purple-2: #840dfb;
  --green: #b5ff00;
  --green-text: #0a0a0a;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.64);
  --text-dim: rgba(255, 255, 255, 0.42);
  --radius: 16px;
  --radius-sm: 12px;
  --sidebar-w: 248px;
  --header-h: 64px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: Inter, system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.4;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w);
  padding: 16px 12px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.sidebar__online {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 8px #00ff88;
}

.sidebar__online strong {
  color: var(--text);
  font-weight: 600;
}

.sidebar__login {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: left;
}

.sidebar__login-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  fill: currentColor;
}

.ui-icon--nav {
  width: 22px;
  height: 22px;
}

.sidebar__tab {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
}

.sidebar__tab--solo.is-active {
  background: linear-gradient(135deg, rgba(150, 29, 255, 0.35), rgba(132, 13, 251, 0.2));
  border: 1px solid rgba(150, 29, 255, 0.45);
}

.sidebar__tab .ui-icon {
  color: var(--text-muted);
}

.sidebar__tab.is-active .ui-icon {
  color: var(--text);
}

.sidebar__wheel {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 12px 88px 12px 14px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(135deg, #3a1570 0%, #241040 52%, #1a0b2e 100%);
  border: 1px solid rgba(150, 29, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar__wheel:hover {
  border-color: rgba(150, 29, 255, 0.38);
}

.sidebar__wheel-text {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 110px;
}

.sidebar__wheel-img {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 72px;
  height: 64px;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.sidebar__link .ui-icon {
  color: rgba(255, 255, 255, 0.72);
}

.sidebar__link:hover {
  background: var(--bg-soft);
  color: var(--text);
}

/* Main shell */
.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: rgba(14, 8, 22, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.header__brand img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.header__brand span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-ghost {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-green {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-text);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(181, 255, 0, 0.25);
  white-space: nowrap;
}

.header__connect .btn-green__full {
  display: inline;
}

.header__connect .btn-green__short {
  display: none;
}

.btn-green:hover {
  filter: brightness(1.05);
}

.content {
  padding: 16px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Banners */
.banners {
  position: relative;
}

.banners__track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.banners__track::-webkit-scrollbar {
  display: none;
}

.banner {
  flex: 0 0 min(280px, 32vw);
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 210 / 240;
  background: var(--bg-card);
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.banner__cta {
  position: absolute;
  left: 16px;
  bottom: 16px;
}

.banners__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.banners__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.banners__dot.is-active {
  width: 18px;
  border-radius: 999px;
  background: var(--purple);
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.category {
  position: relative;
  overflow: hidden;
  min-height: 88px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #241836 0%, #171022 100%);
  text-decoration: none;
  padding: 14px;
}

.category span {
  position: relative;
  z-index: 1;
  font-size: 15px;
  font-weight: 700;
}

.category img {
  position: absolute;
  right: 4px;
  bottom: 0;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Sections */
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section__title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.section__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.section__online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.section__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section__all {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  display: grid;
  place-items: center;
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel {
  overflow: hidden;
}

.carousel__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

/* Sport cards */
.sport-card {
  flex: 0 0 min(82vw, 300px);
  scroll-snap-align: start;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.sport-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.sport-card__league {
  font-size: 12px;
  color: var(--text-muted);
}

.sport-card__sport {
  font-size: 11px;
  color: var(--text-dim);
}

.sport-card__badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.sport-card__badge.is-live {
  background: rgba(255, 59, 92, 0.15);
  color: #ff6b84;
}

.sport-card__badge.is-upcoming {
  background: var(--bg-soft);
  color: var(--text-muted);
}

.sport-card__teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.sport-card__team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.sport-card__label {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.sport-card__odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.odd-btn {
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-2);
  text-align: center;
}

.odd-btn strong {
  display: block;
  font-size: 14px;
}

.odd-btn span {
  font-size: 11px;
  color: var(--text-dim);
}

/* Game cards */
.game-card {
  flex: 0 0 132px;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
}

.game-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.game-card__label {
  padding: 8px 6px;
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}

.game-card--view-all {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: linear-gradient(160deg, rgba(150, 29, 255, 0.22) 0%, rgba(34, 26, 50, 0.95) 100%);
  border: 1px solid rgba(150, 29, 255, 0.35);
  aspect-ratio: 3 / 4;
}

.game-card--view-all .game-card__view-all-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}

.game-card--view-all .game-card__view-all-text {
  padding: 0 8px 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  line-height: 1.25;
}

/* Wins */
.win-card {
  flex: 0 0 min(78vw, 280px);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.win-card img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.win-card__amount {
  color: #00ff88;
  font-weight: 700;
  font-size: 15px;
}

.win-card__game {
  font-size: 13px;
  font-weight: 600;
}

.win-card__user {
  font-size: 12px;
  color: var(--text-dim);
}

/* Sports grid */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.sport-tile {
  position: relative;
  min-height: 96px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #241836 0%, #171022 100%);
  padding: 14px;
  overflow: hidden;
}

.sport-tile span {
  font-size: 14px;
  font-weight: 700;
}

.sport-tile img {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Providers */
.provider-card {
  flex: 0 0 108px;
  scroll-snap-align: start;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: center;
}

.provider-card img {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  object-fit: contain;
}

.provider-card span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: 8px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #1a0b2e 0%, #12081f 100%);
  border: 1px solid var(--border);
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

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

.footer__brand img {
  width: 32px;
  height: 32px;
}

.footer__brand span {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer__col h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.footer__col a {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
}

.footer__col a:hover {
  color: var(--text);
}

.footer__links-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
}

.footer__age {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 700;
}

/* Language switcher */
.nc-lang {
  position: relative;
}

.nc-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
}

.nc-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: #1e1830;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 50;
}

.nc-lang-menu[hidden] {
  display: none;
}

.nc-lang-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  color: var(--text-muted);
}

.nc-lang-option:hover,
.nc-lang-option.is-active {
  background: var(--bg-soft);
  color: var(--text);
}

/* Wallet modal */
body.nc-wallet-locked {
  overflow: hidden;
}

.nc-wallet-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
}

.nc-wallet-overlay.is-open {
  display: flex;
}

.nc-wallet-modal {
  width: 100%;
  max-width: 480px;
  max-height: min(88dvh, 520px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  background: #141018;
  border-top: 1px solid var(--border);
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  color: var(--text);
  transform: translateY(100%);
  transition: transform 0.22s ease;
  position: relative;
}

.nc-wallet-overlay.is-open .nc-wallet-modal {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .nc-wallet-overlay {
    align-items: center;
  }

  .nc-wallet-modal {
    border-radius: var(--radius);
    transform: scale(0.96);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .nc-wallet-overlay.is-open .nc-wallet-modal {
    transform: scale(1);
    opacity: 1;
  }
}

.nc-wallet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.nc-wallet-title {
  margin: 0 0 6px;
  padding-right: 40px;
  font-size: 20px;
  font-weight: 700;
}

.nc-wallet-subtitle {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.nc-wallet-currencies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.nc-wallet-currency {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid transparent;
  text-align: left;
  color: inherit;
}

.nc-wallet-currency.is-active {
  border-color: var(--purple);
  background: rgba(150, 29, 255, 0.12);
}

.nc-wallet-currency-code {
  display: block;
  font-weight: 700;
}

.nc-wallet-currency-net {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
}

.nc-wallet-connect {
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-text);
  font-weight: 700;
}

.nc-wallet-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

/* Mobile */
.mobile-nav {
  display: none;
}

@media (max-width: 960px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    padding-bottom: 72px;
  }

  .header {
    gap: 8px;
    min-height: 52px;
    height: auto;
    padding: 8px 10px;
  }

  .header__brand {
    gap: 8px;
  }

  .header__brand img {
    width: 32px;
    height: 32px;
  }

  .header__brand span {
    font-size: 14px;
  }

  .header__actions {
    gap: 6px;
  }

  .header__connect .btn-green__full {
    display: none;
  }

  .header__connect .btn-green__short {
    display: inline;
  }

  .header__connect {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
  }

  .header .nc-lang-trigger {
    padding: 6px 8px;
    font-size: 12px;
  }

  .btn-ghost {
    display: none;
  }

  .content {
    padding: 12px 12px 32px;
    gap: 22px;
  }

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

  .category {
    min-height: 76px;
  }

  .category img {
    width: 52px;
    height: 52px;
  }

  .section__title {
    font-size: 18px;
  }

  .section__online {
    display: none;
  }

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

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

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(20, 16, 24, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(12px);
  }

  .mobile-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 11px;
    text-decoration: none;
  }

  .mobile-nav__item .ui-icon {
    color: var(--text-muted);
  }

  .mobile-nav__item.is-active .ui-icon {
    color: var(--text);
  }

  .mobile-nav__item.is-active {
    color: var(--text);
    background: var(--bg-soft);
  }

  .banner {
    flex-basis: min(72vw, 260px);
    aspect-ratio: 210 / 240;
  }
}

@media (max-width: 400px) {
  .header__brand span {
    font-size: 13px;
  }

  .header__connect {
    padding: 7px 8px;
    font-size: 11px;
  }
}

@media (min-width: 961px) and (max-width: 1200px) {
  .categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sports-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
