/* ===== BARRA DE NAVEGACIÓN SUPERIOR (TOPNAV) ===== */
.top-nav {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(180deg, rgba(14, 12, 13, .9) -28.25%, rgba(32, 27, 29, .9) 129.7%);
  display: flex;
  align-items: center;
  justify-content: center;
  /* gap: 4px; */
  z-index: 150;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}
.top-nav::-webkit-scrollbar {
  height: 0;
}
.nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  /* gap: 8px; */
  padding: 10px 18px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 12px;
  text-transform: capitalize;
  letter-spacing: 0;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  min-width: fit-content;
  border: none;
  border-radius: 0;
  background: transparent;
}
.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}
.nav-item.active {
  color: #ffd54f;
  background: transparent;
}
.nav-icon {
  width: 61px;
  height: 265px;
  object-fit: contain;
  filter: none;
  transition: none;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  filter: none;
}

/* Ajustar contenido principal sin sidebar en desktop */
.main-content {
  margin-left: 0 !important;
}

/* .games-section {
  margin-top: 106px;
} */
 

@media (max-width: 768px) {
  .top-nav {
    display: none;
  }
  .main-content {
    margin-left: 0 !important;
  }
  .games-section {
    margin-top: 58px;
  }
}

.section-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 80%;
  margin: 0 auto !important;
}

