:root {
  --cyan: #00d4ff;
  --blue: #2a7bff;
  --purple: #8b3bff;
  --pink: #ff2bb4;
  --magenta: #ff1e88;
  --bg: #05060c;
  --bg-2: #0a0c18;
  --txt: #f3f5ff;
  --muted: #9aa3c7;
  --grad: linear-gradient(100deg, var(--cyan), var(--purple) 55%, var(--pink));
  --grad-soft: linear-gradient(100deg, rgba(0,212,255,.18), rgba(255,43,180,.18));
  --radius: 18px;
  --shadow-neon: 0 0 30px rgba(0,212,255,.35), 0 0 60px rgba(255,43,180,.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  overflow-x: hidden;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Fondo animado ---------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(50% 50% at 15% 20%, rgba(0,212,255,.20), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(255,43,180,.20), transparent 60%),
    radial-gradient(60% 60% at 50% 90%, rgba(139,59,255,.18), transparent 60%),
    var(--bg);
  animation: auroraShift 16s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0%   { filter: hue-rotate(0deg); transform: scale(1); }
  100% { filter: hue-rotate(25deg); transform: scale(1.08); }
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; opacity: .25;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 56px);
  transition: background .3s, backdrop-filter .3s, padding .3s;
}
.nav.scrolled {
  background: rgba(5,6,12,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding-top: 10px; padding-bottom: 10px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { width: 42px; height: 42px; border-radius: 50%; box-shadow: var(--shadow-neon); }
.nav-name { font-family: 'Orbitron', sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 1.05rem; }
.nav-name b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .95rem; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--txt); }
.nav-sub {
  padding: 8px 18px; border-radius: 999px; background: var(--grad);
  color: #fff !important; font-weight: 600; box-shadow: var(--shadow-neon);
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 100px 20px 60px;
}
.hero-banner {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.05); animation: slowZoom 20s ease-in-out infinite alternate;
}
@keyframes slowZoom { to { transform: scale(1.18); } }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 50% 50%, transparent, rgba(5,6,12,.55) 70%),
    linear-gradient(180deg, rgba(5,6,12,.35), rgba(5,6,12,.92));
}
.hero-content { position: relative; z-index: 2; max-width: 820px; }
.hero-logo { width: clamp(110px, 18vw, 170px); margin: 0 auto 18px; border-radius: 50%; box-shadow: var(--shadow-neon); }
.floaty { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-title {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: clamp(3rem, 12vw, 7rem); line-height: .95; letter-spacing: 2px;
  text-transform: lowercase;
  text-shadow: 0 0 40px rgba(0,212,255,.4);
}
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-title .grad-bl { background: linear-gradient(100deg, #2a7bff 0%, #8b3bff 50%, #e23bd6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline {
  font-family: 'Orbitron', sans-serif; letter-spacing: 6px; text-transform: uppercase;
  font-size: clamp(.8rem, 2.4vw, 1.1rem); margin-top: 14px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); letter-spacing: 1.5px; font-size: clamp(.85rem,2.2vw,1rem); margin-top: 6px; text-transform: uppercase; }

/* Ecualizador */
.equalizer { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 60px; margin: 26px 0 30px; }
.equalizer span {
  width: 5px; border-radius: 4px; background: var(--grad);
  animation: eq 1.1s ease-in-out infinite; transform-origin: bottom;
}
.equalizer span:nth-child(odd)  { animation-duration: .9s; }
.equalizer span:nth-child(3n)   { animation-duration: 1.4s; }
.equalizer span:nth-child(4n)   { animation-duration: .7s; }
.equalizer span:nth-child(n)    { height: 14px; }
@keyframes eq { 0%,100% { transform: scaleY(.25); opacity:.7;} 50% { transform: scaleY(1.6); opacity:1;} }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  cursor: pointer; border: none; transition: transform .2s, box-shadow .25s, background .25s; position: relative;
}
.btn:hover { transform: translateY(-3px); }
.btn:focus { outline: none; }
.btn:focus-visible,
.lang-tab:focus-visible,
.like-playlist-item label:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(0, 212, 255, .45), var(--shadow-neon);
  transform: scale(1.06);
  z-index: 2;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-neon); }
.btn-primary:hover { box-shadow: 0 0 40px rgba(0,212,255,.55), 0 0 80px rgba(255,43,180,.4); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--txt); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }

