:root {
  --bg-root: #111113;
  --bg-panel: #161618;
  --bg-card: #1c1c1f;
  --bg-input: #252528;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text: #f3f3f4;
  --text-muted: #9b9b9f;
  --accent: #ffc130;
  --accent-dark: #e5a918;
  --green-online: #22c55e;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --header-h: 66px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body.sidebar-open {
  overflow: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 180;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 74px;
}

.sidebar__brand img {
  height: 28px;
  width: auto;
}

.sidebar__burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 22px;
}

.nav-section {
  padding: 8px 12px;
}

.nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-link__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.nav-icon-use {
  flex-shrink: 0;
  display: block;
  color: var(--text-muted);
}

.nav-link:hover .nav-icon-use {
  color: var(--text);
}

.section-icon-use {
  flex-shrink: 0;
  display: block;
  color: var(--accent);
}

.icon-use--search {
  display: block;
  opacity: 0.85;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-root);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  height: var(--header-h);
  padding: 0 16px 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-root);
  border-bottom: 1px solid var(--border-subtle);
}

.header-burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 22px;
  flex-shrink: 0;
}

.search-pill {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 14px;
  min-width: 0;
}

.search-pill svg {
  flex-shrink: 0;
  opacity: 0.65;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-login {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.btn-register {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

.content {
  flex: 1;
  padding: 16px 20px 48px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.hero {
  margin-bottom: 28px;
}

.hero-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-slide {
  flex: 0 0 min(420px, calc(100vw - 48px));
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
}

.hero-slide img {
  width: 100%;
  aspect-ratio: 1248 / 537;
  object-fit: cover;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  transition: transform 0.15s, background 0.15s;
}

.hero-dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.section {
  margin-bottom: 32px;
}

.section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.section__title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section__title-icon {
  font-size: 20px;
}

.section__spacer {
  flex: 1;
}

.section__link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.section__arrows {
  display: flex;
  gap: 4px;
}

.section__arrows button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

.scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 0 -4px;
  padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.game-card {
  flex: 0 0 auto;
  width: 148px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.game-card--lg {
  width: 158px;
}

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

.game-card .badge-online {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.game-card .badge-online span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-online);
}

.section--menu-cards {
  margin-bottom: 28px;
}

.menu-big-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.menu-small-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.menu-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  min-height: 218px;
  background-color: #141416;
  background-image: var(--bg-a), var(--bg-b);
  background-size: 94%, cover;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
}

.menu-card--compact {
  height: 218px;
  background-size: var(--bg-size, 210%, cover);
  background-position: var(--bg-pos, center center, center center);
}

.menu-card__inner {
  position: relative;
  min-height: 218px;
  padding: 20px 18px 56px;
  z-index: 1;
}

.menu-card__inner--compact {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 18px 16px 52px;
}

.menu-card__title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.menu-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(243, 243, 244, 0.72);
  max-width: 280px;
}

.menu-card__figure {
  position: absolute;
  pointer-events: none;
  max-width: min(240px, 55%);
  height: auto;
  object-fit: contain;
  z-index: 2;
}

.menu-card__figure--compact {
  position: absolute;
  right: 0;
  bottom: 8px;
  max-width: 72%;
  z-index: 2;
}

.menu-card__btn {
  position: absolute;
  left: 18px;
  bottom: 16px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  z-index: 4;
}

.menu-card__inner--compact .menu-card__btn {
  left: 16px;
  bottom: 14px;
}

.menu-card--sports .menu-card__title {
  color: #fff;
}

.menu-card--casino .menu-card__title {
  color: #fff;
}

.provider-card {
  flex: 0 0 auto;
  width: 132px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  padding: 8px;
  cursor: pointer;
}

.provider-card img {
  max-height: 36px;
  max-width: 100%;
  object-fit: contain;
}

.section--bets .section__head {
  margin-bottom: 12px;
}

.bets-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-panel);
}

.bets-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bets-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 13px;
}

.bets-table thead tr {
  height: 56px;
}

.bets-table th,
.bets-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-subtle);
}

.bets-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: none;
  background: rgba(0, 0, 0, 0.15);
}

.bets-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.bets-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.bets-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.bets-table tbody tr:last-child td {
  border-bottom: none;
}

.bets-game {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-width: 140px;
}

.bet-game-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.88);
}

.bets-num {
  white-space: nowrap;
}

.bets-cur {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  border-radius: 4px;
}

.bets-table .profit-plus {
  color: var(--green-online);
  font-weight: 600;
  white-space: nowrap;
}

.bets-table .profit-minus {
  color: #ef4444;
  font-weight: 600;
  white-space: nowrap;
}

.bets-detail {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.bets-mobile-cards {
  display: none;
}

.page-footer {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--accent);
}

.more-btn-wrap {
  text-align: center;
  margin: 36px 0;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 1023px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(var(--sidebar-w), 88vw);
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__burger {
    display: flex;
  }

  .header-burger {
    display: flex;
  }

  .site-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .search-pill span.label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-login {
    padding: 8px 12px;
    font-size: 13px;
  }

  .btn-register {
    padding: 8px 14px;
    font-size: 13px;
  }

  .content {
    padding: 12px 12px 40px;
  }

  .hero-slide {
    flex-basis: calc(100vw - 36px);
  }

  .menu-big-grid {
    grid-template-columns: 1fr;
  }

  .menu-small-grid {
    grid-template-columns: 1fr;
  }

  .menu-card {
    min-height: 200px;
  }

  .menu-card__figure {
    max-width: min(200px, 62%);
  }

  .section__arrows {
    display: none;
  }

  .bets-table-wrap {
    display: none;
  }

  .bets-mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: var(--bg-panel);
  }

  .bet-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 12px;
    font-size: 13px;
    background: var(--bg-card);
  }

  .bet-card__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
  }

  .bet-card__row:last-child {
    margin-bottom: 0;
  }

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

@media (max-width: 380px) {
  .game-card,
  .game-card--lg {
    width: 132px;
  }

  .btn-login span {
    display: none;
  }
}
