:root {
  --bg: #0a0a0a; --bg-1: #111; --bg-2: #161616; --bg-3: #1c1c1c;
  --line: rgba(255,255,255,0.08); --line-strong: rgba(255,255,255,0.14);
  --fg: #fff; --fg-2: rgba(255,255,255,0.72); --fg-3: rgba(255,255,255,0.5); --fg-4: rgba(255,255,255,0.32);
  --accent: #0066ff; --accent-2: #3b82ff; --accent-glow: rgba(0,102,255,0.45);
  --live: #22c55e; --vod: #0066ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 56px;
  background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 70%, rgba(10,10,10,0) 100%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s;
}
.nav.scrolled {
  background: rgba(10,10,10,0.96); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.nav-left { display: flex; align-items: center; gap: 44px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent) 0%, #00b8ff 100%);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 6px 20px var(--accent-glow);
}
.logo-mark::after {
  content: ""; width: 0; height: 0;
  border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  margin-left: 2px;
}
.logo span b { font-weight: 800; }
.logo span i { font-style: normal; font-weight: 300; opacity: 0.7; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--fg-2); transition: color 0.15s; padding: 4px 0; position: relative; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-2); transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--fg); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 4px 16px var(--accent-glow); transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: var(--accent-2); transform: translateY(-1px); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#ff7a59,#b341ff); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }

/* HERO */
.hero { position: relative; height: 92vh; min-height: 640px; max-height: 900px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(0,102,255,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 30% 70%, rgba(180,40,200,0.4) 0%, transparent 55%),
    linear-gradient(135deg, #0d1a3a 0%, #1a0d2e 50%, #2b0a35 100%);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 14px);
  mix-blend-mode: overlay;
}
.hero-noise {
  position: absolute; inset: 0; opacity: 0.18;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0'/></filter><rect width='200' height='200' filter='url(%25n)'/></svg>");
}
.hero-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0.2) 50%, rgba(10,10,10,0.95) 92%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.6) 35%, rgba(10,10,10,0) 70%);
}
.hero-shape { position: absolute; border-radius: 24px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); backdrop-filter: blur(20px); }
.hero-shape.s1 { width: 280px; height: 160px; top: 15%; right: 8%; transform: rotate(-6deg); }
.hero-shape.s2 { width: 180px; height: 180px; top: 50%; right: 22%; border-radius: 50%; }
.hero-shape.s3 { width: 120px; height: 200px; top: 28%; right: 30%; transform: rotate(8deg); }
.hero-content {
  position: relative; z-index: 2; padding: 0 56px 88px 56px;
  height: 100%; display: flex; flex-direction: column; justify-content: flex-end; max-width: 720px;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px 0 10px; border-radius: 6px;
  background: var(--live); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em;
  width: fit-content; margin-bottom: 20px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.7)} }
