/* ============================================================ */
/* FUTBITO - HOJA DE ESTILOS MODULAR Y PERSONALIZADA           */
/* ============================================================ */

/* ============================================================ */
/* FUTBITO - SISTEMA DE DISEÑO ESTILO ROCKSTAR GAMES            */
/* Paleta: Fondo Carbón #101014 | Acento Esmeralda #10B981     */
/* Tipografía: Bebas Neue (Condensed) + Plus Jakarta Sans       */
/* ============================================================ */

/* Tipografía cargada eficientemente desde base.html con preconnect */
@import url('components/buttons.css?v=20261113_v1');
@import url('components/loading.css?v=20261113_v1');
@import url('components/nav.css?v=20261113_v1');
@import url('views/pitch.css?v=20261113_v1');
@import url('views/games.css?v=20261113_v2');
@import url('modals/manager.css?v=20261113_v2');
@import url('modals/share.css?v=20261113_v1');
@import url('views/copero.css?v=20261113_v1');

:root {
  --rs-bg: #08080b;
  --rs-bg-alt: #0e0f14;
  --rs-surface: #12131b;
  --rs-surface-hover: #191a24;
  --rs-accent: #10b981;
  --rs-accent-hover: #059669;
  --rs-accent-glow: rgba(16, 185, 129, 0.4);
  --rs-text: #f9fafb;
  --rs-text-muted: #9ca3af;
  --rs-border: rgba(255, 255, 255, 0.08);
  --rs-border-hover: rgba(255, 255, 255, 0.2);
  --font-headline: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* ============================================================ */
/* REGLA 1: ESTRUCTURA GENERAL Y MODO OSCURO INMERSIVO         */
/* ============================================================ */
body {
  background-color: #08080b !important;
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(30, 36, 50, 0.35) 0%, transparent 65%),
    radial-gradient(circle at 85% 25%, rgba(18, 22, 32, 0.3) 0%, transparent 50%) !important;
  color: var(--rs-text) !important;
  font-family: var(--font-body) !important;
  letter-spacing: -0.01em;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  body {
    background-attachment: fixed !important;
  }
}

/* Espaciado de vistas de minijuegos para garantizar espacio negativo */
main[id^="view-"]:not(#view-hub) {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  width: 100%;
  max-width: 56rem;
}

/* ============================================================ */
/* REGLA 2: TIPOGRAFÍA DE ALTO IMPACTO (ROCKSTAR CONDENSED)    */
/* ============================================================ */
.rs-headline {
  font-family: var(--font-headline) !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.02em !important;
}

.rs-eyebrow {
  font-family: var(--font-body) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--rs-accent) !important;
}

/* ============================================================ */
/* REGLA 5: BOTONES ESTILO PÍLDORA (PILL BUTTONS)              */
/* ============================================================ */
.rs-btn-pill-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  border-radius: 9999px !important;
  padding: 12px 28px !important;
  background-color: var(--rs-accent) !important;
  color: #05140d !important;
  font-family: var(--font-body) !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 18px var(--rs-accent-glow) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.rs-btn-pill-primary:hover {
  transform: scale(1.03) !important;
  background-color: var(--rs-accent-hover) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.55) !important;
}

.rs-btn-pill-secondary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  border-radius: 9999px !important;
  padding: 12px 28px !important;
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: var(--rs-text) !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(8px) !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.2s ease !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.rs-btn-pill-secondary:hover {
  transform: scale(1.03) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

/* ============================================================ */
/* REGLA 4: BANNERS HORIZONTALES Y TARJETAS ROCKSTAR            */
/* ============================================================ */
.rs-banner-container {
  position: relative !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background-color: #15161e !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
  transition: border-color 0.25s ease, transform 0.25s ease !important;
}

.rs-banner-container:hover {
  border-color: rgba(16, 185, 129, 0.4) !important;
}

.rs-game-card {
  position: relative !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #15161e !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease !important;
  cursor: pointer !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 1.5rem !important;
}

/* Espaciado generoso en el Hub */
#view-hub .rs-game-card {
  padding: 2rem !important;
  min-height: 280px !important;
}
@media (min-width: 640px) {
  #view-hub .rs-game-card { padding: 2.25rem !important; }
}
#view-hub .rs-game-card h3 {
  font-size: 2.4rem !important;
  margin-top: 0.5rem !important;
}
#view-hub .rs-game-card p {
  font-size: 0.875rem !important;
  line-height: 1.65 !important;
  margin-top: 0.85rem !important;
  color: #a1a1aa !important;
  max-width: 34ch;
}

