/* ============================================
   PIXELCLUB — Component Styles
   ============================================ */

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-height);
  background: var(--bg-navbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-navbar);
  border-bottom: 2px solid rgba(0, 245, 212, 0.15);
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
  transition: background var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.98);
  border-bottom-color: rgba(0, 245, 212, 0.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
}

.navbar-logo {
  font-family: var(--font-pixel);
  font-size: var(--pixel-lg);
  color: var(--accent-games);
  text-decoration: none;
  text-shadow:
    0 0 8px var(--accent-games),
    0 0 20px rgba(0, 245, 212, 0.3);
  transition: text-shadow var(--transition-normal);
  white-space: nowrap;
}

.navbar-logo:hover {
  text-shadow:
    0 0 12px var(--accent-games),
    0 0 30px rgba(0, 245, 212, 0.5),
    0 0 50px rgba(0, 245, 212, 0.2);
  color: var(--accent-games);
}

.navbar-logo span {
  color: var(--accent-movies);
  text-shadow:
    0 0 8px var(--accent-movies),
    0 0 20px rgba(247, 37, 133, 0.3);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-link {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent-games);
  transition: width var(--transition-normal);
  box-shadow: 0 0 6px var(--accent-games);
}

.navbar-link:hover {
  color: var(--text-primary);
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

.navbar-link.active {
  color: var(--accent-games);
}

/* Hamburger menu */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-xs);
  /* position is required for z-index to apply — without it the open full-screen
     mobile menu (fixed, z 900) paints over the hamburger and the X can't be tapped */
  position: relative;
  z-index: var(--z-modal);
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.navbar-hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--accent-games);
  transition: all var(--transition-normal);
  image-rendering: pixelated;
}

.navbar-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.navbar-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.navbar-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile nav */
.navbar-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  z-index: var(--z-modal-overlay);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
}

.navbar-mobile.open {
  display: flex;
}

.navbar-mobile .navbar-link {
  font-size: var(--pixel-base);
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-hamburger { display: flex; }
  .navbar { padding: 0 var(--space-md); }
  .navbar-logo { font-size: var(--pixel-sm); }
}


/* ═══════════════════════════════════════════
   CONTENT CARDS (Games / Movies / Series)
   ═══════════════════════════════════════════ */
.content-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.content-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-games);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(0, 245, 212, 0.15);
}

.content-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-aspect-ratio);
  overflow: hidden;
  background: #10101c linear-gradient(90deg, #10101c 0%, #1c1c30 50%, #10101c 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.8s infinite linear;
}

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

.content-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.35s ease-out, transform var(--transition-slow);
}

/* Fade-in gated on the load event (onload adds .loaded) so the transition is visible */
.content-card-image img.loaded {
  opacity: 1;
}

.content-card:hover .content-card-image img {
  transform: scale(1.08);
}

.content-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.content-card:hover .content-card-overlay {
  opacity: 1;
}

.content-card-overlay .card-rating {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--accent-series);
}

.content-card-badge {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  padding: 3px 8px;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  text-transform: uppercase;
  z-index: 3;
}

.content-card-badge.badge-games {
  background: var(--accent-games);
  color: var(--text-inverse);
}
.content-card-badge.badge-movies {
  background: var(--accent-movies);
  /* Era blanco: 3,78:1 sobre el magenta, por debajo del mínimo. Además era la
     única de las tres etiquetas que no usaba el texto oscuro, así que esto
     arregla el contraste y de paso las deja coherentes entre sí. */
  color: var(--text-inverse);
}
.content-card-badge.badge-series {
  background: var(--accent-series);
  color: var(--text-inverse);
}

/* Favorite button */
.fav-btn {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--pixel-xl);
  cursor: pointer;
  z-index: 4;
  transition: all var(--transition-fast);
}

.fav-btn:hover {
  transform: scale(1.15);
  border-color: var(--accent-movies);
  background: rgba(247, 37, 133, 0.2);
}

.fav-btn.active {
  border-color: var(--accent-movies);
}

.content-card-info {
  padding: var(--space-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-2xs);
}

.content-card-title {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.content-card-meta {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.content-card-year {
  color: var(--text-secondary);
}

.content-card-genre {
  font-size: var(--pixel-lg);
  color: var(--text-secondary);
}

/* Trending indicator — bottom-left so it never overlaps the favorite button (top-left)
   or the type badge (top-right) */
.content-card.trending::before {
  content: '🔥';
  position: absolute;
  bottom: var(--space-xs);
  left: var(--space-xs);
  font-size: var(--pixel-xl);
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255, 100, 0, 0.5));
}


