/* K9WIN Sports – Figma frame implementation
   Design tokens, spacing, typography aligned to design system
   Mobile-first, flex/grid, custom properties
*/
:root {
  /* Colors – from Figma / design system */
  --sport-bg: #0d0f12;
  --sport-bg-elevated: #161a1f;
  --sport-bg-card: #1a1e24;
  --sport-surface: #22262d;
  --sport-border: #2d333b;
  --sport-text: #e6edf3;
  --sport-text-muted: #8b949e;
  --sport-accent: #d4a84b;
  --sport-accent-gold: #facc15;
  --sport-accent-gradient: linear-gradient(180deg, #f7d64b 0%, #c5990e 100%);
  --sport-win: #3fb950;
  --sport-loss: #f85149;
  --sport-card-bg: #27272a;

  /* Spacing – exact from Figma */
  --sport-space-xs: 4px;
  --sport-space-sm: 8px;
  --sport-space-md: 16px;
  --sport-space-lg: 24px;
  --sport-space-xl: 40px;
  --sport-gap: 16px;
  --sport-content-padding: 40px;
  /* Match global .container / .header-inner (index.html) */
  --sport-content-max: 1400px;

  /* Typography */
  --sport-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sport-text-11: 11px;
  --sport-text-13: 13px;
  --sport-text-15: 15px;
  --sport-text-16: 16px;
  --sport-text-18: 18px;
  --sport-text-19: 19px;
  --sport-text-21: 21px;
  --sport-text-24: 24px;
  --sport-text-32: 32px;
  --sport-line-tight: 1.2;
  --sport-line-normal: 1.5;

  /* Components */
  --sport-match-card-w: 338px;
  --sport-match-card-h: 176px;
  --sport-radius-sm: 4px;
  --sport-radius-md: 8px;
  --sport-radius-lg: 12px;
}

/* Sport page wrapper (optional – use when only main content is the “frame”) */
.sport-page .main,
.sport-frame {
  padding: var(--sport-space-md) 0;
}

.sport-page .container {
  max-width: 1370px;
  margin: 0 auto;
  padding: 0;
}

.sport-page .main-nav-inner {
  max-width: 1370px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Section – Sports */
.sport-page .section {
  margin-bottom: var(--sport-space-xl);
}

.sport-page .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sport-space-md);
  margin-bottom: var(--sport-space-md);
}

.sport-page .section-title {
  font-family: var(--sport-font);
  font-size: var(--sport-text-21);
  font-weight: 700;
  color: var(--sport-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--sport-space-sm);
}

.sport-page .section-title .section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sport-page .section-link {
  font-size: var(--sport-text-15);
  font-weight: 600;
  color: var(--sport-accent);
  text-decoration: none;
}

.sport-page .section-link:hover {
  text-decoration: underline;
}

/* Hot Football Match – section head with league tabs */
.sport-page .section-head-match {
  flex-direction: column;
  align-items: stretch;
}

.sport-page .section-head-match .section-title {
  font-size: var(--sport-text-19);
}

.sport-page .league-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sport-page .league-tabs {
  display: flex;
  gap: var(--sport-space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.sport-page .league-tabs::-webkit-scrollbar {
  display: none;
}

.sport-page .league-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--sport-radius-md);
  background: transparent;
  color: var(--sport-text-muted);
  border: 1px solid var(--sport-accent-gold);
  scroll-snap-align: start;
  cursor: pointer;
  font-family: var(--sport-font);
  transition: background 0.2s, color 0.2s;
}

.sport-page .league-tab:hover {
  color: var(--sport-text);
}

.sport-page .league-tab.active {
  background: var(--sport-accent-gradient);
  color: #1c1e20;
  font-weight: 600;
  border-color: var(--sport-accent-gold);
}

.sport-page .tab-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--sport-radius-md);
  padding: 0;
  cursor: pointer;
  border: none;
  background: var(--sport-card-bg);
  color: var(--sport-text-muted);
  transition: background 0.2s, color 0.2s;
}