.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; }
.hero-scroll span {
  display: block; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.4); border-radius: 14px; position: relative;
}
.hero-scroll span::after {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 4px; background: var(--cyan); animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 50% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ---------- Secciones ---------- */
.section { padding: clamp(60px, 9vw, 120px) clamp(16px, 6vw, 80px); max-width: 1200px; margin: 0 auto; }
.section-only {
  min-height: 100vh; max-width: none; display: flex; flex-direction: column; justify-content: center;
  padding: 18px clamp(14px, 3vw, 40px);
}
.file-warn {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  max-width: min(92vw, 720px); padding: 12px 18px; border-radius: 14px;
  background: rgba(20, 10, 30, .92); border: 1px solid rgba(255, 43, 180, .45);
  backdrop-filter: blur(10px); box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}
.file-warn p { color: var(--muted); font-size: .9rem; margin: 0; }
.file-warn[hidden] { display: none !important; }

.lang-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  width: min(96vw, calc((100vh - 200px) * 16 / 9));
  max-width: none; margin: 0 auto 16px;
}
.lang-brand { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-logo {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow-neon);
}
.app-version {
  font-family: 'Orbitron', sans-serif; font-size: .7rem; letter-spacing: 1px;
  color: var(--muted); opacity: .85; white-space: nowrap;
}
.section-only .lang-tabs { margin-bottom: 0; justify-content: flex-start; flex: 1; }
/* El reproductor ocupa lo máximo posible sin perder el 16:9 ni salirse de la ventana */
.section-only .player-wrap {
  max-width: none;
  width: min(96vw, calc((100vh - 200px) * 16 / 9));
  margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 48px; }
.eyebrow {
  font-family: 'Orbitron', sans-serif; letter-spacing: 4px; text-transform: uppercase; font-size: .75rem;
  color: var(--cyan); margin-bottom: 10px;
}
.section-head h2 { font-family: 'Orbitron', sans-serif; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.section-desc { color: var(--muted); max-width: 560px; margin: 14px auto 0; }

/* Tabs de idioma */
.lang-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 38px; }
.lang-tab {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  font-weight: 600; font-size: .78rem; transition: all .25s; backdrop-filter: blur(8px); color: var(--muted);
}
.lang-tab .flag { font-size: 1rem; }
.lang-tab .code { font-family: 'Orbitron', sans-serif; letter-spacing: .5px; font-size: .65rem; }
.lang-tab:hover, .lang-tab:focus-visible { transform: translateY(-3px); border-color: rgba(255,255,255,.3); color: var(--txt); }
.lang-tab.active {
  color: #fff; border-color: transparent;
  background: var(--grad); box-shadow: var(--shadow-neon);
}
.lang-tab.novedades-has:not(.active) {
  border-color: rgba(255, 210, 63, .45);
  color: var(--txt);
}
.lang-tab .nov-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; font-size: .55rem; font-weight: 700;
  font-family: 'Orbitron', sans-serif; line-height: 18px; text-align: center;
  background: linear-gradient(100deg, #ffd23f, #ff7a18);
  color: #1a0a00; box-shadow: 0 0 10px rgba(255, 122, 24, .5);
}

/* Reproductor */
.player-wrap { position: relative; max-width: 980px; margin: 0 auto; }
.player-glow {
  position: absolute; inset: -2px; border-radius: calc(var(--radius) + 6px); z-index: 0;
  background: var(--grad); filter: blur(26px); opacity: .55; transition: background .4s;
}
.player-frame {
  position: relative; z-index: 1; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); background: #000;
}
.player-aspect { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.player-aspect #ytPlayer { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.player-aspect #ytPlayer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-tv-shield {
  display: none;
  position: absolute; inset: 0; z-index: 4;
}
.player-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(20,24,46,.95), #05060c); text-align: center; padding: 20px;
}
.player-placeholder img { width: 90px; border-radius: 50%; box-shadow: var(--shadow-neon); animation: floaty 5s ease-in-out infinite; }
.player-placeholder p { color: var(--muted); max-width: 320px; }
.player-placeholder.hidden { display: none; }

.discover-loader {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle at 50% 45%, rgba(12, 16, 36, .96), rgba(5, 6, 12, .98));
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.discover-loader.hidden { display: none !important; }
.discover-loader-ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .08);
  border-top-color: #00d4ff; border-right-color: #8b3bff;
  animation: discoverSpin 0.85s linear infinite;
  box-shadow: 0 0 24px rgba(0, 212, 255, .35), 0 0 40px rgba(139, 59, 255, .25);
}
.discover-loader-text {
  font-family: 'Orbitron', sans-serif; font-size: .72rem; letter-spacing: 1px;
  color: var(--muted); text-transform: uppercase;
}
@keyframes discoverSpin { to { transform: rotate(360deg); } }