/* ═══════════════════════════════════════════
   YOUTUBER CARDS
   ═══════════════════════════════════════════ */
.youtuber-card {
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.06);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
}

.youtuber-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-movies);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(247, 37, 133, 0.15);
}

.youtuber-avatar {
  width: 100px;
  height: 100px;
  border: 3px solid var(--accent-games);
  overflow: hidden;
  background: var(--bg-secondary);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  image-rendering: pixelated;
}

.youtuber-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.youtuber-card:hover .youtuber-avatar {
  border-color: var(--accent-movies);
  box-shadow: var(--shadow-glow-magenta);
}

.youtuber-name {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-primary);
  line-height: 1.4;
}

.youtuber-subs {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.youtuber-category {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  text-transform: uppercase;
  border: 2px solid;
}

.youtuber-category.cat-gaming {
  color: var(--accent-games);
  border-color: var(--accent-games);
  background: rgba(0, 245, 212, 0.08);
}
.youtuber-category.cat-entretenimiento {
  color: var(--accent-movies-texto);   /* contraste AA en 7 px */
  border-color: var(--accent-movies);
  background: rgba(247, 37, 133, 0.08);
}
.youtuber-category.cat-variedad {
  color: var(--accent-series);
  border-color: var(--accent-series);
  background: rgba(255, 214, 10, 0.08);
}
.youtuber-category.cat-humor {
  color: #ff6b6b;
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
}
.youtuber-category.cat-vlogs {
  color: #4ecdc4;
  border-color: #4ecdc4;
  background: rgba(78, 205, 196, 0.08);
}


/* ═══════════════════════════════════════════
   CAROUSEL
   ═══════════════════════════════════════════ */
.carousel-section {
  position: relative;
  margin-bottom: var(--space-2xl);
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.carousel-title {
  font-family: var(--font-pixel);
  font-size: var(--pixel-base);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* El icono del titular. Antes esto era un emoji a 24px con `font-family:
   sans-serif`; ahora es un SVG de la rejilla de 24x24 (utils/iconos.js) que
   HEREDA EL COLOR del texto, así que toma el acento de cada zona en vez de ir
   siempre con los colores que le ponga el sistema operativo. */
.carousel-title .titulo-ico,
.subcategory-title .titulo-ico,
.section-title .titulo-ico {
  display: inline-flex;
  align-items: center;
  color: var(--zone-primary, var(--accent-games));
  flex-shrink: 0;
}
.carousel-title .titulo-ico .ico,
.subcategory-title .titulo-ico .ico,
.section-title .titulo-ico .ico { display: block; }

/* La cabecera de página, más grande y con el brillo de neón de su zona. */
.page-icon {
  display: inline-flex;
  align-items: center;
  color: var(--zone-primary, var(--accent-games));
  filter: drop-shadow(0 0 8px currentColor);
}

.carousel-see-all {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--accent-games);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.carousel-see-all:hover {
  color: var(--text-primary);
}

.carousel-container {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Carousel items sizing */
.carousel-track .content-card {
  width: 180px;
}

.carousel-track .youtuber-card {
  width: 200px;
}

/* Navigation arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--bg-primary);
  border: 2px solid var(--accent-games);
  color: var(--accent-games);
  font-family: var(--font-pixel);
  font-size: var(--pixel-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-dropdown);
  transition: all var(--transition-fast);
  opacity: 0.85;
}

/* On devices with a real pointer, fade the arrows in on hover for a cleaner look */
@media (hover: hover) {
  .carousel-arrow { opacity: 0; }
  .carousel-container:hover .carousel-arrow { opacity: 1; }
}

/* Keep arrows visible and tappable when focused (keyboard users) */
.carousel-arrow:focus-visible {
  opacity: 1;
}

.carousel-arrow:hover {
  background: var(--accent-games);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow-cyan);
}

.carousel-arrow-left {
  left: -10px;
}

.carousel-arrow-right {
  right: -10px;
}

/* Edge fade */
.carousel-container::before,
.carousel-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 100%;
  z-index: var(--z-base);
  pointer-events: none;
}

.carousel-container::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.carousel-container::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-primary), transparent);
}


/* ═══════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════ */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-secondary);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg,
      rgba(10, 10, 15, 0.3) 0%,
      rgba(10, 10, 15, 0.5) 50%,
      rgba(10, 10, 15, 0.95) 85%,
      var(--bg-primary) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: var(--space-3xl) var(--space-xl);
  max-width: 700px;
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: var(--pixel-3xl);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-title .highlight-cyan {
  color: var(--accent-games);
  text-shadow:
    0 0 10px var(--accent-games),
    0 0 20px rgba(0, 245, 212, 0.3);
}