.sport-page .tab-arrow:hover {
  background: var(--sport-surface);
  color: var(--sport-text);
}

.sport-page .tab-arrow--next {
  background: var(--sport-accent-gold);
  color: #1c1e20;
}

.sport-page .tab-arrow--next:hover {
  filter: brightness(1.08);
}

.sport-page .tab-arrow-icon {
  width: 10px;
  height: 10px;
  object-fit: contain;
}

/* Matches horizontal scroll */
.sport-page .matches-scroll {
  display: flex;
  gap: var(--sport-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--sport-space-sm) 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  width: 100%;
}

.sport-page .matches-scroll::-webkit-scrollbar {
  display: none;
}

/* Match card – exact dimensions from Figma */
.sport-page .section--match .match-card {
  flex: 0 0 min(100% - var(--sport-gap), 300px);
  min-width: 0;
  scroll-snap-align: start;
  background: var(--sport-bg-card) url("../images/match/bghot.png") center no-repeat;
  background-size: 100% 100%;
  padding: 12px 14px 14px;
  border-radius: var(--sport-radius-md);
  border: 1px solid var(--sport-border);
  position: relative;
  overflow: hidden;
}

.sport-page .match-header {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
}

.sport-page .match-league {
  display: block;
  font-size: var(--sport-text-13);
  font-weight: 500;
  color: #ffd700;
  margin-bottom: 2px;
}

.sport-page .match-week {
  display: block;
  font-size: var(--sport-text-13);
  font-weight: 400;
  color: var(--sport-text);
}

.sport-page .match-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.sport-page .match-body-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}

.sport-page .match-body .team-label {
  font-size: var(--sport-text-11);
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.sport-page .match-body .team-name {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--sport-line-tight);
}

.sport-page .match-golden {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
}

.sport-page .match-golden .team-crest {
  width: 40px;
  height: 40px;
  min-width: 40px;
  object-fit: contain;
  border-radius: 50%;
}

.sport-page .match-golden .match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 8px;
}

.sport-page .match-golden .match-date {
  font-size: var(--sport-text-13);
  color: var(--sport-text);
  font-weight: 400;
  white-space: nowrap;
}

.sport-page .match-golden .match-time {
  font-size: 12px;
  color: var(--sport-text);
  font-weight: 400;
}

.sport-page .match-odds {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.sport-page .match-card .odds-btn {
  flex: 1;
  min-width: 52px;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  color: var(--sport-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--sport-border);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--sport-font);
  transition: background 0.2s, border-color 0.2s;
}

.sport-page .match-card .odds-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--sport-accent);
}

.sport-page .match-card .odds-btn .odds-label {
  font-size: var(--sport-text-16);
  font-weight: 700;
  line-height: 1.1;
  display: block;
}

.sport-page .match-card .odds-btn .odds-value {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
  display: block;
}

.sport-page .match-card .odds-btn.odds-x {
  flex-direction: column;
}

/* Game grid – Popular / New */
.sport-page .game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sport-gap);
}

.sport-page .game-card {
  border-radius: var(--sport-radius-md);
  overflow: hidden;
  background: var(--sport-bg-card);
  border: 1px solid var(--sport-border);
}

.sport-page .game-thumb {
  aspect-ratio: 125 / 156;
  overflow: hidden;
}

.sport-page .game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 576px) {
  .sport-page .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .sport-page .section--match .match-card {
    flex: 0 0 calc((100% - var(--sport-gap)) / 2);
  }
  .sport-page .game-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 992px) {
  .sport-page .section--match .match-card {
    flex: 0 0 calc((100% - var(--sport-gap) * 3) / 4);
    max-width: var(--sport-match-card-w);
  }
  .sport-page .game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sport-space-lg);
  }
}

@media (min-width: 1200px) {
  .sport-page .section-head-match {
    flex-direction: row;
    align-items: center;
  }
}

