.games-section {
  margin-top: 20px;
}

.section-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 84vw;
}

.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;
  font-weight: 600;
  text-align: center;
}

.nav-section {
  margin-bottom: 32px;
}

.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;
}

/* ===== Adaptación móvil (celular) — TODO dentro de un solo media query ===== */
@media screen and (max-width: 600px) {
  :root {
    --header-height: 56px;
  }

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

  /* Header: solo botón Iniciar sesión */
  .top-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: linear-gradient(
      180deg,
      rgba(8, 16, 32, 0.9),
      rgba(8, 16, 32, 0.6)
    );
    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 12px;
    font-size: 13px;
    border-radius: 8px;
  }
  /* 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: inline-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: 140px;
  }
  .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: 72vw;
    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 {
  width: 280px;
  /* Color exacto solicitado: rgb(26, 31, 40) */
  background: rgb(26, 31, 40);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* =============================
   Fila de juegos reutilizable
   Siempre horizontal con scroll
============================= */
.global-dark-bg body,
body {
  background: #1a1919 !important; /* negro opaco noche en todo el sitio */
}

/* 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: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 8px 4px;
  width: 85vw;
}

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

/* 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 {
  /* Unificado al mismo color del sidebar */
  background: rgb(26, 31, 40);
  box-shadow: 0 0.2rem 0.2rem 0 rgba(0, 0, 0, 0.35);
  height: 56px;
  display: grid;
  grid-template-columns: 67px 1fr auto;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand img {
  height: 32px;
  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;
}
.hamburger-btn {
  display: inline-flex;
  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-left: 16px;
}
.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: 15px 20px;
  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 {
    grid-template-columns: 48px 1fr auto;
    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);
}
/* ======= Sticky Category Bar (Reusable) ======= */
.cat-bar {
  position: sticky;
  top: var(--header-height, 56px);
  z-index: 900; /* por debajo del sidebar */
  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);
}
.cat-bar .cat-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  /* max-width: 1180px; */
  /* 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;
}
.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;
  align-items: center;
  padding: 7px 6px;
  color: #e3efff;
  text-decoration: none;
  border: 1px solid rgba(140, 170, 210, 0.18);
  /* Fondo con textura + overlay sutil */
  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;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.3);
  scroll-snap-align: start;
}
.cat-item:hover {
  border-color: rgba(160, 190, 230, 0.3);
  color: #ffffff;
}
.cat-item:active {
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}
.cat-icon {
  width: 30px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.cat-icon img {
  width: 30px;
  height: 30px;
  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: 800;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.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);
}

@media (max-width: 768px) {
  /* Header superior y navegación móvil */
  .top-header {
    grid-template-columns: 1fr auto;
    height: 56px;
  }
  .header-brand {
    gap: 8px;
  }
  .header-brand img {
    width: 100px !important;
    height: 45px !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;
  }

  /* 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: 0px;
    min-width: 120px;
  }
  .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;
  }
  .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: 199px;
    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: 190px;
    width: 100vw;
    border-radius: none;
  }

  .cat-bar {
    top: 0px;
  }

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

/* ===== 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;
  }
}
.top-header .header-brand {
  display: inline-flex !important;
  align-items: center;
}
.top-header .header-brand img {
  width: 120px;
  height: auto;
  display: block;
}