.hero-title .highlight-magenta {
  color: var(--accent-movies);
  text-shadow:
    0 0 10px var(--accent-movies),
    0 0 20px rgba(247, 37, 133, 0.3);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
  max-width: 550px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-banner { min-height: 60vh; }
  .hero-content { padding: var(--space-2xl) var(--space-md); }
  .hero-title { font-size: var(--pixel-xl); }
  .hero-subtitle { font-size: var(--text-lg); }
}

@media (max-width: 480px) {
  .hero-banner { min-height: 50vh; }
  .hero-title { font-size: var(--pixel-lg); }
}


/* ═══════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════ */
.search-bar {
  position: relative;
  max-width: 400px;
  width: 100%;
}

.search-bar input {
  width: 100%;
  padding: var(--space-sm) var(--space-lg);
  padding-left: 44px;
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
}

.search-bar input:focus {
  border-color: var(--accent-games);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.15);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--pixel-xl);
  pointer-events: none;
}


/* ═══════════════════════════════════════════
   CATEGORY FILTERS
   ═══════════════════════════════════════════ */
.category-filter {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex-shrink: 0;
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  text-transform: uppercase;
  border: 2px solid var(--text-muted);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--accent-games);
  color: var(--accent-games);
  background: rgba(0, 245, 212, 0.06);
}

.filter-pill.active {
  background: var(--accent-games);
  color: var(--text-inverse);
  border-color: var(--accent-games);
}


/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-games {
  background: rgba(0, 245, 212, 0.15);
  color: var(--accent-games);
  border: 1px solid var(--accent-games);
}
.badge-movies {
  background: rgba(247, 37, 133, 0.15);
  color: var(--accent-movies);
  border: 1px solid var(--accent-movies);
}
.badge-series {
  background: rgba(255, 214, 10, 0.15);
  color: var(--accent-series);
  border: 1px solid var(--accent-series);
}


/* ═══════════════════════════════════════════
   GRIDS
   ═══════════════════════════════════════════ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--space-lg);
}

.youtuber-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 480px) {
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
  }
  .youtuber-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
  }
}


/* ═══════════════════════════════════════════
   PIXEL LOADER
   ═══════════════════════════════════════════ */
.pixel-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: var(--z-loader);
}

.pixel-loader {
  display: flex;
  gap: 8px;
}

.pixel-loader-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-games);
  animation: pixelBounce 0.6s ease-in-out infinite alternate;
  image-rendering: pixelated;
}

.pixel-loader-dot:nth-child(2) {
  animation-delay: 0.1s;
  background: var(--accent-movies);
}

.pixel-loader-dot:nth-child(3) {
  animation-delay: 0.2s;
  background: var(--accent-series);
}

.pixel-loader-dot:nth-child(4) {
  animation-delay: 0.3s;
  background: var(--pixel-green);
}

.pixel-loader-dot:nth-child(5) {
  animation-delay: 0.4s;
  background: var(--accent-hover);
}

@keyframes pixelBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-16px); }
}

.pixel-loader-text {
  font-family: var(--font-pixel);
  font-size: var(--pixel-sm);
  color: var(--text-secondary);
  animation: blink 1s step-start infinite;
}


/* ═══════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.tab-btn {
  flex-shrink: 0;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  transition: width var(--transition-normal);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  width: 100%;
}

.tab-btn.tab-games::after { background: var(--accent-games); }
.tab-btn.tab-games.active { color: var(--accent-games); }

.tab-btn.tab-movies::after { background: var(--accent-movies); }
.tab-btn.tab-movies.active { color: var(--accent-movies); }

.tab-btn.tab-series::after { background: var(--accent-series); }
.tab-btn.tab-series.active { color: var(--accent-series); }

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}


/* ═══════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════ */
.pixel-input,
.pixel-textarea,
.pixel-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
}

.pixel-input:focus,
.pixel-textarea:focus,
.pixel-select:focus {
  border-color: var(--accent-games);
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.12);
}

.pixel-input::placeholder,
.pixel-textarea::placeholder {
  color: var(--text-muted);
}

.pixel-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}


/* ═══════════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════════ */
.section-header {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
}

.section-title-inline {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-title-inline h2 {
  white-space: nowrap;
}

.section-title-inline::after {
  content: '';
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--text-muted) 0px,
    var(--text-muted) 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: 0.3;
}