/* ========== Sport / Table games lobby (All Providers + cards) ========== */
.sport-lobby,
.table-games,
.casino-lobby:not(.casino-lobby--slot):not(.casino-lobby--fishing):not(.casino-lobby--crash):not(.casino-lobby--arcade):not(.casino-lobby--saved-games) {
  display: flex;
  flex-direction: column;
  gap: var(--lobby-grid-gap, 14px);
  margin-top: var(--lobby-offset-top, 10px);
  padding-bottom: var(--lobby-offset-bottom, 150px);
}

/* Hot lobby: same offsets as casino/sport lobby */
.hot-lobby {
  display: flex;
  flex-direction: column;
  gap: var(--lobby-grid-gap, 14px);
  margin-top: var(--lobby-offset-top, 10px);
  padding-bottom: var(--lobby-offset-bottom, 150px);
}

.hot-lobby-cards-wrap {
  min-width: 0;
  width: 100%;
}

/* Show all cards in a wrapping grid (override index section-cards horizontal scroll) */
.hot-lobby .hot-lobby-cards,
.hot-lobby.section-cards .game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  overflow: visible;
  scroll-snap-type: none;
  flex-wrap: unset;
  padding: var(--sport-space-sm) 0;
}

.hot-lobby .hot-lobby-cards .game-card,
.hot-lobby.section-cards .game-card {
  flex: none;
  width: 100%;
  min-width: 0;
  scroll-snap-align: unset;
}

@media (min-width: 768px) {
  .hot-lobby .hot-lobby-cards,
  .hot-lobby.section-cards .game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
  }
}

@media (min-width: 992px) {
  .hot-lobby .hot-lobby-cards,
  .hot-lobby.section-cards .game-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1200px) {
  .hot-lobby .hot-lobby-cards,
  .hot-lobby.section-cards .game-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}

@media (min-width: 992px) {
  .sport-lobby,
  .table-games,
  .casino-lobby:not(.casino-lobby--slot):not(.casino-lobby--fishing):not(.casino-lobby--crash):not(.casino-lobby--arcade):not(.casino-lobby--saved-games) {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--lobby-panel-gap, 22px);
  }
}

/* Shared “All providers” column — hidden (cards use full width) */
.lobby-sidebar {
  display: none !important;
}

.lobby-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  font-family: var(--sport-font);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
}

.lobby-sidebar-title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
}

.lobby-sidebar-title-icon-img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sport-lobby-providers,
.table-games-providers,
.casino-lobby-providers {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sport-lobby-provider-list,
.table-games-provider-list,
.casino-lobby-provider-list,
.provider-list {
  background: #1D1D1D;
  border-radius: 8px;
  overflow: hidden;
  padding: 0 5px;
}

/* "All" row: lighter grey background, check on right */
.sport-lobby-provider--all,
.table-games-provider--all,
.casino-lobby-provider--all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1D1D1D;
  padding: 15px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  border-bottom: none;
}

.sport-lobby-provider--all .sport-lobby-provider-name,
.table-games-provider--all .table-games-provider-name,
.casino-lobby-provider--all .casino-lobby-provider-name {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.sport-lobby-provider--all .sport-lobby-provider-check,
.table-games-provider--all .table-games-provider-check,
.casino-lobby-provider--all .casino-lobby-provider-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border: 2px solid #444;
  border-radius: 50%;
  background: #1D1D1D;
}

.sport-lobby-provider-input:checked ~ .sport-lobby-provider-check,
.table-games-provider-input:checked ~ .table-games-provider-check,
.casino-lobby-provider-input:checked ~ .casino-lobby-provider-check {
  border: none;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1D' stroke-width='2.5'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* List items: logo, name, radio right; separator below */
.sport-lobby-provider,
.table-games-provider,
.casino-lobby-provider,
.provider-list .provider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  cursor: pointer;
  font-family: var(--sport-font);
  font-size: 14px;
  color: #bbb;
  transition: background 0.2s, color 0.2s;
  position: relative;
  border-bottom: 1px solid #444;
}