.rs-game-card:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.12) !important;
}

/* ============================================================ */
/* REGLA 6: MENÚ OFF-CANVAS / PANEL DERECHO GIGANTE            */
/* ============================================================ */
.rs-offcanvas-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  background: rgba(16, 16, 20, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  transition: opacity 0.3s ease !important;
}

.rs-offcanvas-panel {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 520px !important;
  background: #121319 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.85) !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 1001 !important;
  overflow-y: auto !important;
  animation: rsSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes rsSlideInRight {
  from {
    transform: translateX(100%);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.rs-nav-giant-link {
  font-family: var(--font-headline) !important;
  font-size: clamp(2rem, 5vw, 3.2rem) !important;
  text-transform: uppercase !important;
  color: var(--rs-text) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.01em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.65rem 0 !important;
  transition: color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.rs-nav-giant-link:hover {
  color: var(--rs-accent) !important;
  transform: translateX(8px) !important;
}

.rs-nav-giant-link .rs-arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  color: var(--rs-accent);
}

.rs-nav-giant-link:hover .rs-arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ============================================================ */
/* HUB: LAYOUT CON ESPACIADO GENEROSO (independiente de Tailwind) */
/* ============================================================ */
.hub-wrap {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) { .hub-wrap { padding: 3.5rem 2.5rem 6rem; } }
@media (min-width: 1024px) { .hub-wrap { padding: 4rem 4rem 7rem; } }

/* Banner del Mánager */
.hub-banner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 2rem 1.5rem !important;
  margin-bottom: 5rem;
  background:
    radial-gradient(circle at 85% 50%, rgba(16, 185, 129, 0.12) 0%, transparent 55%),
    linear-gradient(135deg, #171822 0%, #12131b 100%) !important;
}
@media (min-width: 640px) { .hub-banner { padding: 3rem !important; } }
@media (min-width: 1024px) {
  .hub-banner { flex-direction: row; padding: 3.5rem 4rem !important; margin-bottom: 6rem; }
}

.hub-banner-content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hub-countdown {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  margin-bottom: 2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}
.hub-countdown strong { font-size: 0.9rem; }

.hub-banner-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hub-season-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--rs-accent);
  color: #05140d;
}

.hub-banner-title {
  font-size: clamp(2.6rem, 6vw, 4.25rem) !important;
  color: #fff;
  margin: 0 0 1.25rem;
}

.hub-banner-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #a1a1aa;
  max-width: 34rem;
  margin: 0 0 2.25rem;
}

.hub-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  padding: 1.1rem 1.5rem;
  margin-bottom: 2.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hub-stat { display: flex; align-items: center; gap: 0.75rem; }