.rewards-title {
  padding: 6px 16px 10px;
  font-weight: 800;
  font-size: 16px;
  color: #ffd54f;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 16px 16px;
}
.menu-tile .icon {
  font-size: 28px;
  line-height: 1;
  display: block;
  color: #fff;
}
/* Variantes de color para diferenciar las tarjetas */
.menu-tile.variant-blue {
  background: linear-gradient(180deg, #0045ad 0%, #001b2d 100%);
  color: #e6f2ff;
  border: 1px solid #0142a3;
  height: 75px;
  width: 120px;
}
.menu-tile.variant-green {
  background: linear-gradient(180deg, #00904a 0%, #00200d 100%);
  color: #e9ffe6;
  border: 1px solid #018d49;
  height: 75px;
  width: 120px;
}
.menu-tile.variant-orange {
  background: linear-gradient(180deg, #ffa600 0%, #fc7500 100%);
  color: #fff0e6;
  border-color: rgba(255, 187, 131, 0.25);
  height: 75px;
  width: 120px;
}
.menu-tile.variant-purple {
  background: linear-gradient(180deg, #7d00c0 0%, #120042 100%);
  color: #f3e9ff;
  border-color: rgba(187, 131, 255, 0.25);
  height: 75px;
  width: 120px;
}
.menu-tile.variant-pink {
  background: linear-gradient(180deg, #ff00e1 0%, #670045 100%);
  color: #ffe9f3;
  border: 1px solid #f501d7;
  height: 75px;
  width: 120px;
}
.menu-tile.variant-cyan {
  background: linear-gradient(180deg, #00bdc4 0%, #1225f5 100%);
  color: #e6fbff;
  border: 1px solid #01b6c6;
  height: 75px;
  width: 120px;
}
.menu-tile.variant-brown {
  background: linear-gradient(180deg, #f48a00 0%, #7e0a00 100%);
  color: #fff2e6;
  border: 1px solid #f18701;
  height: 75px;
  width: 120px;
}
.menu-tile.variant-skyblue {
  background: linear-gradient(180deg, #63cfff 0%, #008fcc 100%);
  color: #fff2e6;
  border: 1px solid #63cfff;
  height: 75px;
  width: 120px;
}

.sidebar-nav {
  flex: 1;
  /* padding: 20px 0; */
  overflow-y: auto;
}

/* ===== GRID DE ÍCONOS (BetBox móvil) ===== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 16px 16px;
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.08); */
  margin-bottom: 16px;
}

.menu-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* gap: 10px; */
  text-decoration: none;
  background: linear-gradient(180deg, #0d1c33 0%, #0a172b 100%);
  border: 1px solid rgba(131, 187, 255, 0.2);
  border-radius: 12px;
  /* padding: 14px 10px; */
  color: #7fb2ff;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 1px rgba(17, 100, 180, 0.12) inset;
}

.menu-tile:hover {
  border-color: #1f7cff;
  box-shadow: 0 6px 14px rgba(31, 124, 255, 0.15);
  filter: brightness(1.03);
}

.menu-tile.active {
  color: #ffffff;
  border-color: #ffd54d;
  box-shadow: 0 0 0 1px rgba(255, 213, 77, 0.4) inset,
    0 8px 20px rgba(255, 213, 77, 0.18);
  background: radial-gradient(
      120px 80px at 50% -10%,
      rgba(255, 213, 77, 0.15),
      transparent 60%
    ),
    #0a1424;
}

.menu-tile img {
  width: 42px;
  height: 42px;
}

.menu-tile span {
  font-size: 13px;
    width: 32px;
    height: 32px;
    margin-right: 12px;
    display: inline-block;
    vertical-align: middle;
    filter: none;
    transition: filter 0.2s;
  }
.nav-section-title {
  padding: 0 20px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  /* gap: 12px; */
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.2), transparent);
  color: #ffffff;
  border-right: 3px solid #4f46e5;
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
  width: 100%;
}
.frame {
  flex: 0 0 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.frame.active {
  opacity: 1;
}

.winners-carousel {
  width: 85vw;
}
/* ===== Adaptación móvil (celular) — TODO dentro de un solo media query ===== */
@media screen and (max-width: 600px) {
  .winners-carousel {
    width: 100vw !important;
  }
  #promoCarousel .promo-card {
    min-height: 176px !important;
  }
  .promo-card {
    width: 100vw;
    min-height: 180px;
  }
  .promo-carousel .slide {
    flex: 0 0 100%;
  }
  .promo-character {
    max-width: 38%;
  }
  .promo-content {
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: 12px;
  }
  .promo-title {
    font-size: 14px;
  }
  .promo-sub {
    font-size: 16px;
  }
  .promo-btn {
    padding: 8px 10px;
  }
  :root {
    --header-height: 56px;
  }

  /* Layout base */
  body {
    overflow-x: hidden;
  }
  .main-content {
    margin-left: 0 !important;
    padding-bottom: 80px !important;
    background: transparent !important;
  }

  /* Header: solo botón Iniciar sesión */
  .top-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    padding: 0 8px;
    background: linear-gradient(
      132deg,
      #2b2b2b,
      #171717 37.22%,
      #141414 50.49%,
      #080705 67.31%
    ) !important;
    backdrop-filter: blur(6px);
  }
  .top-header .hamburger-btn,
  .top-header .header-search,
  .top-header .user-balance,
  .top-header .btn.btn-primary,
  .top-header .btn.btn-outline,
  .top-header .btn.btn-danger {
    display: none !important;
  }
  .top-header .header-actions {
    margin-left: auto;
  }
  .top-header .btn.btn-secondary {
    display: inline-flex !important;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 12px;
    background: linear-gradient(0deg, #f1c232 0%, #c58c00 100%) !important;
    border: 1px solid #e0b54a !important;
    color: #0a0a0f !important;
    box-shadow: 0 0 0 1px rgba(255, 213, 77, 0.3) inset,
      0 6px 14px rgba(227, 173, 54, 0.35);
  }
  .top-header .btn.btn-secondary:hover {
    filter: brightness(1.08);
  }
  .top-header .btn.btn-danger {
    display: inline-flex !important;
  }
  /* Forzar tema rojo para botones de header (sesión iniciada) */
  .top-header .btn.btn-primary {
    background: linear-gradient(90deg, #ad1627 0%, #f03a45 50%, #ad1627 100%);
    border: 1px solid #f76b76;
    color: #fff;
  }
  .top-header .btn.btn-outline {
    background: transparent;
    border: 1px solid #e61e2a;
    color: #e61e2a;
  }
  .top-header .btn.btn-outline:hover {
    background: rgba(230, 30, 42, 0.12);
    border-color: #ff4d5a;
    color: #ff4d5a;
  }

  .top-header .hamburger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #e3efff;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* Banner medio: tamaño y tipografías reducidas */
  .mid-banner {
    /* margin: 14px 12px !important; */
    width: 100vw;
  }

  .mid-banner-img {
    height: 220px;
  }
  .mid-banner-link {
    height: 160px !important;
    border-radius: 12px !important;
  }
  .mid-banner-overlay {
    inset: auto 10px 10px 10px !important;
    padding: 10px 12px !important;
    border-radius: 10px;
  }
  .mid-banner-badge {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }
  .mid-banner-title {
    font-size: 16px !important;
    line-height: 1.25 !important;
    margin: 6px 0 10px !important;
  }
  .mid-banner-btn {
    font-size: 12px !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }

  /* Deportes: convertir a una sola fila con scroll horizontal */
  .sport-section .sport-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 10px !important;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .sport-section .sport-card {
    flex: 0 0 72vw !important;
    max-width: 72vw !important;
    scroll-snap-align: start;
    border-radius: 12px !important;
  }
  .sport-section .sport-card img {
    height: 140px !important;
    object-fit: cover;
  }
  .sport-section .sport-card .sport-title {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }

  /* Game Row: fila horizontal con tarjetas grandes y scroll */
  .games-section {
    padding: 0 12px;
    width: 0px !important;
  }
  .section-header {
    width: 100vw;
    padding: 0 2px;
    margin-bottom: 8px;
  }
  .section-title {
    font-size: 18px;
  }
  .section-header .view-all {
    font-size: 12px;
    padding: 6px 10px;
  }

  .games-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
  }
  .games-row .game-card-optimized {
    flex: 0 0 72vw;
    max-width: 196px;
    scroll-snap-align: start;
    border-radius: 12px;
  }
  .game-card-optimized .game-image-container {
    height: 140px;
  }
  .game-card-optimized .game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
  }
  .game-card-optimized .provider-badge {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 3px 6px;
  }
  .game-card-optimized .game-info {
    padding: 8px 8px 10px;
  }
  .game-card-optimized .game-title {
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .game-card-optimized .game-vendor {
    font-size: 11px;
    opacity: 0.8;
  }
  .game-card-optimized .game-actions-optimized {
    margin-top: 8px;
  }
  .game-card-optimized .btn-play {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
  }

  /* Navegación inferior (si existe) deja espacio y mantiene legibilidad */
  .mv-bottom {
    height: 62px;
  }
  .mv-bottom a {
    font-size: 11px;
  }
}

/* =============================
   Sidebar / Menú lateral (Mafia)
   Unificación de estilos
============================= */
.sidebar {
  display: none;
  width: 280px;
  background: linear-gradient(
    132deg,
    #2b2b2b,
    #171717 37.22%,
    #141414 50.49%,
    #080705 67.31%
  ) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-direction: column;
  position: fixed;
  height: calc(100vh - var(--header-height));
  left: 0;
  top: var(--header-height);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .sidebar {
    display: flex;
  }
  .sidebar.open {
    display: flex;
  }
}
/* Sidebar promos */
.sidebar-promos {
  padding: 12px;
  display: grid;
  gap: 10px;
}
.cashback-card {
  position: relative;
  border-radius: 10px;
  padding: 12px;
  background: url("/media/jocker_media/resources/menu-banner.webp") no-repeat
    center / cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.cashback-card .cb-title {
  font-size: 12px;
  font-weight: 800;
  color: #ffd54d;
  letter-spacing: 0.4px;
}
.cashback-card .cb-sub {
  font-size: 18px;
  font-weight: 900;
  margin: 6px 0 10px;
}
.cashback-card .cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f1c232, #c58c00);
  color: #0a0a0f;
  font-weight: 800;
  border: 1px solid #e0b54a;
  text-decoration: none;
}
.gclass-banner {
  display: block;
  position: relative;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(90deg, #b31217, #3a0a0e);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.gclass-banner .gclass-label {
  font-weight: 900;
  letter-spacing: 0.4px;
}

/* Quick tiles */
.quick-tiles {
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quick-tiles .tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.quick-tiles .tile:hover {
  background: rgba(255, 255, 255, 0.08);
}
.quick-tiles .tile i {
  width: 22px;
  height: 22px;
  display: inline-block;
}
.quick-tiles .tile span {
  font-size: 12px;
  font-weight: 800;
}

/* Sections */
.sidebar-sections {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-sections .section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-sections .section i {
  font-size: 18px;
}
.sidebar-sections .section .arrow {
  font-style: normal;
  color: rgba(255, 255, 255, 0.6);
}
.sidebar-sections .section.active {
  border-color: #ffd54d;
  box-shadow: 0 0 0 1px rgba(255, 213, 77, 0.25) inset;
}
.sidebar-sections .section.open {
  border-color: #ffd54d;
  box-shadow: 0 0 0 1px rgba(255, 213, 77, 0.25) inset;
}
.sidebar-submenu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 6px 12px 8px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(27, 27, 27, 0.92);
  border: 2px solid #ffd54d;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}
.sidebar-sections .section.open + .sidebar-submenu {
  max-height: 520px;
  opacity: 1;
  padding: 10px;
}
.sidebar-submenu .submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}
.sidebar-submenu .submenu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.sidebar-submenu .submenu-item img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1) grayscale(1);
  opacity: 0.95;
}

/* =============================
   Fila de juegos reutilizable
   Siempre horizontal con scroll
============================= */
.global-dark-bg body,
html,
body {
  background: linear-gradient(
    132deg,
    #2b2b2b,
    #171717 37.22%,
    #141414 50.49%,
    #080705 67.31%
  ) !important;
}

/* Scrollbar global rojo para coherencia del tema */
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #dc2626, #991b1b) !important;
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ef4444, #dc2626) !important;
}
body {
  scrollbar-color: #dc2626 rgba(255, 255, 255, 0.08) !important;
}

.games-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: auto;
  gap: 18px 18px;
  overflow: visible;
  padding: 10px 8px;
  width: 80%;
  margin: 0 auto;
}

.games-row .game-card,
.games-row .game-card-optimized {
  width: auto;
  flex: initial;
  scroll-snap-align: start;
  border-radius: 12px;
}

/* .games-row .game-image-container { aspect-ratio: 1 / 1; } */
.games-row .game-image {
  object-fit: cover;
}
.games-row .game-info {
  padding: 8px 2px;
}
.games-row .game-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
.games-row .game-vendor,
.games-row .game-actions-optimized,
.games-row .provider-badge {
  display: none !important;
}

/* Paginación simple dentro de game_row */
.games-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}
.games-pager .pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.games-pager .pager-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}
.games-pager .pager-page {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 800;
}

@media (max-width: 1024px) {
  .games-row {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 768px) {
  .games-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .games-row .game-title {
    font-size: 11px;
  }
}
@media (max-width: 480px) {
  .games-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Compatibilidad con tarjetas optimizadas dentro de filas horizontales */
.games-row .game-card-optimized {
  flex: 0 0 auto;
  width: 250px; /* igual que el grid de games.php */
  scroll-snap-align: start;
}
/* No fijamos altura para que se comporte como en games.php */
/* .games-row .game-card-optimized .game-image-container { } */
/* .games-row .game-card-optimized .game-image { } */

/* =============================
   Tarjeta de juego optimizada
   Copiado desde games.php
============================= */
.game-card-optimized {
  background: linear-gradient(145deg, #1f2937, #111827);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid rgba(220, 38, 38, 0.2);
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.game-card-optimized::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    rgba(220, 38, 38, 0.1),
    rgba(212, 175, 55, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.game-card-optimized:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(220, 38, 38, 0.3);
  border-color: #dc2626;
}
.game-card-optimized:hover::before {
  opacity: 1;
}

.game-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Mantener proporción uniforme para todas las portadas */
  /* aspect-ratio: 9/9; */
  height: auto;
}
.game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #1f2937, #111827);
}
.game-card-optimized:hover .game-image {
  transform: scale(1.05);
}

.provider-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.provider-badge.gsp {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
}
.provider-badge.veritral {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
}

.game-info {
  padding: 12px;
}
.game-title {
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 6px;
}
.game-vendor {
  font-size: 10px;
  margin-bottom: 10px;
}

.game-actions-optimized {
  background-color: transparent;
}
.btn-play {
  background: linear-gradient(
    135deg,
    var(--purple-1, #7c3aed),
    var(--purple-2, #8b5cf6)
  );
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  color: #fff;
  border: none;
  padding: 8px 12px;
  font-size: 11px;
  border-radius: 10px;
  display: inline-block;
}
.btn-play:hover {
  background: linear-gradient(
    135deg,
    var(--purple-2, #8b5cf6),
    var(--purple-1, #7c3aed)
  );
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
}
.btn-play:active {
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}

.games-row .game-image {
  height: auto; /* igual que en games.php, sin recorte */
  object-fit: cover;
  border-radius: 0;
}

.games-row::-webkit-scrollbar {
  height: 8px;
}
.games-row::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.games-row::-webkit-scrollbar-thumb {
  /* Rojo consistente para el tema (evitar verde global) */
  background: linear-gradient(90deg, #dc2626, #991b1b) !important;
  border-radius: 8px;
}
.games-row::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #ef4444, #dc2626) !important;
}

/* Asegurar color correcto también en Firefox */
.games-row {
  scrollbar-color: #dc2626 rgba(255, 255, 255, 0.08) !important; /* thumb, track */
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

/* Lista vertical principal */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 12px 10px 18px;
}

.menu-list.main-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Ítems del menú */
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(203, 213, 225, 0.95); /* tono azulado del texto */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  background: transparent; /* sin pill por defecto, como el original */
}

.menu-item .icon {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  color: #b9c8dc; /* icono tenue azulado */
  width: 22px; /* reservar ancho para alinear texto */
}

.menu-item span {
  font-size: 13px;
}

.menu-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
.menu-item:hover .icon {
  color: #ffffff;
}

/* Estado activo con resplandor rojo como referencia */
.menu-item.is-active,
.menu-item.active {
  position: relative;
  color: #fff;
  /* Fondo activo con los valores exactos proporcionados */
  background: linear-gradient(
      0deg,
      rgba(234, 0, 47, 0.49) 0%,
      rgba(234, 0, 47, 0) 100%
    ),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2));
  /* Borde/halo rojo usando los mismos tonos */
  box-shadow: 0 0 0 1px rgba(255, 54, 94, 0.5) inset,
    0 0 0 1px rgba(255, 54, 94, 0.5), 0 6px 18px rgba(209, 0, 42, 0.35);
}
.menu-item.active .icon,
.menu-item.is-active .icon {
  color: #ffffff;
}

/* Sección de "Módulos" en el sidebar */
.rewards-list {
  padding: 8px 10px 16px;
}
.rewards-list .menu-item {
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Variantes de color para tarjetas/ítems especiales en sidebar */
.menu-item.variant-blue {
  background: linear-gradient(180deg, #0d1c33 0%, #0a172b 100%);
  border: 1px solid rgba(131, 187, 255, 0.2);
  color: #7fb2ff;
}
.menu-item.variant-green {
  background: linear-gradient(180deg, #0b3322 0%, #072016 100%);
  border: 1px solid rgba(80, 200, 120, 0.25);
  color: #6fe7a7;
}
.menu-item.variant-orange {
  background: linear-gradient(180deg, #3a1a00 0%, #2a1200 100%);
  border: 1px solid rgba(255, 187, 131, 0.25);
  color: #ffcf9e;
}
.menu-item.variant-purple {
  background: linear-gradient(180deg, #1a0b33 0%, #120024 100%);
  border: 1px solid rgba(187, 131, 255, 0.25);
  color: #cba8ff;
}
.menu-item.variant-pink {
  background: linear-gradient(180deg, #2b001f 0%, #1a0012 100%);
  border: 1px solid rgba(245, 1, 215, 0.35);
  color: #ff9ee6;
}
.menu-item.variant-cyan {
  background: linear-gradient(180deg, #001c1f 0%, #001019 100%);
  border: 1px solid rgba(1, 182, 198, 0.35);
  color: #87e9f1;
}
.menu-item.variant-brown {
  background: linear-gradient(180deg, #2b1400 0%, #1a0c00 100%);
  border: 1px solid rgba(241, 135, 1, 0.35);
  color: #ffddb8;
}
.menu-item.variant-skyblue {
  background: linear-gradient(180deg, #0a1730 0%, #071226 100%);
  border: 1px solid rgba(99, 207, 255, 0.35);
  color: #bdeaff;
}

/* Footer del sidebar: tarjeta de usuario / botón login */
.sidebar-footer {
  padding: 14px 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer .btn {
  background: #1a2434;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 800;
  border-radius: 10px;
}
.sidebar-footer .btn:hover {
  filter: brightness(1.06);
}

/* Tarjeta de usuario compacta */
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.user-info:hover {
  background: rgba(255, 255, 255, 0.1);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.user-details .user-name {
  font-weight: 800;
  font-size: 13px;
}
.user-details .user-balance {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* =============================
   Header superior (Mafia)
   Unificación de estilos
============================= */
.top-header {
  background: #030303 !important;
  box-shadow: 0 0.2rem 0.2rem 0 rgba(0, 0, 0, 0.35);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  gap: 250px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand img {
  height: 38px;
  width: auto;
}
.header-brand .brand-text {
  font-weight: 900;
  font-size: 18px;
  color: #fff;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.header-nav .nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 2px;
}
.header-nav .nav-link:hover {
  color: #fff;
}
.header-nav .nav-link.active {
  color: #ffd54d;
}
.header-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  background: #ffd54d;
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Estilos específicos para el header tipo Donbet (logo + registro + login inline) */
.header-auth {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.btn-register:hover {
  filter: brightness(1.05);
}
.header-login-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
}
.header-input {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-weight: 700;
  height: 36px;
}
.header-username {
  min-width: 140px;
}
.header-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.header-password {
  padding-right: 36px;
}
.pwd-toggle {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  height: 28px;
  width: 28px;
  border-radius: 6px;
}
.header-login-btn {
  padding: 9px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffd54f 0%, #ffb029 100%);
  border: 1px solid #f0b844;
  color: #0a0a0f;
  font-weight: 900;
}
.header-flag {
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 900px) {
  .header-login-form {
    display: none;
  }
  .btn-register {
    display: inline-flex;
  }
}

/* Ajustes para replicar el estilo de la referencia */
.forgot-link {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  text-decoration: none;
  margin-right: 6px;
}
.forgot-link:hover {
  color: rgba(255, 255, 255, 0.7);
}
.btn-register {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25),
    0 0 0 6px rgba(59, 130, 246, 0.06) inset;
}
.header-login-form {
  display: flex;
  align-items: center;
  gap: 12px;
}
.input-with-icon {
  display: flex;
  align-items: center;
  /* gap: 8px; */
  background: rgba(255, 255, 255, 0.02);
  /* padding: 6px; */
  /* border-radius: 12px; */
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.input-with-icon .i-left {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 16px;
}
.input-with-icon input.header-input {
  border: none;
  background: transparent;
  padding: 8px 10px;
  color: #fff;
  font-weight: 700;
  width: 160px;
}
.input-with-icon input.header-input::placeholder {
  color: rgba(203, 217, 233, 0.6);
  font-weight: 700;
}
.pwd-toggle {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  margin-left: 4px;
}
.flag-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.flag-btn img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

@media (max-width: 1100px) {
  .input-with-icon input.header-input {
    width: 110px;
  }
}

@media (max-width: 900px) {
  .forgot-link {
    display: none;
  }
  .btn-register {
    box-shadow: none;
  }
}
.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  margin-right: 8px;
}
.hamburger-btn:active {
  transform: scale(0.98);
}
.header-search {
  display: flex;
  align-items: center;
  position: relative;
  margin-right: 12px;
}
.header-search-input {
  width: 360px;
  max-width: 40vw;
  padding: 10px 14px 10px 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e6f0ff;
  outline: none;
}
.header-suggest {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 420px;
  max-width: 40vw;
  background: rgba(7, 14, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px;
  backdrop-filter: blur(6px);
  display: none;
  z-index: 200;
}
.header-suggest .empty {
  padding: 12px;
  font-size: 12px;
  color: #9fb6d1;
  display: none;
}
.header-suggest.open {
  display: block;
}
.header-suggest .section-title {
  font-size: 12px;
  font-weight: 800;
  color: #cbd5e1;
  margin: 6px 8px;
}
.header-suggest .suggest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.header-suggest .suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #e6f0ff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.header-suggest .suggest-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.header-suggest .thumb {
  width: 44px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}
.header-suggest .name {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.header-suggest .loading {
  padding: 12px;
  text-align: center;
}
.header-suggest .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ff304d;
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.header-search-input::placeholder {
  color: rgba(201, 219, 255, 0.75);
}
.header-search::before {
  content: "\1F50D";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(201, 219, 255, 0.85);
}
.btn {
  padding: 7px 14px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-primary {
  background: #ffe93f;
  color: #0a0a0f;
  border: 1px solid #ffd54d;
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-outline {
  background: transparent;
  border: 1px solid #ffd54d;
  color: #ffd54d;
}
.btn-outline:hover {
  background: rgba(255, 213, 77, 0.12);
}
/* Variante roja exclusiva para el botón "Ver todos" */
.btn-outline.view-all {
  border-color: #e61e2a !important; /* rojo real, no depende de variables */
  color: #e61e2a !important;
}
.btn-outline.view-all:hover {
  background: rgba(230, 30, 42, 0.12) !important;
  border-color: #ff4d5a !important;
  color: #ff4d5a !important;
}
/* Variantes específicas del header */
.btn-ghost {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #dfe7f5;
}
.btn-ghost:hover {
  filter: brightness(1.05);
}
.btn-danger {
  background: linear-gradient(0deg, #a6070f 0%, #e61e2a 100%);
  border: 1px solid #ff4e5a;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 59, 71, 0.3) inset,
    0 6px 14px rgba(230, 30, 42, 0.35);
}
.btn-danger:hover {
  filter: brightness(1.05);
}

/* Botón secundario (estilo oscuro tipo hamburguesa) */
.btn-secondary {
  position: relative;
  overflow: hidden;
  border-radius: 12px; /* más redondeado como el original */
  background: linear-gradient(
    180deg,
    var(--stb-button-background, rgb(66 80 108)) 0%,
    var(--stb-button-bottom-background, rgb(47 57 77)) 100%
  );
  border: 1px solid rgb(85 103 139);
  color: var(--stb-button-color, rgb(235 240 246));
  text-transform: uppercase;
  font-family: "Oswald", "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.25);
  transition: background-color var(--stb-transition-time, 0.2s),
    opacity var(--stb-transition-time, 0.2s), filter 0.2s ease;
}
.btn-secondary:hover {
  filter: brightness(1.05);
}

/* Capa interior para simular el borde y sombra del original */
.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(66 80 108);
  border: 1px solid rgb(85 103 139);
  opacity: var(--stb-button-opacity-bg, 0.35);
  border-radius: inherit;
  pointer-events: none;
}
/* Sombra interna desde la mitad hacia abajo (reemplaza la línea blanca) */
.btn-secondary::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    rgba(0, 0, 0, 0.28) 100%
  );
  pointer-events: none;
}

/* Responsive header */
@media (max-width: 900px) {
  .top-header {
    padding: 0 12px;
    height: 55px;
  }
  .header-brand img {
    height: 28px;
  }
  .header-nav {
    display: none;
  }
  .header-search-input {
    width: 160px;
    max-width: 50vw;
  }
  .header-actions .btn {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
  }
}

/* ===== Modal de Login (global) ===== */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-modal.open {
  display: flex;
}
.login-content {
  background: linear-gradient(180deg, #0e1320 0%, #0a0f1a 100%);
  border-radius: 12px;
  padding: 28px 28px 24px;
  width: 540px;
  max-width: 92vw;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.login-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -6px 18px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}
.login-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0 0 16px;
  text-align: left;
}
.login-meta {
  font-size: 14px;
  color: rgba(223, 231, 245, 0.8);
  margin-bottom: 12px;
}
.login-meta a {
  color: #50a7ff;
  text-decoration: underline;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-label {
  font-size: 13px;
  color: rgba(223, 231, 245, 0.9);
  margin-bottom: 6px;
}
.form-input {
  padding: 14px 16px;
  background: linear-gradient(180deg, #1e2638 0%, #171d2b 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e9eef7;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}
.form-input:focus {
  border-color: #4f46e5;
}
.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Botón rojo del modal (similar al diseño de referencia) */
.btn-login {
  background: linear-gradient(90deg, #ad1627 0%, #f03a45 50%, #ad1627 100%);
  border: 1px solid #f76b76;
  color: #fff;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 8px 22px rgba(240, 58, 69, 0.35);
}
.btn-login:hover {
  filter: brightness(1.05);
}
/* Nuevo layout para modal de login: imagen izquierda + formulario derecha */
.login-content.login-grid {
  width: 880px;
  max-width: 96vw;
  padding: 0;
  display: flex;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(6,6,8,0.95), rgba(8,8,10,0.85));
}
.login-content.login-grid .login-left {
  flex: 0 0 46%;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-content.login-grid .login-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.login-content.login-grid .login-right {
  flex: 1 1 54%;
  padding: 42px 42px 36px 36px;
  background: linear-gradient(180deg, rgba(10,10,12,0.6), rgba(6,6,8,0.6));
  color: #e9eef7;
}
.login-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
}
.login-title { font-size: 28px; margin-top: 0; margin-bottom: 8px; color: #4860ff; text-transform: uppercase; letter-spacing: 0.8px; }
.login-sub { color: rgba(223,231,245,0.85); margin-bottom: 18px; }
.login-form { gap: 12px; }
.password-wrap { position: relative; }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: rgba(255,255,255,0.7); font-size: 16px; cursor: pointer; }
.btn-login-yellow {
  background: linear-gradient(180deg, #ffd54f 0%, #f3c53a 100%);
  color: #0b0b0f;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,213,77,0.45);
  box-shadow: 0 10px 30px rgba(255,197,38,0.16);
  text-transform: none;
}
.btn-login-yellow:hover { filter: brightness(0.97); }
.form-input { padding: 14px 44px 14px 16px; border-radius: 10px; }
.form-input:focus { outline: 2px solid rgba(255,213,77,0.18); box-shadow: 0 6px 20px rgba(255,197,38,0.08); border-color: rgba(255,213,77,0.9); }
.forgot-link { color: #9fb7ff; font-size: 13px; text-decoration: none; }
.login-meta { margin-top: 16px; color: rgba(223,231,245,0.8); }

/* Ajustes responsive: apilar en pantallas pequeñas */
@media (max-width: 640px) {
  .login-content.login-grid {
    flex-direction: column;
    width: 96vw;
    max-width: 420px;
    border-radius: 14px;
    overflow: hidden;
  }
  .login-content.login-grid .login-left {
    flex: none;
    height: 300px;
    display:block;
  }
  .login-content.login-grid .login-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center -18px;
    display: block;
  }
  .login-content.login-grid .login-right {
    padding: 18px 16px 22px;
  }
  .login-title { font-size: 20px; text-align: center; margin-bottom: 6px; }
  .login-sub { text-align:center; margin-bottom: 14px; }
  .login-form { gap: 12px; }
  .form-input { width: 100%; box-sizing: border-box; }
  .password-wrap { position: relative; }
  .password-toggle { right: 10px; }
  .btn-login-yellow { width: 100%; padding: 14px 18px; border-radius: 12px; display:block; }
  .login-close { top: 12px; right: 12px; }
}
/* ======= Sticky Category Bar (Reusable) ======= */
.cat-bar {
  position: sticky;
  top: var(--header-height, 56px);
  z-index: 950;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  margin-top: -64px;
  padding-bottom: 6px;
}
.cat-bar .cat-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  max-width: 1300px;
  margin: 0 auto;
}
.cat-bar .cat-scroll {
  display: flex;
  /* gap: 12px; */
  overflow-x: auto;
  /* padding: 4px 6px; */
  scroll-snap-type: x mandatory;
  font-size: 10px;
  justify-content: center;
  align-items: flex-end;
}
.cat-bar .cat-scroll::-webkit-scrollbar {
  height: 8px;
}
.cat-bar .cat-scroll::-webkit-scrollbar-track {
  background: #0a1338;
  border-radius: 8px;
}
.cat-bar .cat-scroll::-webkit-scrollbar-thumb {
  background: #0c1f45;
  border: 1px solid #0a1338;
  border-radius: 8px;
}

.cat-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  color: #ffffff;
  min-width: 100px;
  height: 112px;
  padding-bottom: 10px;
  border: none;
  background: url("/media/jocker_media/resources/categories-background.webp")
    no-repeat center / contain;
  box-shadow: none;
  scroll-snap-align: start;
}
.cat-item:hover {
  filter: brightness(1.03);
  color: #000000;
}
.cat-item:active {
  filter: brightness(0.98);
}
.cat-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.cat-icon img {
  width: 42px;
  height: 42px;
  display: block;
}
.icon-placeholder {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.cat-label {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.cat-arrow {
  appearance: none;
  border: 1px solid rgba(140, 170, 210, 0.18);
  /* Fondo con textura igual al de los ítems */
  background: url("/media/mafia_media/bg.webp"),
    linear-gradient(
      180deg,
      rgba(9, 19, 38, 0.45) 0%,
      rgba(7, 14, 30, 0.35) 100%
    );
  background-blend-mode: overlay;
  background-repeat: repeat;
  background-size: 280px auto;
  background-position: center;
  color: #e3efff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.3);
}
.cat-arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

/* No cubrir el sidebar en vistas con rail izquierdo */
body.with-left-rail .cat-bar {
  margin-left: 280px;
  width: calc(100% - 280px);
}

.banner-track picture {
  display: block;
  min-width: 100%;
  height: auto;
}

.banner-track picture img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 768px) {
  .providers-container-mobile{
    width: 100vw !important;
  }
  .games-grid-optimized {
    margin: 0 !important;
  }
  .main-slider .slider-wrapper{
    width: 100vw !important;
  }
  section.promotions ul.promos > li{
    width: 94% !important;
  }
  section.promotions ul.promos{
    grid-template-columns: repeat(1, 1fr) !important;
  }
  section.promotions .title .left h2 {
    font-size: 23px !important;
  }
  html:not(:lang(fa)):not(:lang(ar)) main .middle{
    width: 100vw !important;
  }
  html:not(:lang(fa)):not(:lang(ar)) main section .bonuses ul{
    width: 98vw;
    grid-template-columns: repeat(3, 1fr) !important;
  }
  main section.get-bonuses .bonuses ul a{
    height: 159px !important;
  }
  .home-mobile{
    display: flex !important;
    flex-direction: column;
  }
  .hero-carousel video {
    height: 140%;
  }
  .games-container.filtered {
    padding-top: 0px !important;
  }
  .game-info {
    height: 32px;
  }
  /* Header superior y navegación móvil */
  .top-header {
    padding: 0 8px;
    height: 56px;
  }
  .header-brand {
    gap: 8px;
  }
  .header-brand img {
    /* width: 100px !important; */
    height: 56px !important;
  }
  .header-brand .brand-text {
    font-size: 16px;
  }
  .header-nav {
    justify-content: flex-start;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0 6px;
  }
  .header-nav .nav-link {
    scroll-snap-align: start;
    font-size: 13px;
    padding: 8px 2px;
  }
  .header-actions {
    gap: 8px;
  }
  .btn {
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 12px;
  }

  /* Ocultar sidebar en móvil y liberar el contenido */
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
  }

  .cat-bar {
    margin-top: 0;
    padding-bottom: 8px;
    background: linear-gradient(
      180deg,
      rgba(7, 17, 34, 0.92) 0%,
      rgba(5, 12, 25, 0.92) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    padding-top: 6px;
  }
  .cat-bar .cat-inner {
    grid-template-columns: 1fr !important;
    margin: 0;
  }
  .cat-bar .cat-scroll {
    justify-content: flex-start !important;
    /* gap: 8px; */
    width: 100vw;
  }

  /* Menú de acceso rápido (iconos) */
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 8px 12px 12px;
  }
  .menu-tile {
    padding: 12px 8px;
    border-radius: 12px;
  }
  .menu-tile img {
    width: 36px;
    height: 36px;
  }
  .menu-tile span {
    font-size: 12px;
  }

  /* Banners: tira y carrusel en columna */
  .banner-strip {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 8px;
  }
  .frame-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .banner-card {
    border-radius: 16px;
  }
  .banner-img {
    height: auto;
    object-fit: cover;
  }
  .banner-overlay {
    width: 70%;
    max-width: 70%;
    gap: 4px;
  }
  .banner-overlay .slogan-title {
    font-size: 18px;
  }
  .banner-overlay .slogan-subtitle {
    font-size: 12px;
  }
  .banner-cta {
    left: 10px;
    bottom: 10px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .cat-item {
    padding: 0;
    min-width: 86px;
    height: 86px;
  }
  .cat-label {
    font-size: 10px;
  }
  body.with-left-rail .cat-bar {
    margin-left: 0;
    width: 100%;
  }

  /* Fila de juegos: mostrar título y proveedor siempre visibles */
  .games-section {
    padding: 0 12px;
    width: 98vw !important;
  }
  .games-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
  }
  .games-row .game-card-optimized {
    flex: 0 0 72vw;
    max-width: 197px;
    /* height: 250px; */
    scroll-snap-align: start;
    border-radius: 12px;
  }
  /* Asegurar que las imágenes llenen el contenedor en móvil */
  .game-image-container {
    aspect-ratio: 16/9 !important;
    height: 150px !important;
  }
  .game-card-optimized .game-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
  }
  .game-card-optimized .game-info {
    padding: 8px 8px 10px;
  }
  .game-card-optimized .game-title {
    font-size: 14px;
    line-height: 1.2;
    color: #fff;
  }
  .game-card-optimized .game-vendor {
    font-size: 11px;
    opacity: 0.85;
    color: #cbd5e1;
  }
  .game-card-optimized .btn-play {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
  }

  .btn-primary {
    background: linear-gradient(90deg, #ad1627 0%, #f03a45 50%, #ad1627 100%);
    border: 1px solid #f76b76;
    color: #fff;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
      0 8px 22px rgba(240, 58, 69, 0.35);
  }

  .games-row {
    width: 100vw;
  } /* ..game-image-container */

  .hero-carousel .viewport {
    height: 290px;
    width: 100vw;
    border-radius: none;
  }

  .cat-bar {
    top: 54px;
  }

  .sports-section {
    padding: 4px 14px;
    width: 100vw;
  }

  .top-header .header-brand img{
    width: 137px !important;
  }
}

/* ===== Ajustes exclusivos para laptops 1366x599 ===== */
@media screen and (width: 1366px) and (height: 599px) {
  /* BANNER VIDEO */
  .cat-bar .cat-inner {
    width: 1080px;
    margin: 0px;
  }
  /* No tocar carrusel de banners aquí para evitar efectos colaterales */

  /* Espaciado de encabezados de sección para ganar vertical */
  .section-header-modern {
    margin-bottom: 20px;
  }
  .section-title-main {
    font-size: 1.6rem;
  }
  .section-subtitle {
    font-size: 0.95rem;
  }

  /* Grids de juegos: una fila con scroll horizontal visible */
  .games-grid,
  #homeGamesGrid,
  #homeNewGrid,
  #homeBonusGrid,
  #homeDropsGrid,
  #homeLiveGrid,
  #homeCrashGrid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    width: 1070px;
  }

  .games-grid .game-card,
  #homeGamesGrid .game-card,
  #homeNewGrid .game-card,
  #homeBonusGrid .game-card,
  #homeDropsGrid .game-card,
  #homeLiveGrid .game-card,
  #homeCrashGrid .game-card {
    flex: 0 0 auto;
    width: 200px;
    scroll-snap-align: start;
    border-radius: 12px;
  }

  .game-image {
    height: 130px;
    object-fit: cover;
  }
  .game-info {
    padding: 10px;
  }
  .game-title {
    font-size: 12px;
    line-height: 1.3;
  }
  .game-provider,
  .game-vendor {
    font-size: 10px;
  }

  /* Ajustes ligeros en menú lateral compacto */
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .menu-tile {
    width: 110px;
    height: 70px;
  }
  .menu-tile span {
    font-size: 12px;
  }
  .menu-tile .icon {
    font-size: 26px;
  }

  /* Scrollbar horizontal más fino en los carriles de juegos */
  .games-grid::-webkit-scrollbar,
  #homeGamesGrid::-webkit-scrollbar,
  #homeNewGrid::-webkit-scrollbar,
  #homeBonusGrid::-webkit-scrollbar,
  #homeDropsGrid::-webkit-scrollbar,
  #homeLiveGrid::-webkit-scrollbar,
  #homeCrashGrid::-webkit-scrollbar {
    height: 8px;
  }

  .games-grid::-webkit-scrollbar-thumb,
  #homeGamesGrid::-webkit-scrollbar-thumb,
  #homeNewGrid::-webkit-scrollbar-thumb,
  #homeBonusGrid::-webkit-scrollbar-thumb,
  #homeDropsGrid::-webkit-scrollbar-thumb,
  #homeLiveGrid::-webkit-scrollbar-thumb,
  #homeCrashGrid::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #dc2626, #991b1b) !important;
    border-radius: 6px;
  }

  /* Hover rojo para scrollbars de carriles de juegos */
  .games-grid::-webkit-scrollbar-thumb:hover,
  #homeGamesGrid::-webkit-scrollbar-thumb:hover,
  #homeNewGrid::-webkit-scrollbar-thumb:hover,
  #homeBonusGrid::-webkit-scrollbar-thumb:hover,
  #homeDropsGrid::-webkit-scrollbar-thumb:hover,
  #homeLiveGrid::-webkit-scrollbar-thumb:hover,
  #homeCrashGrid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
  }

  /* Firefox: color del scrollbar en carriles de juegos */
  .games-grid,
  #homeGamesGrid,
  #homeNewGrid,
  #homeBonusGrid,
  #homeDropsGrid,
  #homeLiveGrid,
  #homeCrashGrid {
    scrollbar-color: #dc2626 rgba(255, 255, 255, 0.08) !important;
  }

  /* Mantener .frame-grid sin cambios para el carrusel de banners */
  .cat-strip {
    gap: 0px;
    width: 1090px;
  }

  .cat-link span {
    font-size: 15px;
  }

  .section-header {
    width: 1065px;
  }

  .proveedor222 {
    width: 1070px;
  }
  .sidebar {
    width: 210px;
  }

  .main-content {
    margin-left: 210px;
  }
}

/* Ocultar el bloque de dos columnas destacadas en móviles */
@media (max-width: 900px) {
  .two-rows-wrapper { display: none !important; }
}

.top-header .header-brand {
  display: inline-flex !important;
  align-items: center;
}
.top-header .header-brand img {
  width: 120px;
  height: auto;
  display: block;
}
.game-image-container {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.game-image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/media/jocker_media/games/border.webp") no-repeat center /
    cover;
  pointer-events: none;
  z-index: 2;
}
.game-card-optimized:hover .game-image-container::after {
  filter: brightness(1.06);
}
/* Promo panels */
.promo-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}
.promo-card {
  position: relative;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  background: url("/media/jocker_media/resources/promotion-card-bg.webp")
    no-repeat center / cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.promo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/media/jocker_media/games/promo-card-border.webp") no-repeat
    center / cover;
  pointer-events: none;
  z-index: 3;
}
.promo-card.overlay-sports::before {
  background-image: url("/media/jocker_media/resources/overlay-sports.webp");
}
.promo-card.overlay-casino::before {
  background-image: url("/media/jocker_media/resources/overlay-casino.webp");
}
.promo-content {
  position: absolute;
  left: 18px;
  right: 38%;
  top: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}
.promo-title {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.promo-sub {
  font-size: 18px;
  font-weight: 900;
}
.promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(0deg, #f1c232 0%, #c58c00 100%);
  border: 1px solid #e0b54a;
  color: #0a0a0f;
  font-weight: 800;
  text-decoration: none;
}
.promo-link {
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}
.promo-character {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  max-width: 42%;
}
@media (max-width: 992px) {
  .banner-wrapper {
    width: 100vw !important;
  }

  .banner-slide{
    height: 250px !important;
  }
  .sidebar.open {
    width: 65vw;
  }
  .promo-panels {
    grid-template-columns: 1fr;
  }
  .promo-content {
    right: 42%;
  }
}
.promo-carousel {
  position: relative;
  margin: 18px 0;
}
.promo-carousel .viewport {
  overflow: hidden;
  border-radius: 12px;
}
.promo-carousel .track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
  gap: 0;
}
.promo-carousel .slide {
  flex: 0 0 50%;
}
.promo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.promo-controls .ctrl {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.promo-controls .ctrl[disabled] {
  opacity: 0.4;
  cursor: default;
}
.promo-dots {
  display: flex;
  gap: 6px;
}
.promo-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.promo-dots .dot.active {
  background: #ffd54d;
}
.promo-card.bg-soccer {
  background-image: url("/media/jocker_media/resources/Soccer_Stadium.png");
}
.promo-card.bg-default {
  background-image: url("/media/jocker_media/resources/promotion-card-bg.webp");
}

/* ===== Banner principal (migrado desde inline styles en index.php) ===== */
.banner-wrapper {
  width: 100%;
  position: relative;
  margin-top: 20px;
}
.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.banner-track {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}
.banner-slide {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  display: block;
}
.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}
.banner-prev { left: 10px; }
.banner-next { right: 10px; }

/* ==========================
   Versión móvil: Categories
   Muestra una fila scrollable con chips y etiquetas
   ========================== */
@media (max-width: 900px) {
  .chip{
    padding: 0px;
  }
  .winners-head h2 {
    font-size: 1.5rem !important;
  }
  /* ocultar la versión desktop ya que existe un bloque móvil separado */
  .categories { display: none !important; }

  .categories-mobile { display: block; padding: 6px 8px; box-sizing: border-box; max-width: 100%; margin: -4rem auto 0; }
  .categories-mobile .scroll { display: flex; -webkit-overflow-scrolling: touch; }
  .categories-mobile .chip { flex: 0 0 auto; width: 84px; text-align: center; }
  .categories-mobile .chip a {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 20px;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(8,8,10,0.45), rgba(8,8,10,0.7));
    border: 1px solid rgba(124,58,237,0.06);
    box-shadow: 0 20px 44px rgba(0,0,0,0.65), 0 6px 18px rgba(124,58,237,0.04) inset;
  }
  .categories-mobile .chip a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 120%, rgba(124,58,237,0.09), transparent 28%);
    mix-blend-mode: screen;
    opacity: 0.9;
  }
  .categories-mobile .chip img { object-fit: contain; display:block; margin: 0 auto; border-radius: 12px; }
  .categories-mobile .chip .chip-label { position: absolute; left: 1px; right: 0px; bottom: 8px; background: rgba(0,0,0,0.4); padding: 4px 6px; border-radius: 8px; font-size: 10px;  color: #fff; text-align: center; text-transform: uppercase; }
  .categories-mobile .dots { display:flex; gap:6px; justify-content:center; margin-top:8px; }
  .categories-mobile .dot { width:6px; height:6px; border-radius:50%; background: rgba(255,255,255,0.3); }
  .categories-mobile .dot.active { background: #ffd54d; }
}

@media (min-width: 901px) {
  .categories-mobile { display: none !important; }
}