.sport-lobby-provider-list .sport-lobby-provider:last-child,
.table-games-provider-list .table-games-provider:last-child,
.casino-lobby-provider-list .casino-lobby-provider:last-child,
.provider-list .provider:last-child {
  border-bottom: none;
}

.sport-lobby-provider:hover,
.table-games-provider:hover,
.casino-lobby-provider:hover,
.provider-list .provider:hover {
  color: #fff;
}

.sport-lobby-provider-input,
.table-games-provider-input,
.casino-lobby-provider-input,
.provider-list .provider-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sport-lobby-provider-check,
.table-games-provider-check,
.casino-lobby-provider-check,
.provider-list .provider-check {
  flex-shrink: 0;
  margin-left: auto;
  width: 18px;
  height: 18px;
  border: 2px solid #555;
  border-radius: 50%;
  background: transparent;
}

.sport-lobby-provider-list .sport-lobby-provider-input:checked ~ .sport-lobby-provider-check,
.table-games-provider-list .table-games-provider-input:checked ~ .table-games-provider-check,
.casino-lobby-provider-list .casino-lobby-provider-input:checked ~ .casino-lobby-provider-check,
.provider-list .provider-input:checked ~ .provider-check {
  border: none;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1D' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.sport-lobby-provider-logo,
.table-games-provider-logo,
.casino-lobby-provider-logo,
.provider-list .provider-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.sport-lobby-provider-name,
.table-games-provider-name,
.casino-lobby-provider-name,
.provider-list .provider-name {
  flex: 1;
  min-width: 0;
}

/* freebet.html — row: logo | title | Free Bet / Limit Event | radio */
.provider-list--freebet .provider {
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
}

.provider-list--freebet .provider-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.provider-list--freebet .provider-name {
  flex: 0 1 auto;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e8e8e8;
  font-size: 14px;
  font-weight: 500;
}

.provider-list--freebet .provider-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  line-height: 1.2;
}

.provider-list--freebet .provider-meta-highlight {
  font-size: 13px;
  font-weight: 700;
  color: #f5d020;
}

.provider-list--freebet .provider-meta-sub {
  font-size: 11px;
  font-weight: 500;
  color: #8a8a8a;
}

.provider-list--freebet .provider-logo {
  width: 36px;
  height: 36px;
}

