/* ================== OPTIMIZACIONES PARA LAZY LOADING ================== */
.games-container {
  min-height: 100vh;
  position: relative;
}
/* Vista filtrada: colapsar cualquier espacio superior y evitar min-height excesivo */
.games-container.filtered {
  min-height: auto !important;
  margin-top: 0 !important;
  padding-top: 64px !important;
}
.games-container.filtered .live-provider-section,
.games-container.filtered #gamesGrid,
.games-container.filtered .games-grid-optimized {
  margin-top: 8px !important;
}

.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--card) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    var(--card) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 16px;
  height: 300px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.provider-tabs {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--card);
  border-radius: 16px;
  margin: 24px 0;
  border: 1px solid var(--stroke);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.provider-tabs::-webkit-scrollbar {
  display: none;
}

/* Estilos del buscador */
.search-section {
  padding: 30px 0;
  background: linear-gradient(
    135deg,
    rgba(255, 213, 77, 0.05),
    rgba(224, 181, 74, 0.05)
  );
  border-radius: 20px;
  margin: 20px 0;
  border: 1px solid rgba(255, 213, 77, 0.1);
}

.search-form-home {
  display: flex;
  max-width: 800px;
  margin: 0 auto;
  gap: 0;
  align-items: stretch;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50px;
  border: 2px solid rgba(255, 213, 77, 0.2);
  overflow: hidden;
}

.search-input-home {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: all 0.3s ease;
}

.search-input-home::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.search-input-home:focus {
  background: rgba(255, 255, 255, 0.05);
}

.search-form-home:focus-within {
  border-color: #ffd54d;
  box-shadow: 0 0 0 4px rgba(255, 213, 77, 0.15);
}

.search-btn {
  padding: 16px 24px;
  background: linear-gradient(135deg, #ffd54d, #e0b54a);
  color: white;
  border: none;
  border-radius: 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  min-width: auto;
  white-space: nowrap;
}

.search-btn:hover {
  background: linear-gradient(135deg, #ffe477, #ffd54d);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 213, 77, 0.35);
}

.search-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(255, 213, 77, 0.3);
}

/* Estilos de la sección de proveedores */
.providers-showcase {
  margin: 40px 0;
  padding: 30px 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 213, 77, 0.03),
    rgba(224, 181, 74, 0.03)
  );
  border-radius: 20px;
  border: 1px solid rgba(255, 213, 77, 0.1);
}

.providers-header {
  text-align: center;
  margin-bottom: 30px;
}

.providers-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.providers-header p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.provider-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 2px solid rgba(255, 213, 77, 0.2);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.provider-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 213, 77, 0.08),
    rgba(224, 181, 74, 0.08)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.provider-card:hover {
  transform: translateY(-5px);
  border-color: #ffd54d;
  box-shadow: 0 15px 35px rgba(255, 213, 77, 0.25);
}

.provider-card:hover::before {
  opacity: 1;
}

.provider-card.active {
  border-color: #ffd54d;
  background: linear-gradient(
    145deg,
    rgba(255, 213, 77, 0.12),
    rgba(224, 181, 74, 0.06)
  );
}

.provider-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
}

.provider-logo.all {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.provider-logo.gsp {
  background: linear-gradient(135deg, #ffd54d, #e0b54a);
}

.provider-logo.veritral {
  background: linear-gradient(135deg, #059669, #047857);
}

.provider-icon {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.provider-info {
  text-align: center;
  position: relative;
  z-index: 2;
}

.provider-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.provider-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 12px;
  line-height: 1.4;
}

.game-count {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 213, 77, 0.8),
    rgba(224, 181, 74, 0.8)
  );
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.provider-tab {
  padding: 12px 24px;
  border-radius: 25px;
  border: 2px solid var(--stroke);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.provider-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.provider-tab:hover::before {
  left: 100%;
}

.provider-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.provider-tab:hover:not(.active) {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-1px);
}

.games-grid-optimized {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 5px;
}

.game-card-optimized {
  background: linear-gradient(145deg, #1f2937, #111827);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 213, 77, 0.2);
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  content-visibility: auto;
  contain-intrinsic-size: 320px 280px;
}

.game-card-optimized.loaded {
  opacity: 1;
  transform: translateY(0);
}

.game-card-optimized::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    rgba(255, 213, 77, 0.12),
    rgba(224, 181, 74, 0.12)
  );
  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(255, 213, 77, 0.3);
  border-color: #ffd54d;
}

.game-card-optimized:hover::before {
  opacity: 1;
}

.game-image-container {
  position: relative;
  width: 100%;
  /* Mantener proporción uniforme para todas las portadas */
  /* aspect-ratio: 16/9; */
  height: auto;
  overflow: hidden;
  /* background: var(--bg-2); */
}

.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,
    rgba(124, 58, 237, 0.9),
    rgba(139, 92, 246, 0.9)
  );
  color: white;
}