/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
/* El separador de arriba se ve de verdad (era 0.1 de opacidad, casi invisible)
   y el hueco antes del pie baja de --space-4xl a --space-2xl: con 96px de
   margen sobraba una franja negra de 110px entre el último módulo del Inicio y
   el pie, que es el "hueco gigante" del que se quejaba Rubén. */
.footer {
  background: var(--bg-secondary);
  border-top: 2px solid rgba(0, 245, 212, 0.28);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: var(--space-2xl);
}

/* CINCO columnas: la marca y las cuatro secciones del mapa del sitio. Antes
   eran cuatro con solo tres enlaces reales dentro, y se veía ancho y vacío. */
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: var(--space-xl);
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  font-family: var(--font-pixel);
  font-size: var(--pixel-base);
  color: var(--accent-games);
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.3);
}

.footer-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 300px;
}

.footer-section h2 {
  font-size: var(--pixel-xs);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

.footer-link {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  padding: var(--space-2xs) 0;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-games);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer-bottom span {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
}

/* Créditos legales (TMDB / YouTube). Van en la fuente de texto normal porque
   la pixel a 8px es ilegible para una frase larga. */
.footer-bottom .footer-creditos {
  display: block;
  margin: var(--space-sm) auto 0;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.5;
  opacity: 0.65;
  max-width: 620px;
}

.footer-bottom .credito-enlace {
  color: var(--accent-movies, #f72585);
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: repeat(4, 1fr);
  }
  .footer-brand {
    grid-column: span 4;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    padding: 0 var(--space-md);
  }
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
}


/* ═══════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════ */
.stats-bar {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.stat-value {
  font-family: var(--font-pixel);
  font-size: var(--pixel-lg);
  color: var(--accent-games);
}

.stat-label {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
}


/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: var(--pixel-6xl);
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

/* Acciones bajo un estado vacío (c-02): el vacío honesto no es un callejón —
   siempre ofrece adónde ir. Centradas como el resto de la caja, y con
   envoltura para que dos botones convivan en una pantalla estrecha. */
.empty-state-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ═══════════════════════════════════════════
   CONTENT DETAIL MODAL (Trailers, Keys, Streamers)
   ═══════════════════════════════════════════ */
.content-detail-modal {
  max-width: 850px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-games);
  box-shadow: 0 10px 40px rgba(0, 245, 212, 0.25), 0 0 80px rgba(0, 0, 0, 0.9);
  background: var(--bg-card);
}

/* La ficha como página, con dirección propia (t-07, pages/Ficha.js): la MISMA
   caja que la ventana, pero dentro del documento. Se le quita lo que solo
   tiene sentido flotando (alto máximo con su propio desplazamiento, entrada
   animada); lo demás —marco, portada, cuerpo— se hereda tal cual, para que
   las dos enseñen lo mismo. */
.page-ficha {
  padding-block: var(--space-lg) var(--pc-ritmo);
}
/* El «volver» y la caja, con el mismo ancho máximo que .content-detail-modal
   (850 px, más abajo): sin esto, en escritorio el enlace se quedaba pegado al
   borde de la página y la caja centrada, cada uno por su lado. */
.page-ficha > * {
  max-width: 850px;
  margin-inline: auto;
}
.ficha-migas { margin-bottom: var(--space-md); }
.ficha-volver {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--accent-games);
  text-decoration: none;
}
.ficha-volver:hover { color: var(--text-primary); }
.content-detail-modal.ficha-pagina {
  width: 100%;
  max-height: none;
  overflow: visible;
  margin: 0 auto;
  animation: none;
}

.modal-header-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal-trailer-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-body-content {
  padding: var(--space-xl);
}

.modal-item-title {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xl);
  color: var(--text-primary);
  margin-top: var(--space-xs);
}

.modal-item-meta {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.modal-badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.modal-rating-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.rating-badge-large {
  font-family: var(--font-pixel);
  font-size: var(--pixel-2xl);
  color: var(--accent-series);
  text-shadow: 0 0 10px var(--accent-series);
}

.rating-score-title {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-muted);
}

.rating-score-value {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--accent-games);
}

.buy-key-btn {
  background: linear-gradient(135deg, var(--accent-games) 0%, var(--accent-info) 100%);
  color: var(--text-inverse) !important;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(0, 245, 212, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.buy-key-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.5);
}

.modal-streamer-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 30px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.modal-streamer-chip:hover {
  background: rgba(247, 37, 133, 0.2);
  border-color: var(--accent-movies);
  color: #fff;
}

.modal-streamer-chip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.modal-section h3 {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--accent-games);
  margin-bottom: var(--space-xs);
}

.modal-description {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-overlay);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.35s ease-out;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.8);
  color: var(--text-primary);
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-movies);
  border-color: var(--accent-movies);
  transform: rotate(90deg);
}

