/* =====================================================================
   GameFlix — web pública
   ===================================================================== */

body.cards-landscape { --card-w: clamp(210px, 18.5vw, 300px); --card-ratio: 16 / 9; --grid-min: 230px; }
body.cards-portrait  { --card-w: clamp(132px, 12.5vw, 196px); --card-ratio: 2 / 3;  --grid-min: 150px; }

/* ================= CABECERA ================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 44px);
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 100%);
  transition: background 0.35s, box-shadow 0.35s, backdrop-filter 0.35s;
}
.site-header.scrolled {
  background: rgba(11, 11, 15, 0.9);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-2);
  font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; font-weight: 700; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ---------- Buscador ---------- */
.search {
  display: flex; align-items: center;
  border: 1px solid transparent; border-radius: 6px;
  transition: background 0.25s, border-color 0.25s;
}
.search input {
  width: 0; padding: 0; border: none; outline: none;
  background: transparent; color: #fff; font: inherit; font-size: 14.5px;
  transition: width 0.3s var(--ease), padding 0.3s var(--ease);
}
.search input::-webkit-search-cancel-button { display: none; }
.search.open { background: rgba(0, 0, 0, 0.75); border-color: rgba(255, 255, 255, 0.35); }
.search.open input { width: clamp(150px, 20vw, 260px); padding: 0 6px 0 0; }
.search-toggle { width: 38px; height: 38px; }
.search-clear { width: 30px; height: 30px; font-size: 22px; color: var(--muted); border-radius: 50%; }
.search-clear:hover { color: #fff; }

/* ---------- Desplegables ---------- */
.dropdown { position: relative; }
.dropdown-toggle svg { transition: transform 0.2s; }
.dropdown-toggle[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); left: 0;
  min-width: 230px; max-height: min(420px, 65vh); overflow-y: auto;
  background: rgba(18, 18, 23, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s var(--ease), visibility 0.18s;
  z-index: 600;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu-right { left: auto; right: 0; min-width: 190px; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14.5px; color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.dropdown-menu a span { color: var(--muted-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dropdown-menu button { justify-content: flex-start; }
.dropdown-menu button.active { color: #fff; background: var(--accent-soft); }
.lang-code {
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  width: 28px; padding: 2px 0; text-align: center; border-radius: 4px;
  background: rgba(255, 255, 255, 0.08); color: var(--muted);
}
.dropdown-menu button.active .lang-code { background: var(--accent); color: #fff; }
.dropdown-empty { display: block; padding: 10px 12px; color: var(--muted-2); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.lang-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ================= HERO ================= */
.hero {
  position: relative;
  height: min(90vh, 860px);
  min-height: 540px;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg, .hero-slide { position: absolute; inset: 0; }
.hero-slide { opacity: 0; transition: opacity 1.1s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide.is-banner img { object-position: center 25%; transform: scale(1.06); transition: transform 9s linear; }
.hero-slide.is-banner.active img { transform: scale(1); }
.hero-slide.is-cover img { filter: blur(42px) saturate(1.5) brightness(0.55); transform: scale(1.3); }

.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 11, 15, 0.92) 0%, rgba(11, 11, 15, 0.6) 35%, rgba(11, 11, 15, 0.05) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 15, 0.6) 18%, transparent 45%),
    linear-gradient(180deg, rgba(11, 11, 15, 0.55) 0%, transparent 22%);
}

.hero-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 48px;
  padding: 90px var(--gutter) clamp(120px, 18vh, 190px);
}
.hero-content { max-width: 600px; position: relative; z-index: 2; animation: heroIn 0.7s var(--ease) both; }
.hero-content > * { animation: heroIn 0.7s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: 0.05s; }
.hero-content > :nth-child(3) { animation-delay: 0.1s; }
.hero-content > :nth-child(4) { animation-delay: 0.15s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } }

.hero-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero-cat {
  font-size: 13px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-2);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 7.4vw, 112px);
  line-height: 0.9;
  letter-spacing: 1px;
  margin-bottom: 18px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
}
.hero-title.long { font-size: clamp(44px, 5.4vw, 82px); }
.hero-desc {
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 540px;
  margin-bottom: 26px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-poster { position: relative; z-index: 1; flex-shrink: 0; perspective: 1200px; }
.poster-frame {
  position: relative; overflow: hidden;
  background: var(--surface);
  width: clamp(320px, 36vw, 600px);
  aspect-ratio: var(--card-ratio);
  border-radius: 14px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: rotateY(-10deg) rotateX(2deg);
  animation: posterIn 0.9s var(--ease) both;
}
.poster-frame > img { width: 100%; height: 100%; object-fit: cover; }
.cards-portrait .poster-frame { width: clamp(220px, 21vw, 330px); }
@keyframes posterIn { from { opacity: 0; transform: rotateY(-22deg) translateX(40px) scale(0.94); } }
.hero.has-banner .hero-poster { display: none; }

.hero-dots {
  position: absolute; right: var(--gutter); bottom: clamp(130px, 19vh, 200px);
  display: flex; gap: 8px; z-index: 3;
}
.hero-dot {
  width: 30px; height: 4px; padding: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px; overflow: hidden;
  transition: width 0.3s var(--ease), background 0.2s;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.45); }
.hero-dot span { display: block; height: 100%; width: 0; background: #fff; }
.hero-dot.active { width: 46px; }
.hero-dot.active span { animation: dotProgress 8s linear forwards; }
.hero.paused .hero-dot.active span { animation-play-state: paused; }
@keyframes dotProgress { to { width: 100%; } }

/* ================= FILAS ================= */
.content { position: relative; z-index: 2; outline: none; }
.rows { margin-top: clamp(-150px, -16vh, -90px); padding-bottom: 30px; position: relative; }
body.no-hero .rows { margin-top: 0; padding-top: 110px; }

.row { margin-bottom: clamp(26px, 3.4vw, 44px); }
.row-title {
  padding: 0 var(--gutter);
  margin-bottom: 10px;
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 700;
  letter-spacing: -0.2px;
}
.row-title a { display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s; }
.row-title a:hover { color: #fff; }
.row-chevron { display: inline-flex; color: var(--accent-2); opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.25s var(--ease); }
.row-chevron svg { width: 22px; height: 22px; }
.row-title a:hover .row-chevron { opacity: 1; transform: none; }

.row-viewport { position: relative; }
.row-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w);
  gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  padding: 14px var(--gutter) 22px;
  margin: -14px 0 -22px;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > .card { scroll-snap-align: start; }

.row-arrow {
  position: absolute; top: 0; bottom: 0; z-index: 6;
  width: max(var(--gutter), 46px);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, background 0.2s;
}
.row-arrow svg { width: 36px; height: 36px; transition: transform 0.2s; }
.row-arrow.prev { left: 0; background: linear-gradient(90deg, rgba(11, 11, 15, 0.9), rgba(11, 11, 15, 0)); }
.row-arrow.next { right: 0; background: linear-gradient(-90deg, rgba(11, 11, 15, 0.9), rgba(11, 11, 15, 0)); }
.row-arrow:hover svg { transform: scale(1.25); }
.row-viewport.can-prev:hover .row-arrow.prev,
.row-viewport.can-next:hover .row-arrow.next { opacity: 1; pointer-events: auto; }
@media (hover: none) { .row-arrow { display: none; } }

/* ================= TARJETAS ================= */
.card {
  position: relative;
  aspect-ratio: var(--card-ratio);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  isolation: isolate;
}
.card-media { position: absolute; inset: 0; background: linear-gradient(110deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
.card-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s, transform 0.5s var(--ease); }
.card-media img.loaded { opacity: 1; }
.card-media:has(img.loaded) { animation: none; }
@keyframes shimmer { to { background-position: -300% 0; } }

.card .badge-new { position: absolute; top: 8px; left: 8px; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }

.card-info {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 38%, transparent 60%);
}
.card-title {
  font-size: 14.5px; font-weight: 700; line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-cat {
  font-size: 12px; color: var(--muted); font-weight: 500;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.25s, opacity 0.25s;
}
.card-actions {
  display: flex; gap: 6px; margin-bottom: 8px;
  max-height: 0; opacity: 0; overflow: hidden; transform: translateY(8px);
  transition: max-height 0.25s, opacity 0.25s, transform 0.25s var(--ease);
}

@media (hover: hover) {
  .card:hover, .card:focus-visible {
    transform: scale(1.07);
    z-index: 5;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.14);
  }
  .card:hover .card-media img { transform: scale(1.04); }
  .card:hover .card-media .fit-bg { transform: scale(1.3); }
  .card:hover .card-actions, .card:focus-within .card-actions { max-height: 44px; opacity: 1; transform: none; }
  .card:hover .card-cat, .card:focus-within .card-cat { max-height: 20px; opacity: 1; }
}
.card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.cbtn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(24, 24, 30, 0.7);
  color: #fff;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.cbtn svg { width: 19px; height: 19px; }
.cbtn:hover { border-color: #fff; background: rgba(60, 60, 70, 0.8); }
.cbtn:active { transform: scale(0.92); }
.cbtn-play { background: #fff; color: #000; border-color: #fff; }
.cbtn-play:hover { background: rgba(255, 255, 255, 0.85); }
.cbtn-more { margin-left: auto; }
.cbtn-lg { width: 46px; height: 46px; }
.cbtn-lg svg { width: 24px; height: 24px; }

/* ================= PÁGINAS (búsqueda, categoría, mi lista) ================= */
.page { padding: 120px var(--gutter) 40px; min-height: 70vh; }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 14px; transition: color 0.2s; }
.back-link:hover { color: #fff; }
.page-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(42px, 5vw, 70px); line-height: 0.95; letter-spacing: 0.5px;
  overflow-wrap: anywhere;
}
.page-title .accent { color: var(--accent-2); }
.page-subtitle { color: var(--muted); margin-top: 6px; font-size: 15px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
  gap: 22px 12px;
  margin-top: 28px;
}
.page-empty {
  margin-top: 28px; padding: 56px 24px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 14px;
  color: var(--text-2); font-size: 17px; font-weight: 600;
}
.page-empty span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 400; }

/* ================= ESTADO VACÍO ================= */
.empty-state {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px var(--gutter) 60px;
  overflow: hidden;
}
.empty-glow {
  position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.28), transparent 65%);
  filter: blur(20px);
  animation: glow 6s ease-in-out infinite alternate;
}
@keyframes glow { from { transform: scale(0.85); opacity: 0.7; } to { transform: scale(1.1); opacity: 1; } }
.empty-mark { position: relative; width: 92px; height: 92px; margin-bottom: 28px; filter: drop-shadow(0 18px 40px rgba(229, 9, 20, 0.5)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.empty-state h1 { position: relative; font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 6vw, 76px); line-height: 0.95; letter-spacing: 1px; margin-bottom: 14px; }
.empty-state p { position: relative; color: var(--muted); max-width: 460px; font-size: 16.5px; }

/* ================= FICHA DEL JUEGO ================= */
.overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(16px, 5vh, 56px) 16px;
  opacity: 0; transition: opacity 0.25s;
}
.overlay.open { opacity: 1; }
.detail {
  position: relative;
  max-width: 900px; margin: 0 auto;
  background: var(--bg-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line);
  transform: translateY(28px) scale(0.98);
  transition: transform 0.35s var(--ease);
}
.overlay.open .detail { transform: none; }
.detail-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  background: rgba(17, 17, 22, 0.85);
}
.detail-close:hover { background: #2a2a33; }

.detail-hero { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; background: var(--surface); }
.detail-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero.is-cover .detail-bg { filter: blur(36px) saturate(1.5) brightness(0.55); transform: scale(1.3); }
.detail-cover {
  position: absolute; right: 6%; top: 12%;
  width: 46%; aspect-ratio: var(--card-ratio); overflow: hidden;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.detail-cover > img { width: 100%; height: 100%; object-fit: cover; }
.cards-portrait .detail-cover { width: 27%; top: 8%; }
.detail-fade {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg-2) 0%, rgba(17, 17, 22, 0.55) 35%, transparent 65%),
              linear-gradient(90deg, rgba(17, 17, 22, 0.7) 0%, transparent 55%);
}
.detail-hero-content { position: absolute; left: 40px; right: 40px; bottom: 28px; }
.detail-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 5.4vw, 66px); line-height: 0.92; letter-spacing: 0.5px;
  margin-bottom: 18px; max-width: 60%;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  overflow-wrap: anywhere;
}
.detail-hero.is-banner .detail-title { max-width: 100%; }
.detail-actions { display: flex; align-items: center; gap: 10px; }