.provider-badge.veritral {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.9),
    rgba(139, 92, 246, 0.9)
  );
  color: white;
}

.game-info {
  padding: 20px;
  position: relative;
  z-index: 3;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.game-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-vendor {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
  text-transform: uppercase;
  font-weight: 600;
}

.game-actions-optimized {
  display: flex;
  gap: 12px;
  background-color: var(--primary);
}

.btn-play {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ffd54d, #e0b54a);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 213, 77, 0.3);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-play::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-play:hover::before {
  left: 100%;
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 213, 77, 0.5);
  background: linear-gradient(135deg, #ffe477, #ffd54d);
}

.btn-play:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 213, 77, 0.4);
}

.load-more-container {
  text-align: center;
  margin: 40px 0;
}

.btn-load-more {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent), #b8860b);
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.btn-load-more:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.4);
}

/* Secciones por proveedor (Live) */
.live-provider-section {
  margin: 24px 0;
  content-visibility: auto;
  contain-intrinsic-size: 100% 360px;
}
.live-provider-title {
  margin: 12px 0;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  border-left: 4px solid var(--primary);
  padding-left: 8px;
}
.provider-grid {
  margin-top: 8px;
}

/* Carrusel horizontal por fila de proveedor en modo ALL (igual a Home) */
.live-provider-section .games-grid-optimized.provider-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-auto-columns: calc(25% - 12px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  align-items: stretch;
}
.live-provider-section .games-grid-optimized.provider-grid::-webkit-scrollbar {
  height: 10px;
}
.live-provider-section
  .games-grid-optimized.provider-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.live-provider-section
  .games-grid-optimized.provider-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--red-primary), var(--red-dark));
  border-radius: 8px;
}
.live-provider-section
  .games-grid-optimized.provider-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--red-light), var(--red-primary));
}
/* Las tarjetas se ajustan por grid-auto-columns, sin flex fijo */

.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--stroke);
  margin: 20px 0;
}

.stats-item {
  text-align: center;
}

.stats-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  display: block;
}

.stats-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 768px) {
  .live-provider-section .games-grid-optimized.provider-grid {
    grid-auto-columns: calc(45% - 12px);
  }

  .games-grid-optimized {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    /* padding: 20px 10px; */
    /* max-width: 23%; */
  }

  .game-card-optimized {
    border-radius: 12px;
    min-width: 0; /* Permite que las tarjetas se contraigan */
  }

  .game-image {
    /* height: 140px; */
    width: 100%;
    /* object-fit: cover; */
    object-position: center;
  }

  .game-info {
    padding: 12px;
  }

  .game-title {
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 6px;
  }

  .game-vendor {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .btn-play {
    padding: 8px 12px;
    font-size: 11px;
    width: 100%;
    text-align: center;
  }

  .provider-tabs {
    padding: 16px;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .provider-tab {
    padding: 8px 12px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .stats-bar {
    flex-direction: row;
    /* gap: 16px; */
  }

  .search-section {
    margin: 15px 0;
    padding: 20px 0;
  }

  .search-form-home {
    flex-direction: row;
    gap: 0;
    padding: 0 15px;
    max-width: 95%;
  }

  .search-input-home {
    padding: 14px 18px;
    font-size: 14px;
  }

  .search-btn {
    padding: 14px 16px;
    font-size: 14px;
    min-width: 80px;
  }

  .providers-showcase {
    margin: 30px 0;
    padding: 20px 15px;
  }

  .providers-header h2 {
    font-size: 24px;
  }

  .providers-header p {
    font-size: 14px;
  }

  .providers-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .provider-card {
    padding: 20px;
  }

  .provider-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 15px;
  }

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

  .provider-info h3 {
    font-size: 18px;
  }

  .provider-info p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .games-grid-optimized {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 15px 8px;
  }

  .game-info {
    padding: 10px;
  }

  .game-title {
    font-size: 12px;
  }

  .game-vendor {
    font-size: 9px;
    margin-bottom: 8px;
  }

  .btn-play {
    padding: 6px 8px;
    font-size: 10px;
  }

  .search-section {
    margin: 10px 0;
    padding: 15px 0;
  }

  .search-form-home {
    padding: 0 10px;
    gap: 0;
    max-width: 98%;
  }

  .search-input-home {
    padding: 12px 16px;
    font-size: 13px;
  }

  .search-btn {
    padding: 12px 14px;
    font-size: 13px;
    min-width: 70px;
  }

  .providers-showcase {
    margin: 25px 0;
    padding: 15px 10px;
  }

  .providers-header h2 {
    font-size: 22px;
  }

  .providers-grid {
    gap: 12px;
  }

  .provider-card {
    padding: 16px;
  }

  .provider-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }

  .provider-icon {
    font-size: 18px;
  }

  .provider-info h3 {
    font-size: 16px;
  }

  .provider-info p {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .games-grid-optimized {
    gap: 6px;
    padding: 10px 5px;
  }

  .game-info {
    padding: 8px;
  }

  .game-title {
    font-size: 11px;
  }

  .btn-play {
    padding: 5px 6px;
    font-size: 9px;
  }

  .search-section {
    margin: 8px 0;
    padding: 12px 0;
  }

  .search-form-home {
    padding: 0 8px;
    gap: 0;
    max-width: 99%;
  }

  .search-input-home {
    padding: 10px 14px;
    font-size: 12px;
  }

  .search-btn {
    padding: 10px 12px;
    font-size: 12px;
    min-width: 60px;
  }

  .providers-showcase {
    margin: 20px 0;
    padding: 12px 8px;
  }

  .providers-header h2 {
    font-size: 20px;
  }

  .providers-grid {
    gap: 10px;
  }

  .provider-card {
    padding: 14px;
  }

  .provider-logo {
    width: 45px;
    height: 45px;
    margin-bottom: 10px;
  }

  .provider-icon {
    font-size: 16px;
  }

  .provider-info h3 {
    font-size: 15px;
  }

  .provider-info p {
    font-size: 11px;
  }
}
/* ====== Proveedores (Móvil) ====== */
@media (max-width: 900px) {
  .providers-showcase {
    display: none !important;
  }
}
.providers-carousel {
  display: none;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.providers-carousel .scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.providers-carousel .item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 140px;
}
.providers-carousel .item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.providers-carousel .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* Modal/Sheet de Proveedores */
.providers-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
}
.providers-modal.open {
  display: block;
}
.providers-sheet {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  background: #0f0f11;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.providers-sheet .sheet-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.providers-sheet .sheet-title {
  font-weight: 600;
}
.providers-sheet .sheet-search {
  flex: 1;
  max-width: 60%;
}
.providers-sheet .sheet-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1a1a1d;
  color: #fff;
}
.providers-sheet .sheet-close {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
}
.providers-sheet .grid {
  padding: 12px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  flex: 1;
  align-content: start;
  align-items: start;
}
/* Ítem de proveedor tipo fila (estética moderna) */
.providers-sheet .prov-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}
.providers-sheet .prov-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.providers-sheet .prov-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.providers-sheet .prov-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}
.providers-sheet .prov-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