.hero-channel { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-channel-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#ff4757,#ffa502); border: 2px solid rgba(255,255,255,0.15); }
.hero-channel-name { font-size: 14px; font-weight: 600; }
.hero-channel-meta { font-size: 12.5px; color: var(--fg-3); }
.hero-title { font-size: clamp(32px,4.2vw,62px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-desc { font-size: 15px; line-height: 1.5; color: var(--fg-2); font-weight: 300; margin-bottom: 28px; max-width: 560px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; font-size: 13px; color: var(--fg-3); font-weight: 500; }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-4); }
.hero-meta .viewers { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); }
.hero-meta .viewers::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.hero-actions { display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 26px; border-radius: 10px; font-size: 14.5px; font-weight: 700; transition: transform 0.15s, background 0.15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: #0a0a0a; }
.btn-primary:hover { background: #e8e8e8; }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.18); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); }
.hero-progress { position: absolute; left: 56px; right: 56px; bottom: 32px; z-index: 2; display: flex; align-items: center; gap: 14px; max-width: 680px; color: var(--fg-3); font-size: 12px; font-weight: 500; }
.progress-track { flex: 1; height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; overflow: hidden; }
.progress-fill { width: 64%; height: 100%; background: var(--live); border-radius: 2px; box-shadow: 0 0 12px rgba(255,43,61,0.6); }

/* CAROUSELS */
.section { padding: 56px 0 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 56px; margin-bottom: 22px; }
.section-title { display: flex; align-items: baseline; gap: 14px; }
.section-title h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.section-title .count { font-size: 12px; font-weight: 500; color: var(--fg-4); }
.section-link { font-size: 13px; font-weight: 600; color: var(--fg-3); display: inline-flex; align-items: center; gap: 4px; transition: color 0.15s; }
.section-link:hover { color: var(--accent-2); }
.section-link::after { content: "→"; transition: transform 0.15s; }
.section-link:hover::after { transform: translateX(3px); }
.row-wrap { position: relative; }
.row { display: flex; gap: 14px; padding: 4px 56px 24px 56px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; flex-shrink: 0; }
.row-arrow {
  position: absolute; top: 0; bottom: 24px; width: 56px;
  display: grid; place-items: center; z-index: 5; opacity: 0; transition: opacity 0.2s; color: #fff; cursor: pointer;
  background: linear-gradient(90deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 60%, rgba(10,10,10,0) 100%);
}
.row-arrow.right { right: 0; background: linear-gradient(270deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 60%, rgba(10,10,10,0) 100%); }
.row-arrow.left { left: 0; }
.row-wrap:hover .row-arrow { opacity: 1; }
.arrow-circle { width: 38px; height: 38px; border-radius: 50%; background: rgba(20,20,20,0.9); border: 1px solid var(--line-strong); display: grid; place-items: center; transition: transform 0.15s, background 0.15s; }
.row-arrow:hover .arrow-circle { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }

/* CARDS */
.card { width: 280px; cursor: pointer; position: relative; transition: transform 0.25s cubic-bezier(0.2,0.8,0.2,1); }
.card:hover { transform: scale(1.04) translateY(-4px); z-index: 10; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #1a1a1a; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.card:hover .thumb { box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 0 1px var(--line-strong); }
.thumb-img { position: absolute; inset: 0; }
.thumb-grain { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; pointer-events: none; }
.thumb-tl,.thumb-bl,.thumb-br { position: absolute; z-index: 2; }
.thumb-tl { top: 10px; left: 10px; }
.thumb-bl { bottom: 10px; left: 10px; }
.thumb-br { bottom: 10px; right: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: #fff; text-transform: uppercase; }
.badge.live { background: var(--live); }
.badge.vod  { background: var(--vod); }
.badge.live .live-dot { width: 6px; height: 6px; }
.duration-pill { background: rgba(0,0,0,0.78); border-radius: 4px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; color: #fff; backdrop-filter: blur(4px); }
.viewer-pill { background: rgba(0,0,0,0.78); border-radius: 4px; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #fff; backdrop-filter: blur(4px); }
.viewer-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); }
.thumb-overlay { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 60%,rgba(0,0,0,0.85) 100%); z-index: 1; }
.thumb-hover { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.2s; }
.card:hover .thumb-hover { opacity: 1; }
.play-btn { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.95); display: grid; place-items: center; transform: scale(0.8); transition: transform 0.2s; box-shadow: 0 6px 24px rgba(0,0,0,0.4); }
.card:hover .play-btn { transform: scale(1); }
.play-btn::after { content: ""; width: 0; height: 0; border-left: 14px solid #000; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.18); z-index: 2; }
.thumb-progress > span { display: block; height: 100%; background: var(--live); box-shadow: 0 0 8px rgba(255,43,61,0.5); }
.card-meta { padding: 12px 2px 0 2px; }
.card-channel { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.card-channel-avatar { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.card-channel-name { font-size: 12px; font-weight: 500; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0 0 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 6px; }
.card-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-4); }

/* FOOTER */
footer { margin-top: 80px; padding: 56px 56px 32px 56px; border-top: 1px solid var(--line); background: #050505; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4,1fr); gap: 48px; margin-bottom: 48px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 16px 0; }
.footer-col a { display: block; font-size: 13.5px; color: var(--fg-2); padding: 6px 0; transition: color 0.15s; }
.footer-col a:hover { color: var(--fg); }
.footer-brand p { font-size: 13px; color: var(--fg-3); line-height: 1.6; margin: 14px 0 18px 0; max-width: 280px; }
.lang-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--fg-2); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-4); }
.footer-bottom-links { display: flex; gap: 24px; }

/* RESPONSIVE */
@media (max-width: 720px) {
  #top20-grid, #vod-grid { display: block !important; }
  #top20-modal, #vod-modal { background: #0f0f13 !important; backdrop-filter: none !important; }
  #live-modal { background: #0f0f13 !important; }
  #live-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 900px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero-content { padding: 0 20px 64px 20px; }
  .hero-progress { left: 20px; right: 20px; }
  .hero { height: 72vh; min-height: 320px; max-height: 520px; }
  .hero-slide .hero-bg img { opacity: 0.7 !important; object-position: center top; }
  .promo-poster-mobile {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.75;
  }
  .hero-title { font-size: 30px; -webkit-line-clamp: 4; }
  .section-head { padding: 0 20px; }
  .row { padding: 4px 20px 24px 20px; }
  .row-arrow { display: none; }
  .card { width: 220px; }
  footer { padding: 40px 20px 24px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  .hero-shape { display: none; }
  .hero-arrow { display: none; }
  .hero-promo-right { display: none; }
  .hero-promo-left { flex: none; width: 100%; }
}

/* Dispositivos táctiles — póster vertical en slide promo, sin texto */
@media (pointer: coarse) {
  .hero-promo-right { display: none !important; }
  .hero-promo-text { display: none !important; }
  .promo-poster-desktop-bg { display: none !important; }
  .promo-mobile-btn { display: flex !important; }
  .promo-poster-mobile {
    display: block !important;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.9;
  }
}

/* ── HERO CAROUSEL ── */
.hero-slides-inner {
  display: flex;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}
.hero-slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.hero-arrow:hover { background: rgba(0,0,0,0.7); border-color: rgba(255,255,255,0.4); }
.hero-arrow-prev { left: 24px; }
.hero-arrow-next { right: 24px; }
.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}
.hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.hero-dot.active { background: #fff; transform: scale(1.35); }

/* Promo slide */
.hero-slide-promo .hero-content {
  max-width: 100%;
  flex-direction: row;
  align-items: flex-end;
  gap: 48px;
}
.hero-promo-left { flex: 0 0 52%; min-width: 0; }
.hero-promo-right { flex: 0 0 44%; min-width: 0; align-self: flex-end; padding-bottom: 8px; }
.promo-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  border-radius: 12px;
  overflow: hidden;
}
.promo-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  background: rgba(0,0,0,0.3);
}
.promo-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: transform 0.3s, opacity 0.3s; display: block; }
.promo-thumb:hover img { transform: scale(1.06); opacity: 1; }
.promo-poster-mobile { display: none; }
.promo-mobile-btn {
  display: none;
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 28px;
  border-radius: 24px;
  text-decoration: none;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.promo-poster-desktop-bg {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 110%;
  width: auto;
  object-fit: cover;
  opacity: 0.13;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
}