.sport-lobby-provider-text {
  position: absolute;
  top: 0;
  right: 22px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* table_game.html: promo img without .table-games-provider-text wrapper */
.table-games-provider > .table-games-provider-promo-img {
  position: absolute;
  top: 0;
  right: 22px;
}

.sport-lobby-provider-promo-img,
.table-games-provider-promo-img {
  display: block;
  max-width: 120px;
  height: auto;
}

/* AFB88 promo tag in sidebar: pill, yellow-orange gradient (legacy, kept if needed elsewhere) */
.sport-lobby-provider-promo,
.table-games-provider-promo {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5d020 0%, #e8852e 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  width: fit-content;
}

.sport-lobby-provider-promo strong,
.table-games-provider-promo strong {
  color: #1a1a1a;
  font-weight: 700;
}

.sport-lobby-cards-wrap,
.table-games-cards-wrap,
.games-cards-wrap,
.casino-lobby-cards-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sport-lobby-cards,
.table-games-cards,
.games-cards,
.casino-lobby-cards {
  display: flex;
  gap: var(--lobby-grid-gap, 14px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: var(--sport-space-sm) 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.sport-lobby-cards::-webkit-scrollbar,
.table-games-cards::-webkit-scrollbar,
.games-cards::-webkit-scrollbar,
.casino-lobby-cards::-webkit-scrollbar {
  display: none;
}

.sport-lobby-card,
.table-games-card,
.games-card,
.casino-lobby-card {
  flex: 0 0 min(100% - var(--sport-gap), 200px);
  scroll-snap-align: start;
  width: 200px;
  height: auto;
  border-radius: var(--sport-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--sport-text);
  transition: border-color 0.2s, transform 0.2s;
}

.sport-lobby-card:hover,
.table-games-card:hover,
.games-card:hover,
.casino-lobby-card:hover {
  border-color: var(--sport-accent-gold);
  transform: translateY(-2px);
}

@media (min-width: 576px) {
  .sport-lobby-card,
  .table-games-card,
  .games-card,
  .casino-lobby-card {
    flex: 0 0 200px;
    width: 200px;
  }
}

/* Mobile: 3-column grid */
@media (max-width: 991px) {
  .sport-lobby-cards,
  .table-games-cards,
  .games-cards,
  .casino-lobby-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    scroll-snap-type: none;
    touch-action: auto;
    overscroll-behavior-x: auto;
  }

  .sport-lobby-card,
  .table-games-card,
  .games-card,
  .casino-lobby-card {
    flex: none;
    width: 100%;
    min-width: 0;
  }
}

/* Casino page mobile: 4-column grid */
@media (max-width: 768px) {
  .sport-page .container {
    padding: 0 15px;
  }

  .casino-lobby-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop: show all cards in one row, no horizontal scroll */
@media (min-width: 992px) {
  .sport-lobby-cards,
  .table-games-cards,
  .games-cards,
  .casino-lobby-cards {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    overflow: visible;
    scroll-snap-type: none;
    touch-action: auto;
    overscroll-behavior-x: auto;
  }

  .sport-lobby-cards {
    grid-template-columns: repeat(9, 1fr);
  }

  .sport-lobby-card,
  .table-games-card,
  .games-card,
  .casino-lobby-card {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .sport-lobby-cards-wrap,
  .table-games-cards-wrap,
  .games-cards-wrap,
  .casino-lobby-cards-wrap {
    overflow: visible;
  }
}

@media (min-width: 992px) {
  .table-games--new-game .games-cards {
    grid-template-columns: repeat(9, 1fr);
  }
}

.sport-lobby-card-bg,
.table-games-card-bg,
.games-card-bg,
.casino-lobby-card-bg {
  z-index: 0;
  border: 1px solid #FAF58F;
  border-radius: 10px;
  overflow: hidden;
}

.sport-lobby-card-bg img,
.table-games-card-bg img,
.games-card-bg img,
.casino-lobby-card-bg img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  transform: scale(1);
}

.sport-lobby-card:hover .sport-lobby-card-bg img,
.table-games-card:hover .table-games-card-bg img,
.games-card:hover .games-card-bg img,
.casino-lobby-card:hover .casino-lobby-card-bg img {
  transform: scale(1.08);
}

.sport-lobby-card-tag,
.table-games-card-tag,
.games-card-tag,
.casino-lobby-card-tag {
  position: absolute;
  top: -5px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}

.sport-lobby-card-tag--hot,
.table-games-card-tag--hot,
.games-card-tag--hot,
.casino-lobby-card-tag--hot {
  top: -15px;
  left: -5px;
  color: #fff;
}

.sport-lobby-card-tag--hot img,
.table-games-card-tag--hot img,
.games-card-tag--hot img,
.casino-lobby-card-tag--hot img {
  max-width: 45px;
  height: auto;
}

.sport-lobby-card-tag--promo,
.table-games-card-tag--promo,
.games-card-tag--promo,
.casino-lobby-card-tag--promo {
  right: -7px;
  left: auto;
  color: #1c1e20;
}

.sport-lobby-card-tag--promo img,
.table-games-card-tag--promo img,
.games-card-tag--promo img,
.casino-lobby-card-tag--promo img {
  max-width: 100px;
}

@media (max-width: 991px) {
  .sport-lobby-card-tag--promo img,
  .table-games-card-tag--promo img,
  .games-card-tag--promo img,
  .casino-lobby-card-tag--promo img {
    max-width: 85px;
  }
}

/* ---- Performance baseline ---- */
.sport-page {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Game lobby pages: hide site footer on mobile (fixed .footer-mobile-nav stays) */
@media (max-width: 768px) {
  body.sport-page.hide-sport-lobby .footer {
    display: none !important;
  }

  body.sport-page.hide-sport-lobby .main {
    padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px));
  }

  body.sport-page.hide-sport-lobby .main .container:has(.table-games--freebet) {
    padding-left: 8px;
    padding-right: 8px;
  }

  .table-games--freebet {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: start;
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: calc(65px + env(safe-area-inset-bottom, 0px));
  }

  .table-games--freebet .lobby-sidebar {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: unset;
  }

  .table-games--freebet .lobby-sidebar-title,
  .table-games--freebet .table-games-provider--all {
    display: none;
  }

  .table-games--freebet .table-games-providers {
    width: 100%;
  }

  .table-games--freebet .table-games-providers,
  .table-games--freebet .provider-list--freebet {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }

  .table-games--freebet .provider-list--freebet {
    aspect-ratio: 1 / 1;
    width: 100%;
  }

  .table-games--freebet .provider-list--freebet .provider {
    position: relative;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 0;
    padding: 8px 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 8px;
    background: #141414;
    overflow: visible;
  }

  .table-games--freebet .provider-list--freebet .provider:has(.provider-input:checked) {
    border-color: #f9d94e;
    background: linear-gradient(180deg, #f9d94e 0%, #c7850a 100%);
    box-shadow: none;
  }

  .table-games--freebet .provider-list--freebet .provider::before {
    content: "";
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 2;
    width: 22px;
    height: 19px;
    background: url("../images/icon/free.svg") no-repeat center / contain;
    pointer-events: none;
  }

  .table-games--freebet .provider-list--freebet .provider-body,
  .table-games--freebet .provider-list--freebet .provider-name,
  .table-games--freebet .provider-list--freebet .provider-meta,
  .table-games--freebet .provider-list--freebet .provider-check {
    display: none;
  }

  .table-games--freebet .provider-list--freebet .provider-logo {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .table-games--freebet .games-cards-wrap {
    grid-column: 2 / -1;
    min-width: 0;
    overflow: visible;
  }

  .table-games--freebet .games-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
    touch-action: auto;
  }

  .table-games--freebet .games-card {
    flex: none;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    height: auto;
    border: none;
    border-radius: 8px;
  }

  .table-games--freebet .games-card-bg {
    display: block;
    height: 100%;
    border: none;
    border-radius: 8px;
    overflow: hidden;
  }

  .table-games--freebet .games-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ----- Unified game lobby spacing (all categories) ----- */
.sport-lobby,
.table-games,
.casino-lobby,
.cocks-lobby,
.page--saved-games .saved-games-section {
  margin-top: var(--lobby-offset-top, 10px);
  padding-bottom: var(--lobby-offset-bottom, 150px);
}

@media (min-width: 769px) {
  .sport-lobby-cards,
  .table-games-cards,
  .games-cards,
  .casino-lobby-cards,
  .cocks-lobby-cards,
  .lobby-game-grid,
  .page--saved-games .saved-games-grid {
    gap: var(--lobby-grid-gap, 14px);
  }

  .main > .container:has(.sport-lobby),
  .main > .container:has(.casino-lobby),
  .main > .container:has(.table-games),
  .main > .container:has(.cocks-lobby),
  .main.page--saved-games > .container {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .main > .container:has(.sport-lobby),
  .main > .container:has(.casino-lobby),
  .main > .container:has(.table-games),
  .main > .container:has(.cocks-lobby),
  .main.page--saved-games > .container {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .sport-lobby,
  .table-games,
  .casino-lobby,
  .cocks-lobby,
  .page--saved-games .saved-games-section {
    margin-top: var(--lobby-offset-top, 10px);
  }

  .lobby-game-grid:not(.lobby-game-grid--list),
  .page--saved-games .saved-games-grid {
    gap: 10px;
  }
}