@media (max-width: 768px) {
  .providers-carousel {
    display: block;
    width: 100vw;
  }
  .providers-sheet .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .providers-sheet .prov-item {
    padding: 8px 10px;
    gap: 8px;
  }
  .providers-sheet .prov-logo {
    width: 22px;
    height: 22px;
  }
  .providers-sheet .prov-name {
    font-size: 12px;
  }
  .providers-sheet .sheet-header {
    padding: 10px;
    gap: 8px;
  }
  .providers-sheet .sheet-title {
    display: none;
  }
  .providers-sheet .sheet-search {
    max-width: none;
    flex: 1;
  }
  .providers-sheet .sheet-tabs {
    margin-left: 0;
  }
}
/* Tabs y contador para desktop */
.providers-sheet .sheet-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 12px;
}
.providers-sheet .sheet-tabs .tab-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
}
.providers-sheet .sheet-tabs .tab-btn.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}
.providers-sheet .prov-item .prov-count {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 4px 10px;
}

/* Desktop overlay: centrado y con ancho fijo */
@media (min-width: 901px) {
  .providers-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
  }
  .providers-sheet {
    position: fixed;
    inset: 6% 23%;
    width: auto;
    height: auto;
    overflow: auto;
    border-radius: 14px;
    background: rgba(20, 20, 22, 0.96);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  }
  .providers-sheet .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
/* === Overrides morados para alinear games.php con el index === */
:root {
  --purple-1: var(--primary);
  --purple-2: var(--primary-2);
  --purple-shadow: rgba(124, 58, 237, 0.4);
}
/* Buscador */
.search-section {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.06),
    rgba(139, 92, 246, 0.06)
  ) !important;
  border-color: rgba(124, 58, 237, 0.25) !important;
}
.search-form-home {
  border-color: rgba(124, 58, 237, 0.35) !important;
}
.search-form-home:focus-within {
  border-color: var(--purple-1) !important;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15) !important;
}
.search-btn {
  background: linear-gradient(
    135deg,
    var(--purple-1),
    var(--purple-2)
  ) !important;
  box-shadow: 0 8px 25px var(--purple-shadow) !important;
}
.search-btn:hover {
  background: linear-gradient(
    135deg,
    var(--purple-2),
    var(--purple-1)
  ) !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5) !important;
}
.search-btn:active {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35) !important;
}