.detail-body { padding: 10px 40px 40px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.detail-cat {
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}
.detail-cat:hover { border-color: #fff; color: #fff; }
.detail-host { font-size: 13px; color: var(--muted-2); }
.detail-desc { font-size: 16px; line-height: 1.65; color: var(--text-2); max-width: 680px; white-space: pre-line; }
.detail-subtitle { font-size: 21px; font-weight: 700; margin: 34px 0 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cards-portrait .detail-grid { grid-template-columns: repeat(4, 1fr); }
.detail-grid .card:hover { transform: scale(1.04); }

/* ================= REPRODUCTOR ================= */
.player {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column;
  background: #000;
  opacity: 0; transition: opacity 0.25s;
}
.player.open { opacity: 1; }
.player-bar {
  display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 10px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: #0b0b0f;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.player-title { flex: 1; min-width: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-tools { display: flex; gap: 2px; }
.player-stage { position: relative; flex: 1; background: radial-gradient(ellipse at center, #15151b 0%, #000 70%); }
.game-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.4s; background: #000; }
.game-frame.ready { opacity: 1; }
.player-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: var(--muted); text-align: center; padding: 24px;
}
.player-slow { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 420px; margin-top: 8px; }
.player-slow p { font-size: 14px; }
.player:fullscreen .player-bar { background: rgba(11, 11, 15, 0.92); }

/* ================= PIE ================= */
.site-footer {
  padding: 50px var(--gutter) calc(50px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  margin-top: 30px;
  color: var(--muted-2);
  font-size: 13.5px;
}
.footer-brand { font-family: var(--font-display); font-size: 26px; letter-spacing: 1.5px; color: var(--text-2); margin-bottom: 10px; }
.footer-brand b { font-weight: 400; color: var(--accent-2); }
.footer-text { max-width: 640px; margin-bottom: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
body:has(.empty-state) .site-footer { margin-top: 0; }

.detail-host svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ================= PORTADAS CON OTRA PROPORCIÓN ================= */
/* Una carátula vertical en un marco 16:9 (o al revés) se ve entera sobre una
   copia desenfocada de sí misma, en vez de quedar recortada. */
.is-fit > img[data-fit] { object-fit: contain; position: relative; z-index: 1; }
.fit-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 1 !important;
  transform: scale(1.25);
}

/* ================= REPRODUCTOR AISLADO (play.html) ================= */
.play-page { overflow: hidden; background: #000; }
.play-page .player { opacity: 1; }
.play-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center;
}
.pf-cover {
  position: relative; overflow: hidden;
  width: min(440px, 82vw); aspect-ratio: var(--card-ratio, 16 / 9);
  border-radius: 12px; background: var(--surface);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}
.cards-portrait .pf-cover { width: min(260px, 60vw); }
.pf-cover > img { width: 100%; height: 100%; object-fit: cover; }
.play-fallback h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4.4vw, 48px); line-height: 1; letter-spacing: 0.5px; }
.play-fallback p { color: var(--muted); max-width: 480px; margin-bottom: 6px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1000px) {
  .hero { height: auto; min-height: 0; }
  .hero-inner {
    position: relative; inset: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 24px;
    padding: 110px var(--gutter) 96px;
  }
  .hero-poster { order: -1; perspective: none; }
  .poster-frame { width: 100%; max-width: 620px; transform: none; animation: heroIn 0.7s var(--ease) both; }
  .cards-portrait .poster-frame { width: min(62vw, 300px); }
  .hero-content { max-width: 100%; }
  .hero-shade {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(11, 11, 15, 0.55) 35%, rgba(11, 11, 15, 0.3) 100%);
  }
  .hero.has-banner .hero-inner { min-height: 72vh; }
  .hero-dots { bottom: 56px; }
}

@media (max-width: 760px) {
  body.cards-landscape { --card-w: 58vw; --grid-min: 150px; }
  body.cards-portrait { --card-w: 34vw; --grid-min: 104px; }

  .site-header { flex-wrap: wrap; row-gap: 4px; padding-bottom: 6px; }
  .brand-word { font-size: 26px; }
  .brand-mark { width: 28px; height: 28px; }
  .main-nav { order: 3; width: 100%; margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - 12px); overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { font-size: 14px; padding: 6px 12px; }
  .main-nav .dropdown-menu { position: fixed; top: auto; left: 16px; right: 16px; margin-top: 8px; }
  .search.open input { width: 38vw; }
  .search.open ~ .dropdown .lang-toggle span { display: none; }

  .hero-inner { padding-top: 116px; padding-bottom: 90px; gap: 20px; }
  .hero-title, .hero-title.long { font-size: clamp(40px, 11vw, 64px); margin-bottom: 12px; }
  .hero-desc { -webkit-line-clamp: 2; }
  .hero-actions .btn { flex: 1; padding: 11px 16px; }
  .hero-dots { left: var(--gutter); right: auto; bottom: 64px; }
  .rows { margin-top: -50px; }
  body.no-hero .rows { padding-top: 130px; }
  .page { padding-top: 140px; }

  .detail-hero { aspect-ratio: auto; overflow: visible; background: none; }
  .detail-bg { position: static; aspect-ratio: 16 / 9; }
  .detail-hero.is-cover .detail-bg, .detail-fade { display: none; }
  .detail-cover, .cards-portrait .detail-cover {
    position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9;
    border-radius: 0; box-shadow: none;
  }
  .cards-portrait .detail-cover { aspect-ratio: 4 / 3; }
  .detail-hero-content { position: static; padding: 18px 20px 4px; }
  .detail-title { text-shadow: none; margin-bottom: 14px; }
  .detail-title { max-width: 100%; }
  .detail-body { padding: 6px 20px 28px; }
  .detail-grid, .cards-portrait .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .overlay { padding: 0; }
  .detail { border-radius: 0; min-height: 100%; }

  .player-bar { height: 50px; }
}

/* ================= ANIMACIÓN DE ENTRADA ================= */
/* Línea de tiempo (3 s): aparece el logo → se despliega el nombre →
   destello → "entramos" en el logo (zoom al rojo con estelas) → se abre la web. */
html.intro-on, html.intro-on body { overflow: hidden; }
html.intro-on #intro[hidden] { display: flex !important; }

.intro {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.intro-stage { position: relative; display: flex; align-items: center; justify-content: center; }
.intro-mark {
  width: clamp(110px, 16vmin, 170px); height: auto;
  /* La cámara apunta al centro del símbolo blanco (el "play"). */
  transform-origin: 48% 50%;
  filter: drop-shadow(0 0 0 rgba(229, 9, 20, 0));
  opacity: 0;
}
.intro-word {
  /* Centrado compatible con todos los navegadores (sin la propiedad
     `translate`, que los móviles antiguos no entienden): una caja de ancho 0
     en el centro con el texto centrado en flex, que sobresale por igual. */
  position: absolute; top: calc(100% + 22px); left: 50%; width: 0;
  display: flex; justify-content: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(44px, 8vmin, 84px);
  letter-spacing: 0.6em;
  line-height: 1;
  color: #fff;
  opacity: 0;
  padding-left: 0.08em;
}
.intro-word b { font-weight: 400; color: var(--accent-2); }
.intro-shine {
  position: absolute; inset: -10% -30%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.intro-rays {
  position: absolute; inset: -50%;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%,
      rgba(229, 9, 20, 0) 0deg 6deg, rgba(255, 59, 71, 0.55) 7deg 8deg, rgba(158, 6, 16, 0) 9deg 14deg);
  opacity: 0; transform: scale(0.2);
  pointer-events: none;
}

.intro.play .intro-mark { animation: introMark 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.intro.play .intro-word { animation: introWord 3s var(--ease) forwards; }
.intro.play .intro-shine { animation: introShine 3s ease-in-out forwards; }
.intro.play .intro-rays { animation: introRays 3s ease-in forwards; }
.intro.play { animation: introFade 3s linear forwards; }

@keyframes introMark {
  0%   { opacity: 0; transform: scale(0.35); filter: blur(14px) drop-shadow(0 0 0 rgba(229, 9, 20, 0)); }
  22%  { opacity: 1; transform: scale(1);    filter: blur(0) drop-shadow(0 0 40px rgba(229, 9, 20, 0.8)); }
  52%  { transform: scale(1.04); filter: drop-shadow(0 0 70px rgba(229, 9, 20, 0.9)); animation-timing-function: cubic-bezier(0.7, 0, 0.9, 0.4); }
  80%  { opacity: 1; transform: scale(80); filter: drop-shadow(0 0 0 rgba(229, 9, 20, 0)); }
  100% { opacity: 1; transform: scale(80); }
}
@keyframes introWord {
  0%, 18% { opacity: 0; letter-spacing: 0.6em; transform: translateY(12px); }
  40%     { opacity: 1; letter-spacing: 0.08em; transform: none; }
  52%     { opacity: 1; letter-spacing: 0.08em; transform: none; }
  60%     { opacity: 0; letter-spacing: 0.02em; transform: translateY(-10px) scale(0.96); }
  100%    { opacity: 0; }
}
@keyframes introShine {
  0%, 38% { transform: translateX(-120%); }
  52%     { transform: translateX(120%); }
  100%    { transform: translateX(120%); }
}
@keyframes introRays {
  0%, 56% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  68%     { opacity: 0.9; }
  82%     { opacity: 0; transform: scale(2.4) rotate(18deg); }
  100%    { opacity: 0; }
}
@keyframes introFade {
  0%, 80% { opacity: 1; }
  100%    { opacity: 0; }
}
.intro.skip { animation: none; opacity: 0; transition: opacity 0.3s ease; }
.intro.skip * { animation-play-state: paused !important; }

/* La web entra con un ligero acercamiento al terminar la intro. */
html.intro-reveal .site-header,
html.intro-reveal #hero,
html.intro-reveal #main { animation: siteEnter 0.9s var(--ease) both; }
@keyframes siteEnter { from { opacity: 0; transform: scale(1.06); filter: brightness(1.6) saturate(1.3); } }

/* ================= CLASIFICACIÓN POR EDAD ================= */
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 24px; padding: 0 7px;
  border: 1.5px solid currentColor; border-radius: 4px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.3px;
  color: #e5e7eb;
}
.age-badge.age-3, .age-badge.age-7 { color: #4ade80; }
.age-badge.age-12 { color: #fbbf24; }
.age-badge.age-16 { color: #fb923c; }
.age-badge.age-18 { color: #ff5a63; }

/* Aviso que aparece unos segundos al abrir la ficha (como en Netflix). */
.rating-flash {
  position: absolute; top: 22px; left: 0; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 22px 9px 26px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35) 85%, transparent);
  border-left: 4px solid var(--accent);
  color: #fff;
  font-size: 15px; font-weight: 600;
  opacity: 0; transform: translateX(-30px);
  animation: ratingFlash 6s var(--ease) 0.5s both;
  pointer-events: none;
}
.rating-flash .age-badge { height: 28px; min-width: 44px; font-size: 15px; background: rgba(0, 0, 0, 0.35); }
@keyframes ratingFlash {
  0% { opacity: 0; transform: translateX(-30px); }
  8% { opacity: 1; transform: none; }
  85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(-12px); }
}
.detail-content-warn { font-size: 14px; color: var(--muted); margin: -6px 0 14px; }
.detail-content-warn b { color: var(--text-2); }

/* ================= CONTROLES ================= */
.cbtn-controls.active { background: #fff; color: #000; border-color: #fff; }
.controls-panel {
  margin: 4px 0 22px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  animation: heroIn 0.35s var(--ease) both;
}
.ctrl-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ctrl-head h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.ctrl-head h3 svg { width: 22px; height: 22px; color: var(--accent-2); }
.ctrl-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line-strong); }
.ctrl-tab { padding: 6px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: background 0.2s, color 0.2s; }
.ctrl-tab.active { background: #fff; color: #000; }
.ctrl-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 22px; }
.ctrl-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ctrl-action { color: var(--text-2); font-size: 14.5px; }
.ctrl-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; justify-content: flex-end; }
.ctrl-keys kbd {
  font-family: var(--font); font-size: 12.5px; font-weight: 700;
  padding: 3px 8px; min-width: 26px; text-align: center;
  border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 3px;
  background: var(--surface-2); color: #fff;
}
.ctrl-sep { color: var(--muted-2); font-size: 12px; }
.ctrl-none { color: var(--muted); font-size: 14px; }

/* ================= JUEGOS A RESOLUCIÓN FIJA ================= */
.game-frame.fixed-res { inset: auto; transform-origin: 0 0; }
.game-frame.fixed-res.pixelated { image-rendering: pixelated; }

/* Aviso de edad encima del juego al empezar a jugar */
.rating-flash.in-player { z-index: 20; top: 18px; pointer-events: none; }

/* Cooperativo */
.detail-coop { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(74, 222, 128, 0.12); color: #86efac; font-size: 13px; font-weight: 600; }
.detail-coop svg, .menu-coop svg { width: 16px; height: 16px; flex: none; }
.dropdown-menu .menu-coop { display: flex; align-items: center; gap: 8px; color: #86efac; border-bottom: 1px solid var(--line); }

/* ================= MENÚ GAMEFLIX DENTRO DEL JUEGO ================= */
.gfm-pill {
  position: fixed; left: 0; right: 0; bottom: 14px; z-index: 900; width: max-content; margin: 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 7px 8px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px;
  background: rgba(10, 10, 14, 0.55); color: #fff; cursor: pointer;
  font: 700 13px/1 "Inter", system-ui, sans-serif; letter-spacing: 1.5px;
  opacity: 0.38; transition: opacity 0.2s, background 0.2s, transform 0.2s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.gfm-pill:hover, .gfm-pill:focus-visible { opacity: 1; background: rgba(10, 10, 14, 0.85); transform: translateY(-2px); }
.gfm-pill svg { width: 22px; height: 22px; }
.gfm-pill b { color: #e50914; font-weight: 800; }
.gfm-panel {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.gfm-panel[hidden] { display: none; }
.gfm-card {
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 26px; border-radius: 16px; background: #141419; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); color: #fff; text-align: center;
}
.gfm-card h2 { margin: 0 0 18px; font-size: 20px; }
.gfm-card .spinner { margin: 10px auto 16px; }
.gfm-item {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px;
  padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06); color: #fff; font: 600 15px "Inter", system-ui, sans-serif; cursor: pointer; text-align: left;
}
.gfm-item:hover, .gfm-item:focus-visible { background: rgba(255, 255, 255, 0.14); }
.gfm-item svg { width: 20px; height: 20px; flex: none; }
.gfm-primary { background: #e50914; border-color: #e50914; }
.gfm-primary:hover { background: #f6121d; }
.gfm-ghost { background: transparent; color: rgba(255, 255, 255, 0.75); }
.gfm-where, .gfm-text { margin: 12px 0 4px; color: rgba(255, 255, 255, 0.6); font-size: 13px; line-height: 1.5; }
.gfm-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.gfm-slot {
  display: flex; flex-direction: column; gap: 3px; padding: 6px 6px 9px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); color: #fff; cursor: pointer;
  font: 12px "Inter", system-ui, sans-serif; text-align: left;
}
.gfm-slot:hover:not(:disabled), .gfm-slot:focus-visible { border-color: #e50914; background: rgba(229, 9, 20, 0.12); }
.gfm-slot:disabled { opacity: 0.35; cursor: default; }
.gfm-slot b { font-size: 13px; }
.gfm-slot small { color: rgba(255, 255, 255, 0.55); }
.gfm-shot { display: block; aspect-ratio: 4 / 3; border-radius: 6px; background: #000 center / cover; overflow: hidden; margin-bottom: 4px; }
.gfm-shot img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

/* ================= CUENTA DE JUGADOR ================= */
.account-slot { display: flex; align-items: center; }
.btn-small { padding: 8px 14px; font-size: 13px; }
.acc-login { white-space: nowrap; }
.acc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; font: 600 13px "Inter", system-ui, sans-serif; }
.acc-btn:hover { background: rgba(255, 255, 255, 0.16); }
.acc-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ff3b47, #9e0610); font-weight: 800; }
.acc-premium { padding: 2px 6px; border-radius: 4px; background: #fbbf24; color: #111; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; }
@media (max-width: 700px) { .acc-name { display: none; } }
.acc-overlay, .ad-overlay {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.acc-modal { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 26px; border-radius: 16px; background: #141419; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.acc-modal h2 { margin: 0 0 18px; font-size: 22px; }
.acc-modal h3 { margin: 22px 0 10px; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.acc-modal h3 small { color: rgba(255, 255, 255, 0.55); font-weight: 500; }
.acc-close { position: absolute; top: 10px; right: 10px; }
.acc-form { display: grid; gap: 14px; }
.acc-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.acc-form input { padding: 11px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.15); background: #0b0b0f; color: #fff; font: 15px "Inter", system-ui, sans-serif; }
.acc-form input:focus { outline: 2px solid #e50914; outline-offset: 0; border-color: transparent; }
.acc-form small { font-weight: 400; color: rgba(255, 255, 255, 0.5); }
.acc-error { margin: 0; padding: 9px 12px; border-radius: 8px; background: rgba(229, 9, 20, 0.15); color: #ff8a8f; font-size: 13px; }
.acc-switch { margin: 18px 0 0; text-align: center; color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.acc-switch a { color: #fff; font-weight: 700; }
.acc-plan { display: grid; gap: 8px; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.acc-plan.is-premium { border-color: #fbbf24; background: rgba(251, 191, 36, 0.08); }
.acc-plan span { color: rgba(255, 255, 255, 0.7); font-size: 14px; }
.acc-plan .btn { justify-self: start; }
.acc-played { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.acc-played li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); font-size: 14px; }
.acc-played span { color: rgba(255, 255, 255, 0.55); white-space: nowrap; }
.acc-muted { color: rgba(255, 255, 255, 0.55); font-size: 13px; line-height: 1.5; }
.acc-pass { margin-top: 14px; }
.acc-pass summary { cursor: pointer; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.acc-logout { margin-top: 16px; width: 100%; }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }

/* ================= ANUNCIO ANTES DE JUGAR ================= */
.ad-overlay { z-index: 2100; background: #000; backdrop-filter: none; }
.ad-box { position: relative; width: min(900px, 100%); aspect-ratio: 16 / 9; max-height: calc(100vh - 32px); border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 30% 20%, #3a0a0f 0%, #0b0b0f 70%); display: flex; align-items: center; justify-content: center; }
.ad-label { position: absolute; top: 12px; left: 14px; z-index: 3; padding: 3px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #fbbf24; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.ad-house { max-width: 520px; padding: 24px; text-align: center; }
.ad-house svg { width: 64px; height: 64px; margin-bottom: 14px; }
.ad-house h2 { margin: 0 0 10px; font: 400 clamp(32px, 5vw, 52px)/1 "Bebas Neue", sans-serif; letter-spacing: 1px; }
.ad-house p { margin: 0 0 20px; color: rgba(255, 255, 255, 0.75); line-height: 1.5; }
.ad-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.15); }
.ad-bar span { display: block; height: 100%; width: 0; background: #fbbf24; transition: width 0.25s linear; }
.ad-count { position: absolute; left: 16px; bottom: 16px; margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 13px; }
.ad-skip { position: absolute; right: 0; bottom: 22px; z-index: 3; padding: 12px 20px; border: 1px solid rgba(255, 255, 255, 0.35); border-right: 0; background: rgba(0, 0, 0, 0.75); color: #fff; font: 600 14px "Inter", system-ui, sans-serif; cursor: pointer; }
.ad-skip:disabled { cursor: default; color: rgba(255, 255, 255, 0.6); }
.ad-skip:not(:disabled):hover { background: #fff; color: #000; }
.ad-video .ad-slot, .ad-video video { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Mando: el foco se ve bien al navegar con la cruceta */
html.has-pad :focus { outline: 3px solid #fff; outline-offset: 3px; }
html.has-pad .card:focus { transform: scale(1.06); z-index: 5; }

/* Donativos */
.footer-donate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 14px; }
.footer-donate:empty { display: none; }
.donate-link { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: rgba(229, 9, 20, 0.15); color: #ff6b73; font-weight: 700; font-size: 13px; }
.donate-link:hover { background: rgba(229, 9, 20, 0.28); color: #fff; }
.donate-text { color: var(--muted, #8a8a99); font-size: 13px; }