.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 245, 212, 0.15);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--accent-games);
}

.tag-pill.tag-muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 20px;
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent-games);
  color: var(--accent-games);
}

.btn-outline.active {
  border-color: var(--accent-movies);
  background: rgba(247, 37, 133, 0.15);
  color: var(--accent-movies);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  border-color: var(--accent-games);
}

@media (max-width: 768px) {
  .content-detail-modal {
    width: 98%;
    max-height: 95vh;
  }
  .modal-body-content {
    padding: var(--space-md);
  }
  .modal-item-title {
    font-size: var(--pixel-base);
  }
}


/* ── Avatares de muestra del perfil ──────────────────────────────────────────
   Estaban escritos dentro del HTML: un `style=` largo más un `onmouseover` y un
   `onmouseout` que reescribían el borde, la escala y la sombra a mano. Eso
   obligaba a permitir JavaScript en línea, y con eso la Content-Security-Policy
   no se puede poner en estricto —que es la defensa de fondo del token de sesión
   (hallazgo F3)—. Aquí hace lo mismo un `:hover` normal, que además funciona con
   teclado gracias al `:focus-visible`. */
.preset-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(0, 245, 212, 0.2);
  border-radius: 4px;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.preset-avatar-item:hover,
.preset-avatar-item:focus-visible {
  border-color: var(--accent-games);
  transform: scale(1.05);
  box-shadow: 0 0 12px var(--accent-games);
}

.preset-avatar-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid var(--accent-games);
  background: #000;
}

.preset-avatar-nombre {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--text-primary);
  margin-top: 6px;
  text-align: center;
}

.preset-avatar-icono {
  font-family: var(--font-pixel);
  font-size: var(--pixel-xs);
  color: var(--accent-series);
  margin-top: 2px;
}

/* Quien haya pedido menos movimiento no quiere que las cosas den un salto al
   pasar por encima (ley de diseño: las animaciones respetan la preferencia). */
@media (prefers-reduced-motion: reduce) {
  .preset-avatar-item:hover,
  .preset-avatar-item:focus-visible {
    transform: none;
  }
}


/* ============================================================
   BOTONES DE REDES DE UN CREADOR
   ============================================================
   Compartidos entre el módulo Creadores del Inicio y la rejilla de
   `#/youtubers`. Viven aquí y no en la hoja del Inicio porque ya no son de
   una pantalla concreta.

   PASTILLA NEUTRA Y COLOR SOLO EN EL LOGOTIPO. El rojo de YouTube (#FF0000) y
   el de Netflix (#E50914) son casi el mismo, y en el Inicio conviven a dos
   columnas de distancia: con las dos pastillas teñidas de rojo no se
   distinguía una de otra. El logotipo, aunque mida 15px, es inconfundible.

   Los colores van en clases y no en `style=` en línea porque la CSP del
   proyecto es estricta y un estilo en línea es justo lo que bloquea. */
.redes-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.red-btn {
  --red-rgb: 235, 235, 240;
  --red-tinta: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
  padding: 0 11px 0 8px;
  border-radius: var(--radius-full);
  background: rgba(var(--red-rgb), .10);
  border: 1px solid rgba(var(--red-rgb), .26);
  color: var(--red-tinta);
  /* Tipografía propia: casi toda la web hereda la pixel art, y estas marcas se
     reconocen por su forma, así que piden una grotesca normal. */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.red-btn:hover,
.red-btn:focus-visible {
  background: rgba(var(--red-rgb), .20);
  border-color: rgba(var(--red-rgb), .48);
}

/* El logotipo trae sus propios colores; aquí solo se le impide encogerse. */
.red-btn .red-marca { flex: 0 0 auto; display: block; }

/* Las redes que aún no tienen logotipo dibujado se tiñen con su color de
   marca, para que se distingan entre sí mientras tanto. */
.red-btn.es-kick      { --red-rgb: 83, 252, 24;   --red-tinta: #8CFF6B; }
.red-btn.es-tiktok    { --red-rgb: 0, 242, 234;   --red-tinta: #5EEDE8; }
.red-btn.es-instagram { --red-rgb: 228, 64, 149;  --red-tinta: #F080B8; }
.red-btn.es-x         { --red-rgb: 235, 235, 240; --red-tinta: #E8E8ED; }

/* En la rejilla de creadores van centrados bajo la categoría, y con sitio
   propio para que la tarjeta no los apriete contra el borde. */
.youtuber-card .redes-btns {
  justify-content: center;
  margin-top: 10px;
}