.hub-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
}
.hub-stat-value { font-size: 0.95rem; font-weight: 800; color: #fff; margin-top: 0.15rem; }
.hub-stat-sep { width: 1px; height: 2rem; background: rgba(255, 255, 255, 0.1); }
@media (max-width: 639px) { .hub-stat-sep { display: none; } }

.hub-banner-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hub-banner-emblem { display: none; flex-shrink: 0; }
@media (min-width: 1024px) { .hub-banner-emblem { display: flex; } }
.hub-banner-emblem-box {
  width: 13rem;
  height: 13rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.hub-banner-emblem-box img {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.hub-banner-emblem-box:hover img { transform: scale(1.06); }

/* Cabecera de sección de juegos */
.hub-section-head {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .hub-section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; margin-bottom: 3rem; }
}
.hub-section-title {
  font-size: clamp(2.4rem, 5vw, 3.5rem) !important;
  color: #fff;
  margin-top: 0.6rem;
}

/* Grid de juegos */
.hub-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) { .hub-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (min-width: 1024px) { .hub-grid { grid-template-columns: repeat(3, 1fr); } }

/* Espaciado interno de tarjetas (sustituye clases Tailwind inexistentes) */
#view-hub .rs-game-card > div:first-child > div:first-child { margin-bottom: 1.5rem !important; }
#view-hub .rs-game-card > div:last-child {
  padding-top: 1.5rem !important;
  margin-top: 2rem !important;
}

/* ============================================================ */
/* HUB: DEGRADADO CÁLIDO (arriba) → FRÍO (abajo) DENTRO DE CADA TARJETA */
/* ============================================================ */
.hub-grid { gap: 2rem !important; }
@media (min-width: 768px) { .hub-grid { gap: 2.5rem !important; } }
@media (min-width: 1280px) { .hub-grid { gap: 3rem !important; } }

#view-hub .hub-grid > .rs-game-card {
  background:
    linear-gradient(180deg,
      rgba(249, 115, 22, 0.30) 0%,     /* naranja cálido */
      rgba(239, 68, 68, 0.16) 22%,     /* rojo */
      rgba(168, 85, 247, 0.10) 50%,    /* violeta (transición) */
      rgba(59, 130, 246, 0.18) 78%,    /* azul */
      rgba(6, 182, 212, 0.26) 100%     /* cian frío */
    ),
    #121319 !important;
  border-color: rgba(var(--card-hue), 0.35) !important;
}
#view-hub .hub-grid > .rs-game-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(var(--card-hue), 0.95), transparent);
}
#view-hub .hub-grid > .rs-game-card:hover {
  border-color: rgba(var(--card-hue), 0.75) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 32px rgba(var(--card-hue), 0.25) !important;
}

/* Color propio de cada juego (borde, línea superior y brillo) */
#view-hub #hub-card-wordle        { --card-hue: 239, 68, 68; }
#view-hub #hub-card-crest         { --card-hue: 249, 115, 22; }
#view-hub #hub-card-lineup        { --card-hue: 234, 179, 8; }
#view-hub #hub-card-draft         { --card-hue: 132, 204, 22; }
#view-hub #hub-card-market        { --card-hue: 16, 185, 129; }
#view-hub #hub-card-contrarreloj  { --card-hue: 59, 130, 246; }
#view-hub #hub-card-penalty       { --card-hue: 6, 182, 212; }
#view-hub #hub-card-ucl           { --card-hue: 99, 102, 241; }
/* ============================================================ */
/* NOTIFICACIONES SIEMPRE POR ENCIMA (incluido el menú lateral)  */
/* ============================================================ */
#manager-floating-toast,
#futbito-global-share-toast {
  z-index: 2147483000 !important;
  background: #15161e !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7), 0 0 24px rgba(16, 185, 129, 0.15) !important;
  color: #f9fafb !important;
}