/* Proveedores */
.provider-card {
  border-color: rgba(124, 58, 237, 0.35) !important;
}
.provider-card::before {
  background: linear-gradient(
    145deg,
    rgba(124, 58, 237, 0.08),
    rgba(139, 92, 246, 0.06)
  ) !important;
}
.provider-card:hover {
  border-color: var(--purple-1) !important;
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.25) !important;
}
.provider-card.active {
  border-color: var(--purple-1) !important;
  background: linear-gradient(
    145deg,
    rgba(124, 58, 237, 0.12),
    rgba(139, 92, 246, 0.08)
  ) !important;
}
.provider-logo.all,
.provider-logo.gsp,
.provider-logo.veritral {
  background: linear-gradient(
    135deg,
    var(--purple-1),
    var(--purple-2)
  ) !important;
}
.game-count {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.9),
    rgba(139, 92, 246, 0.9)
  ) !important;
  color: #fff !important;
}

/* Tarjetas de juego */
.game-card-optimized {
  border-color: rgba(124, 58, 237, 0.25) !important;
}
.game-card-optimized::before {
  background: linear-gradient(
    145deg,
    rgba(124, 58, 237, 0.12),
    rgba(139, 92, 246, 0.12)
  ) !important;
}
.game-card-optimized:hover {
  box-shadow: 0 25px 50px rgba(124, 58, 237, 0.3) !important;
  border-color: var(--purple-1) !important;
}
.game-actions-optimized {
  background-color: transparent !important;
}
.btn-play {
  background: linear-gradient(
    135deg,
    var(--purple-1),
    var(--purple-2)
  ) !important;
  box-shadow: 0 4px 15px var(--purple-shadow) !important;
}
.btn-play:hover {
  background: linear-gradient(
    135deg,
    var(--purple-2),
    var(--purple-1)
  ) !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5) !important;
}
.btn-play:active {
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35) !important;
}

/* Botón cargar más */
.btn-load-more {
  background: linear-gradient(
    135deg,
    var(--purple-1),
    var(--purple-2)
  ) !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.35) !important;
}
.btn-load-more:hover {
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.45) !important;
}

/* Scrollbars */
.live-provider-section
  .games-grid-optimized.provider-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ffd54d, #e0b54a) !important;
}
.live-provider-section
  .games-grid-optimized.provider-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #ffe477, #ffd54d) !important;
}
.veritral-providers-scroll {
  scrollbar-color: #ffd54d rgba(255, 255, 255, 0.1) !important;
}
.veritral-providers-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ffd54d, #e0b54a) !important;
}
.veritral-providers-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #ffe477, #ffd54d) !important;
}

/* Estado activo del ítem de categoría (Proveedores) */
.cat-item.active {
  box-shadow: 0 0 0 2px #facc15 inset, 0 6px 18px rgba(250, 204, 21, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Tarjetas de proveedores Veritral (fila) */
.veritral-provider-card:hover {
  border-color: var(--purple-1) !important;
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.22) !important;
}
.veritral-provider-card.active {
  border-color: var(--purple-1) !important;
  background: linear-gradient(
    145deg,
    rgba(124, 58, 237, 0.12),
    rgba(139, 92, 246, 0.08)
  ) !important;
}

/* ===== Mobile layout fixes to match Home ===== */
@media (max-width: 900px) {
  /* Ocultar sidebar propia de games.php y ajustar contenido */
  .sidebar {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
  }
  /* Compatibilidad con otras variantes */
  .left-rail {
    display: none !important;
  }
  body.with-left-rail {
    padding-left: 0 !important;
  }
  .page-content {
    padding-left: 0 !important;
    padding-bottom: 80px !important;
  }
  .topbar-inner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  /* Header móvil compacto */
  :root {
    --header-height: 52px;
  }
  .top-header {
    grid-template-columns: auto 1fr auto !important;
    padding: 0 12px !important;
    height: var(--header-height) !important;
    align-items: center;
  }
  .header-nav {
    display: none !important;
  }
  .header-actions .btn {
    font-size: 12px !important;
  }
  /* Botón hamburguesa compacto */
  #openMenu.hamburger-btn {
    display: inline-flex !important;
    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;
  }
  #openMenu.hamburger-btn:active {
    transform: scale(0.98);
  }

  /* Sidebar móvil desplegable */
  .sidebar.open,
  body.sidebar-open .sidebar {
    display: flex !important;
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    width: 280px !important;
    height: calc(100vh - var(--header-height)) !important;
    z-index: 9999 !important;
    transform: translateX(0) !important;
    transition: transform 0.3s ease !important;
  }

  /* Overlay para cerrar el menú */
  .sidebar.open::before,
  body.sidebar-open .sidebar::before {
    content: "";
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
}

/* Asegurar transparencia en contenedores hijos */
.games-container {
  background: transparent !important;
}