.player-meta {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); flex-wrap: wrap;
}
.player-meta-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.player-meta-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.player-meta .btn-sm { padding: 5px 10px; font-size: .72rem; }
.btn-like {
  background: rgba(60, 220, 130, .12); color: #5dffa8;
  border: 1px solid rgba(60, 220, 130, .35);
}
.btn-like:hover {
  background: rgba(60, 220, 130, .22); border-color: #5dffa8;
  transform: translateY(-2px);
}
.btn-like.active {
  background: rgba(60, 220, 130, .28); border-color: #5dffa8;
  color: #fff; cursor: default;
}
.btn-like:active { transform: scale(.97); }
.like-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.like-modal[hidden] { display: none !important; }
.like-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px);
}
.like-modal-box {
  position: relative; width: min(92vw, 400px); padding: 22px 20px;
  border-radius: 16px; background: rgba(12, 14, 28, .96);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.like-modal-title {
  font-family: 'Orbitron', sans-serif; font-size: 1rem; margin-bottom: 8px;
}
.like-modal-video {
  color: var(--muted); font-size: .78rem; margin-bottom: 16px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.like-playlist-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.like-playlist-item label {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer; font-size: .85rem; transition: border-color .2s, background .2s;
}
.like-playlist-item label:hover { border-color: rgba(255, 255, 255, .22); }
.like-playlist-item.mandatory label {
  cursor: default; border-color: rgba(60, 220, 130, .35); background: rgba(60, 220, 130, .08);
}
.like-playlist-item.in-list label {
  cursor: default; border-color: rgba(255, 210, 63, .35); background: rgba(255, 210, 63, .06);
}
.like-playlist-item.in-list .pl-badge { color: #ffd23f; }
.like-loading {
  color: var(--muted); font-size: .85rem; padding: 14px 0; text-align: center;
  font-family: 'Orbitron', sans-serif; letter-spacing: .5px;
}
.like-playlist-item input { accent-color: #5dffa8; width: 16px; height: 16px; flex-shrink: 0; }
.like-playlist-item .pl-name { flex: 1; }
.like-playlist-item .pl-badge {
  font-size: .65rem; letter-spacing: .5px; text-transform: uppercase;
  color: #5dffa8; font-family: 'Orbitron', sans-serif;
}
.like-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-dislike {
  background: rgba(255, 60, 90, .12); color: #ff6b8a;
  border: 1px solid rgba(255, 60, 90, .35);
}
.btn-dislike:hover {
  background: rgba(255, 60, 90, .22); border-color: #ff6b8a;
  transform: translateY(-2px);
}
.btn-dislike:active { transform: scale(.97); }
.btn-cast {
  background: rgba(0, 212, 255, .1); color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, .35);
}
.btn-cast:hover {
  background: rgba(0, 212, 255, .2); border-color: var(--cyan);
  transform: translateY(-2px);
}
.btn-cast:active { transform: scale(.97); }
.player-flag { font-size: 1.25rem; line-height: 1; }
.player-label { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: .82rem; line-height: 1.2; }
.player-desc { color: var(--muted); font-size: .7rem; line-height: 1.25; margin-top: 1px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.about-card {
  padding: 32px 26px; border-radius: var(--radius);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px); transition: transform .3s, border-color .3s;
}
.about-card:hover { transform: translateY(-6px); border-color: rgba(0,212,255,.5); }
.about-ico { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.about-card h3 { font-family: 'Orbitron', sans-serif; font-size: 1.15rem; margin-bottom: 8px; }
.about-card p { color: var(--muted); font-size: .95rem; }

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center; padding: clamp(70px, 10vw, 130px) 20px; position: relative;
  background: linear-gradient(180deg, transparent, rgba(139,59,255,.08), transparent);
}
.cta-final h2 { font-family: 'Orbitron', sans-serif; font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; }
.grad-text, .cta-final .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-final p { color: var(--muted); margin: 14px 0 30px; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 56px 20px 40px; border-top: 1px solid rgba(255,255,255,.06); }
.footer-logo { width: 70px; margin: 0 auto 16px; border-radius: 50%; box-shadow: var(--shadow-neon); }
.footer-tag { color: var(--muted); letter-spacing: 1px; font-size: .9rem; }
.footer-langs { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }
.footer-langs a { color: var(--muted); font-size: .9rem; transition: color .2s; }
.footer-langs a:hover { color: var(--cyan); }
.footer-copy { color: #5a6285; font-size: .8rem; margin-top: 10px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

body.tv-remote .player-tv-shield { display: block; }
body.tv-remote .lang-tab {
  min-height: 48px; padding: 10px 16px; font-size: .9rem;
}
body.tv-remote .player-meta .btn-sm {
  min-height: 48px; padding: 10px 16px; font-size: .9rem;
}
body.tv-remote .like-playlist-item label {
  min-height: 52px;
}
body.tv-remote .like-modal-actions .btn {
  min-height: 48px;
}

@media (max-width: 640px) {
  .nav-links a:not(.nav-sub) { display: none; }
  .player-meta { justify-content: center; text-align: center; }

  .lang-bar {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
  }
  .lang-brand {
    justify-content: center;
    width: 100%;
    order: -1;
  }
  .lang-logo {
    width: 72px;
    height: 72px;
  }
  .app-version {
    font-size: .8rem;
    color: var(--cyan);
    opacity: 1;
  }
  .section-only .lang-tabs {
    justify-content: center;
    width: 100%;
    flex: none;
  }
}