/* ============================================================ */
/* OPTIMIZACIÓN RESPONSIVA GLOBAL PARA TODOS LOS DISPOSITIVOS    */
/* Móviles pequeños (320-375px), medianos (390-430px), tablets y escritorio */
/* ============================================================ */
@media (max-width: 639px) {
  /* Contenedor principal de la portada */
  .hub-wrap {
    padding: 1.25rem 0.85rem 3.5rem !important;
  }

  /* Banner del Mánager en móviles */
  .hub-banner {
    padding: 1.35rem 1rem !important;
    margin-bottom: 2.5rem !important;
    border-radius: 20px !important;
    gap: 1.5rem !important;
  }

  .hub-banner-title {
    font-size: 2.2rem !important;
    line-height: 0.95 !important;
    margin-bottom: 0.85rem !important;
  }

  .hub-banner-text {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
  }

  /* Barra de temporizador en móviles */
  .hub-countdown {
    font-size: 0.72rem !important;
    padding: 0.4rem 0.8rem !important;
    margin-bottom: 1.25rem !important;
  }

  /* Estadísticas del Mánager en móvil: 3 columnas compactas */
  .hub-stats {
    width: 100% !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0.75rem 0.5rem !important;
    gap: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 14px !important;
  }

  .hub-stat {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.25rem !important;
  }

  .hub-stat img {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }

  .hub-stat-label {
    font-size: 0.6rem !important;
  }

  .hub-stat-value {
    font-size: 0.8rem !important;
    margin-top: 0 !important;
  }

  /* Botones de acción del banner */
  .hub-banner-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
  }

  .hub-banner-actions button {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    font-size: 0.8rem !important;
  }

  /* Cabecera de sección de minijuegos */
  .hub-section-head {
    margin-bottom: 1.5rem !important;
    gap: 0.5rem !important;
  }

  .hub-section-title {
    font-size: 1.9rem !important;
    line-height: 0.95 !important;
  }

  /* Grid de juegos y tarjetas en móvil */
  .hub-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  #view-hub .rs-game-card {
    padding: 1.25rem 1rem !important;
    min-height: auto !important;
    border-radius: 18px !important;
  }

  #view-hub .rs-game-card h3 {
    font-size: 1.8rem !important;
    margin-top: 0.35rem !important;
    line-height: 1 !important;
  }

  #view-hub .rs-game-card p {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    margin-top: 0.5rem !important;
  }

  #view-hub .rs-game-card > div:first-child > div:first-child {
    margin-bottom: 0.75rem !important;
  }

  #view-hub .rs-game-card > div:last-child {
    margin-top: 1.25rem !important;
    padding-top: 1rem !important;
  }
}

/* Pantallas extra pequeñas (< 360px como iPhone SE / Galaxy Mini) */
@media (max-width: 359px) {
  .hub-wrap {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .hub-banner {
    padding: 1rem 0.75rem !important;
  }

  .hub-banner-title {
    font-size: 1.85rem !important;
  }

  #view-hub .rs-game-card {
    padding: 1rem 0.75rem !important;
  }

  #view-hub .rs-game-card h3 {
    font-size: 1.6rem !important;
  }
}

/* Tablets (iPad, Galaxy Tab 768px - 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .hub-wrap {
    padding: 2.5rem 2rem 5rem !important;
  }

  .hub-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.75rem !important;
  }

  #view-hub .rs-game-card {
    padding: 1.75rem !important;
  }
}


/* ============================================================ */
/* OPTIMIZACIONES DE RENDIMIENTO DE RENDERIZADO Y GPU (CORE WEB VITALS) */
/* ============================================================ */
/* Mejora drástica de scroll en móviles: renderizado diferido de tarjetas fuera de pantalla */
.hub-grid > .rs-game-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 320px;
}

/* Aceleración por hardware para elementos interactivos y modales */
.rs-game-card,
.rs-btn-pill-primary,
.rs-btn-pill-secondary,
.hub-banner,
#manager-modal > div {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Desactivar backdrop-filter pesado en dispositivos móviles con poca GPU */
@media (max-width: 639px) {
  header.sticky {
    background-color: #08080b !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .game-consumables-bar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #14151c !important;
  }

  [id$="-daily-toolbar"],
  [id$="-unlimited-toolbar"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #14151c !important;
  }
}

/* ============================================================ */
/* OPTIMIZACIONES GLOBALES PARA DISPOSITIVOS MÓVILES            */
/* ============================================================ */
/* Eliminar retardo táctil de 300ms y tap highlights molestos */
html, body {
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, a, input, select, textarea, .rs-game-card, .ig-tab-btn, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Modales y scrolls fluidos en móviles con contención de overscroll */
#manager-modal,
#manager-modal > div,
#pass-rewards-list {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Tamaño de toque accesible y rendimiento GPU en smartphones */
@media (max-width: 639px) {
  .rs-btn-pill-primary,
  .rs-btn-pill-secondary {
    min-height: 44px !important;
  }

  #manager-modal button,
  #manager-modal .ig-tab-active,
  #manager-modal .ig-tab-inactive {
    min-height: 40px !important;
  }

  /* Sombras optimizadas en GPUs móviles para sostener 60 FPS */
  .rs-game-card,
  .hub-banner,
  #manager-modal > div {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  }
}

/* ============================================================ */
/* OPTIMIZACIÓN EXTREMA DE ANIMACIONES EN MÓVILES (< 768px)    */
/* Elimina parpadeos continuos y efectos innecesarios para 60fps */
/* ============================================================ */
@media (max-width: 768px) {
  /* 1. Suprimir animaciones de parpadeo continuo que agotan la GPU móvil */
  .animate-pulse,
  [class*="animate-pulse"],
  .animate-ping,
  [class*="animate-ping"] {
    animation: none !important;
    -webkit-animation: none !important;
    opacity: 0.95 !important;
  }

  /* 2. Mantener solo giros necesarios (como spinners de carga activa) */
  .animate-spin {
    animation: spin 1s linear infinite !important;
  }

  /* 3. Desactivar elevaciones hover complejas al hacer scroll táctil */
  .rs-game-card:hover,
  .hub-banner:hover,
  button:hover {
    transform: none !important;
    -webkit-transform: none !important;
  }

  /* 4. Duración ultra rápida de transiciones para máxima reactividad táctil */
  .rs-game-card,
  .rs-btn-pill-primary,
  .rs-btn-pill-secondary,
  .ig-tab-active,
  .ig-tab-inactive {
    transition-duration: 0.08s !important;
  }

  /* 5. Asegurar que la barra de navegación nunca desborde horizontalmente */
  header.sticky {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  header.sticky nav {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================ */
/* BANNER FLOTANTE DE INSTALACIÓN PWA (ESTILO ROCKSTAR FLOTANTE)*/
/* ============================================================ */
#pwa-install-banner {
  position: fixed !important;
  bottom: 16px !important;
  left: 12px !important;
  right: 12px !important;
  z-index: 99999 !important;
  pointer-events: auto !important;
}

@media (min-width: 640px) {
  #pwa-install-banner {
    left: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    max-width: 420px !important;
    width: 100% !important;
  }
}

#pwa-install-banner.hidden {
  display: none !important;
}

#pwa-install-banner:not(.hidden) {
  display: block !important;
  animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes pwaSlideUp {
  0% {
    opacity: 0;
    transform: translateY(35px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pwa-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  background-color: #12131b !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  padding: 0.85rem 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 24px rgba(16, 185, 129, 0.2) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.pwa-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 0.75rem;
  background-color: #181922;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.pwa-btn-install {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background-color: #10b981 !important;
  color: #050505 !important;
  font-weight: 900;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  border: none;
  white-space: nowrap;
}
.pwa-btn-install:hover {
  background-color: #34d399 !important;
  transform: translateY(-1px);
}
.pwa-btn-install:active {
  transform: scale(0.95);
}

.pwa-btn-dismiss {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.pwa-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Modal específico para iOS */
#pwa-ios-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
@media (min-width: 640px) {
  #pwa-ios-modal {
    align-items: center;
  }
}
#pwa-ios-modal.hidden {
  display: none !important;
}

.pwa-ios-card {
  width: 100%;
  max-width: 380px;
  border-radius: 1.5rem;
  background-color: #12131b !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
