:root {
  --bg: #070707;
  --text: #ffffff;
  --muted: #b7b7b7;
  --line: rgba(255, 255, 255, 0.12);
  --sidebar-w: 76px;
  --sidebar-expanded: 268px;
  --sidebar-bg: #242225;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: var(--text); font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { overflow: hidden; }
button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

.app {
  display: block;
  height: 100vh;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 22px 12px 22px;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
  z-index: 40;
  transition: width 0.22s ease;
}
.sidebar:hover,
.sidebar:focus-within {
  width: var(--sidebar-expanded);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  margin: 0 6px 28px;
  color: #fff;
  min-width: 200px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}
.brand-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.brand-name {
  height: 22px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: left center;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.sidebar:hover .brand-name,
.sidebar:focus-within .brand-name,
.sidebar.open .brand-name { opacity: 1; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #f4f4f4;
  white-space: nowrap;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.side-link:hover { background: rgba(255,255,255,0.06); }
.side-link.active { background: rgba(255,255,255,0.1); color: #fff; }
.side-link[hidden] { display: none !important; }
.side-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.side-icon svg { width: 22px; height: 22px; }
.side-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.marquee-text { display: inline-block; }
.sidebar:hover .side-label.is-overflowing .marquee-text,
.sidebar:focus-within .side-label.is-overflowing .marquee-text,
.sidebar.open .side-label.is-overflowing .marquee-text {
  animation: side-marquee 6s ease-in-out 1s infinite alternate;
}
@keyframes side-marquee {
  0%, 20% { transform: translateX(0); }
  80%, 100% { transform: translateX(var(--marquee-shift, 0)); }
}
.sidebar:hover .side-label,
.sidebar:focus-within .side-label,
.sidebar.open .side-label {
  opacity: 1;
  transform: none;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 10px 0;
  min-width: 200px;
}
.brand-mini { width: 28px; height: 28px; margin-bottom: 12px; color: #fff; }
.footer-brand {
  display: block;
  height: 16px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  object-position: left center;
}
.footer-copy { margin: 4px 0 14px; font-size: 0.68rem; color: #8a8a8a; }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { font-size: 0.72rem; color: #9d9d9d; }
.footer-links a:hover { color: #fff; }
.footer-brand,
.footer-copy,
.footer-links {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.sidebar:hover .footer-brand,
.sidebar:hover .footer-copy,
.sidebar:hover .footer-links,
.sidebar:focus-within .footer-brand,
.sidebar:focus-within .footer-copy,
.sidebar:focus-within .footer-links,
.sidebar.open .footer-brand,
.sidebar.open .footer-copy,
.sidebar.open .footer-links {
  opacity: 1;
  pointer-events: auto;
}

.main {
  min-width: 0;
  height: 100vh;
  margin-left: var(--sidebar-w);
  overflow-x: hidden;
  overflow-y: auto;
  background: #000;
}
.main::-webkit-scrollbar { width: 8px; height: 0; }
.main::-webkit-scrollbar-track { background: transparent; }
.main::-webkit-scrollbar-thumb { background: #ffffff; border-radius: 99px; }
.main::-webkit-scrollbar-corner { background: transparent; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 18px 42px 10px;
  background: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,.28) 70%, transparent);
}

.tabs { display: flex; align-items: center; gap: 28px; }
.tab {
  position: relative;
  padding: 6px 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #d8d8d8;
}
.tab:hover, .tab.active { color: #fff; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: #fff;
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex;
  align-items: center;
  width: min(340px, 36vw);
  height: 40px;
  padding: 0 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 0.9rem;
}
.search input::placeholder { color: #8f8f8f; }
.search svg, .icon-btn svg, .btn-play svg, .btn-info svg, .btn-circle svg, .react-btn svg,
.season-btn svg, .carousel-btn svg, .help-fab svg { width: 18px; height: 18px; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.icon-btn:hover { background: rgba(255,255,255,0.06); }
.icon-btn svg { width: 22px; height: 22px; }
.badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 14px; height: 14px;
  padding: 0 4px;
  border-radius: 99px;
  background: #e10600;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.mobile-menu-btn { display: none; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  padding: 0 0 40px;
}
.shimmer-block,
.shimmer-hero,
.shimmer-line,
.shimmer-card {
  background: linear-gradient(90deg, #161616 15%, #2a2a2a 45%, #161616 75%);
  background-size: 200% 100%;
  animation: shimmer 1.25s ease-in-out infinite;
}
.shimmer-hero {
  height: 58vh;
  min-height: 360px;
}
.shimmer-row { padding: 28px 42px 8px; }
.shimmer-line {
  width: 180px;
  height: 18px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.shimmer-line.short { width: 120px; }
.shimmer-cards { display: flex; gap: 22px; overflow: hidden; }
.shimmer-card {
  flex: 0 0 320px;
  height: 208px;
  border-radius: 4px;
}

.hero {
  position: relative;
  min-height: 58vh;
  padding: 18px 42px 56px;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: none;
}
body.bw-images .hero-media img {
  filter: grayscale(1) contrast(1.12) brightness(0.72);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.42) 42%, rgba(0,0,0,.18) 100%),
    linear-gradient(180deg, rgba(0,0,0,.12) 0%, transparent 38%, #000 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 620px; padding-top: 54px; }
.hero-kicker {
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d0d0d0;
}
.hero-title {
  margin-bottom: 16px;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.hero-desc {
  max-width: 520px;
  margin-bottom: 26px;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #d8d8d8;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-play, .btn-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 700;
}
.btn-play { background: #fff; color: #111; }
.btn-play:hover { background: #ececec; }
.btn-info { background: rgba(255,255,255,0.16); }
.btn-info:hover { background: rgba(255,255,255,0.24); }
.btn-circle, .react-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,0.7);
  border-radius: 50%;
}
.btn-circle:hover, .btn-circle.active,
.react-btn:hover, .react-btn.active {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
}
.reactions { display: flex; gap: 10px; margin-top: 18px; }
.react-btn { width: 38px; height: 38px; }

.hero-nav { pointer-events: none; }
.hero-nav.hidden { display: none; }
.hero-arrow {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  transform: translateY(-50%);
}
.hero-arrow.prev { right: auto; left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-arrow:hover { background: rgba(0,0,0,0.7); }
.hero-arrow svg { width: 18px; height: 18px; }
.hero-dots {
  pointer-events: auto;
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}
.hero-dot.active {
  width: 22px;
  border-radius: 99px;
  background: #fff;
}

.group-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 4px 42px 10px;
  position: relative;
  z-index: 3;
}
.color-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.color-switch.hidden { display: none !important; }
.group-bar.hidden { display: none !important; }
.group-label {
  font-size: 0.82rem;
  color: #b5b5b5;
  font-weight: 600;
}
.group-toggle {
  display: inline-flex;
  padding: 3px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
}
.group-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 650;
  color: #cfcfcf;
}
.group-btn.active {
  background: #fff;
  color: #111;
}

.section { position: relative; z-index: 2; padding: 8px 42px 28px; }
.catalog-rows { position: relative; z-index: 2; }
.catalog-rows .section:last-child { padding-bottom: 80px; }
.empty-state { color: var(--muted); padding: 24px 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.03em; }
.season-wrap { position: relative; }
.season-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.season-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  padding: 8px;
  background: #151515;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 5;
}
.season-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
}
.season-menu button:hover, .season-menu button.active { background: rgba(255,255,255,0.08); }

.carousel { position: relative; }
.episode-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 44px 18px;
  margin: 0 -44px;
}
.episode-row::-webkit-scrollbar { display: none; }
.episode-card { flex: 0 0 320px; cursor: pointer; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 10.4;
  overflow: hidden;
  border-radius: 4px;
  background: #111;
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: none;
  transition: transform 0.35s ease, filter 0.25s ease;
}
body.bw-images .thumb img {
  filter: grayscale(1) contrast(1.08) brightness(0.78);
}
.episode-card:hover .thumb img { transform: scale(1.05); }
.thumb-rank,
.thumb-rank {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 0.8;
  color: #fff;
  text-shadow: 0 6px 16px rgba(0,0,0,0.75);
  letter-spacing: -0.06em;
  z-index: 2;
}
.thumb-label {
  position: absolute;
  left: 10px; top: 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px #000;
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.episode-card:hover .play-overlay, .episode-card.active .play-overlay { opacity: 1; }
.play-overlay span {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
}
.play-overlay svg { width: 18px; height: 18px; margin-left: 2px; }
.episode-title { margin: 12px 0 8px; font-size: 0.98rem; font-weight: 700; letter-spacing: -0.02em; }
/* Cursos: póster cuadrado (imageMovie) o rectangular 16:9 (imageCurso), con la misma altura en la fila. */
.episode-card.shape-square { flex-basis: 220px; }
.episode-card.shape-wide { flex-basis: 391px; }
.shape-square .thumb { aspect-ratio: 1 / 1; }
.shape-wide .thumb { aspect-ratio: 16 / 9; }
.shape-square .episode-title,
.shape-wide .episode-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.episode-meta { display: flex; align-items: center; gap: 14px; font-size: 0.78rem; color: #c3c3c3; }
.episode-meta span { display: inline-flex; align-items: center; gap: 6px; }
.episode-meta svg { width: 13px; height: 13px; }

.carousel-btn {
  position: absolute;
  top: 78px;
  z-index: 3;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(20,20,20,0.82);
  border: 1px solid rgba(255,255,255,0.18);
}
.carousel-btn.prev { left: -6px; }
.carousel-btn.next { right: -6px; }
.carousel-btn:hover { background: #2a2a2a; }

.empty-state { padding: 28px 8px; color: var(--muted); }

.help-fab {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 40;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: var(--shadow);
}
.help-fab svg {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
}
.help-ring {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 50%;
}
.help-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 34px;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0,0,0,0.62);
}
.panel {
  position: fixed;
  z-index: 70;
  background: #121212;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.drawer {
  top: 0; right: 0;
  width: min(360px, 92vw);
  height: 100vh;
  padding: 0;
}
.modal {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 92vw);
  border-radius: 16px;
  overflow: hidden;
}
/* 16:9, igual que las portadas (1920×1080): llenan todo el recuadro sin franjas. */
.modal-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #070707; }
.modal-media img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(0.8); }
.modal-media.is-video { height: auto; aspect-ratio: 16 / 9; }
.modal-media iframe { display: block; width: 100%; height: 100%; border: 0; }
.modal-media .modal-media-bg { position: absolute; inset: 0; object-fit: cover; transform: scale(1.15); filter: grayscale(1) blur(24px) brightness(0.45); }
.modal-body, .drawer-body { padding: 22px 24px 28px; }
.modal-actions { margin-top: 18px; }
#infoModal { max-height: 92vh; overflow-y: auto; }
#infoModal .hero-kicker { margin-bottom: 6px; }
.info-reactions { margin-top: 0; }
.help-email { margin-top: 12px; }
.modal h2, .drawer h2 { margin-bottom: 10px; font-size: 1.4rem; }
.modal p, .drawer p, .notif-item p { color: var(--muted); line-height: 1.55; }
.menu-item {
  display: flex;
  width: 100%;
  padding: 12px 8px;
  border-radius: 8px;
  text-align: left;
}
.menu-item:hover { background: rgba(255,255,255,0.06); }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  height: 40px;
  padding: 0 10px 0 4px;
  border-radius: 99px;
}
.user-chip:hover { background: rgba(255,255,255,0.06); }
.user-chip.hidden, .account-user.hidden { display: none; }
.user-chip-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.85rem;
  color: var(--muted, #b7b7b7);
}
.user-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E61A40;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.user-avatar.large { width: 48px; height: 48px; font-size: 1.2rem; }
.account-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.account-text { min-width: 0; }
.account-text strong, .account-text span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.account-text span { color: var(--muted, #b7b7b7); font-size: 0.85rem; }
@media (max-width: 760px) { .user-chip-name { display: none; } }
.user-avatar.has-photo, .profile-avatar.has-photo {
  background-color: #1d1d1d;
  background-size: cover;
  background-position: center;
}

/* Perfil */
.profile-modal {
  width: min(880px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #0d0d0d;
}
.profile-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 34px 32px 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(230, 26, 64, 0.38), transparent 55%),
    linear-gradient(180deg, #1a1a1a, #0d0d0d);
  border-bottom: 1px solid var(--line);
}
.profile-avatar-wrap { position: relative; flex: none; }
.profile-avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #E61A40;
  color: #fff;
  font-size: 2.6rem;
  font-weight: 700;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.profile-photo-btn {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.profile-photo-btn:hover { background: #ececec; }
.profile-photo-btn svg { width: 18px; height: 18px; }
.profile-identity { min-width: 0; }
.profile-identity h2 { margin: 0 0 4px; font-size: 1.7rem; }
.profile-identity > span { display: block; color: var(--muted); overflow-wrap: anywhere; }
.profile-badge {
  display: inline-block !important;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(230, 26, 64, 0.16);
  border: 1px solid rgba(230, 26, 64, 0.55);
  color: #ff8aa0 !important;
  font-size: 0.8rem;
  font-weight: 600;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 32px;
}
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 14px;
  background: #161616;
  border: 1px solid var(--line);
}
.profile-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.profile-card-head h3 { margin: 0; font-size: 1.05rem; }
.profile-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(230, 26, 64, 0.14);
  color: #E61A40;
  flex: none;
}
.profile-icon svg { width: 20px; height: 20px; }
.profile-label { color: var(--muted); font-size: 0.8rem; }
.profile-inline { display: flex; gap: 8px; }
.profile-inline input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0d0d0d;
  color: #fff;
  font: inherit;
}
.profile-inline input:focus { outline: none; border-color: #E61A40; }
.profile-small-btn {
  align-self: flex-start;
  height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.profile-btn-end { margin-left: auto; }
.profile-muted { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; flex: 1; }
.profile-facts { margin: 0; display: grid; gap: 8px; flex: 1; }
.profile-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; text-align: right; font-weight: 600; }
.profile-link {
  align-self: flex-start;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.profile-link:hover { color: #fff; }
.profile-admin { grid-column: 1 / -1; border-color: rgba(230, 26, 64, 0.45); }
.profile-switch { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.profile-switch input { position: absolute; opacity: 0; pointer-events: none; }
.profile-switch-track {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin-top: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s;
}
.profile-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.profile-switch input:checked + .profile-switch-track { background: #E61A40; }
.profile-switch input:checked + .profile-switch-track::after { transform: translateX(20px); }
.profile-switch input:focus-visible + .profile-switch-track { outline: 2px solid #fff; outline-offset: 2px; }
.profile-switch-text strong { display: block; margin-bottom: 4px; }
.profile-switch-text small { color: var(--muted); line-height: 1.45; }
.profile-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px 26px;
  border-top: 1px solid var(--line);
}
.profile-logout {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid rgba(230, 26, 64, 0.6);
  color: #ff8aa0;
  font-weight: 600;
}
.profile-logout:hover { background: rgba(230, 26, 64, 0.14); }
#liveMedia img { filter: none; }
@media (max-width: 680px) {
  .profile-header { flex-direction: column; text-align: center; padding: 30px 20px 22px; }
  .profile-grid { grid-template-columns: 1fr; padding: 18px 16px; }
  .profile-footer { padding: 16px; }
}
.notif-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif-item strong { display: block; margin-bottom: 4px; }

/* Formulario de Notificaciones Push Admin */
.admin-notif-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
.notif-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .notif-form-grid { grid-template-columns: 1fr; }
}
.admin-input, .admin-textarea, .admin-select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0d0d0d;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s;
}
.admin-textarea {
  resize: vertical;
  min-height: 70px;
}
.admin-input:focus, .admin-textarea:focus, .admin-select:focus {
  outline: none;
  border-color: #E61A40;
}
.notif-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.notif-submit-btn {
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.notif-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notif-status-text {
  font-size: 0.88rem;
  color: var(--muted);
}
.notif-status-text.success {
  color: #4ade80;
}
.notif-status-text.error {
  color: #ff6b81;
}

/* Historial de notificaciones admin */
.notif-history-wrap {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notif-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-history-head h4 {
  margin: 0;
  font-size: 1rem;
  color: #f1f1f1;
}
.notif-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}
.notif-history-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: #0d0d0d;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.notif-history-info {
  flex: 1;
  min-width: 0;
}
.notif-history-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.notif-history-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}
.notif-history-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(230, 26, 64, 0.2);
  color: #ff8aa0;
  font-weight: 600;
  border: 1px solid rgba(230, 26, 64, 0.4);
}
.notif-history-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
}
.notif-history-body {
  margin: 0;
  font-size: 0.85rem;
  color: #d1d1d1;
  line-height: 1.4;
  word-break: break-word;
}
.notif-history-meta {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
.notif-history-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}
.notif-action-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #222;
  color: #fff;
  transition: all 0.2s;
  white-space: nowrap;
}
.notif-action-btn:hover {
  background: #333;
}
.notif-resend-btn {
  background: rgba(230, 26, 64, 0.15);
  border-color: rgba(230, 26, 64, 0.5);
  color: #ff8aa0;
}
.notif-resend-btn:hover {
  background: rgba(230, 26, 64, 0.35);
  color: #fff;
}
.notif-delete-btn {
  background: transparent;
  color: #888;
}
.notif-delete-btn:hover {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.4);
}

.player {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #000;
}
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.player video::-webkit-media-controls { display: none !important; }
.player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 106;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 18px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
  transition: opacity 0.3s;
}
.close-x {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  font-size: 1.4rem;
}

/* Barra inferior custom (diseño streaming) */
.player-chrome {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 106;
  padding: 0 28px 22px;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 55%, transparent 100%);
  transition: opacity 0.3s;
}
.pc-progress-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.pc-progress {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #e61a40 var(--pc-pct, 0%), rgba(255,255,255,.28) var(--pc-pct, 0%));
  outline: none;
  cursor: pointer;
}
.pc-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #e61a40;
  border: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}
.pc-progress::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #e61a40;
  border: none;
}
.pc-duration {
  min-width: 48px;
  text-align: right;
  color: #fff;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.pc-bar {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.4fr) 1fr;
  align-items: center;
  gap: 16px;
}
.pc-left, .pc-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pc-right { justify-content: flex-end; }
.pc-center {
  text-align: center;
  min-width: 0;
}
.pc-center strong {
  display: block;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-center .player-chapter-subtitle {
  display: block;
  margin-top: 2px;
  color: #c8c8c8;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.pc-btn:hover { background: rgba(255,255,255,0.12); }
.pc-btn svg { width: 22px; height: 22px; }
.pc-btn.hidden { display: none !important; }
.player-chapters-sheet {
  position: absolute;
  inset: 0;
  z-index: 115;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.72);
  padding: 24px;
}
.player-chapters-sheet.hidden { display: none !important; }
.player-chapters-card {
  width: min(420px, 92vw);
  max-height: min(70vh, 520px);
  background: #141414;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.player-chapters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.player-chapters-list {
  overflow-y: auto;
  padding: 8px;
}
.player-chapter-row {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
}
.player-chapter-row:hover,
.player-chapter-row.active { background: rgba(230,26,64,.18); }
.player-chapter-row span { color: #a8a8a8; font-size: 0.8rem; }

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.82);
}
.login-card {
  width: min(420px, 92vw);
  padding: 28px 24px;
  background: #171417;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}
.login-logo {
  display: block;
  width: 112px;
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;
}
.login-card h2 { margin-bottom: 8px; text-align: center; }
.login-card > p { text-align: center; }
.login-card p { color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.login-card input {
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: #101010;
  color: #fff;
}
.login-error { color: #ff8b8b; margin: 0 0 12px; }
.login-card .btn-play { width: 100%; justify-content: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 16px;
  background: #fff;
  color: #111;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* === ETAPA 7: Migración, Estadísticas, Capítulos y Overlay Player === */

/* Migración Admin */
.migration-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.migration-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.migration-action-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.migration-action-info strong {
  font-size: 0.95rem;
  color: #fff;
}
.migration-action-info span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.migration-action-danger {
  border-color: rgba(230, 26, 64, 0.35);
  background: rgba(230, 26, 64, 0.06);
}
.btn-danger {
  background: #e61a40;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-danger:hover {
  opacity: 0.85;
}
.migration-status {
  margin-top: 14px;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  color: #a0ffbe;
  display: none;
}
.migration-status.active {
  display: block;
}
.migration-status.error {
  color: #ff8b8b;
}

/* Estadísticas de Reacciones */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.stats-metric-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats-metric-box .metric-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}
.stats-metric-box .metric-lbl {
  font-size: 0.78rem;
  color: var(--muted);
}
.stats-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}
.stats-col h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #fff;
}
.stats-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}
.stats-table th {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
}
.stats-table td {
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #eee;
}
.stats-badge-pct {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}
.stats-badge-high { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.stats-badge-med { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.stats-badge-low { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

/* Texto completo y ajustado (sin barra horizontal): las tarjetas anchas ocupan toda la fila
   y cualquier texto largo se parte en varias líneas en lugar de cortarse. */
.profile-card-wide { grid-column: 1 / -1; }
.profile-card, .stats-col, .migration-action-info { min-width: 0; }
.profile-card, .migration-action-info, .stats-table, .stats-metric-box {
  overflow-wrap: anywhere;
  word-break: normal;
}
.migration-action-item { flex-wrap: wrap; }
.migration-action-info { flex: 1 1 260px; }
.migration-action-item .profile-small-btn {
  flex: none;
  height: auto;
  min-height: 40px;
  padding: 8px 16px;
  white-space: normal;
  text-align: center;
}
.profile-card-head { flex-wrap: wrap; }
.profile-card-head h3 { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.migration-status { white-space: pre-wrap; overflow-wrap: anywhere; }
.stats-metric-box .metric-lbl { white-space: normal; }
.stats-table-wrap { overflow-x: hidden; }
.stats-table { table-layout: fixed; }
.stats-table th, .stats-table td { white-space: normal; vertical-align: top; overflow-wrap: anywhere; }
.stats-table th:first-child, .stats-table td:first-child { width: 46%; }
.stats-table th:not(:first-child), .stats-table td:not(:first-child) { width: 18%; }
#infoText, #heroDesc { white-space: pre-line; }
.chapter-session {
  margin: 8px 0 2px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.chapters-list { max-height: 280px; }
.chapter-item-name, .chapter-item-sub { overflow-wrap: anywhere; }

/* Capítulos en InfoModal */
.chapters-block {
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.chapters-title {
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: #fff;
}
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}
.chapter-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s;
}
.chapter-item-btn:hover {
  background: rgba(230, 26, 64, 0.15);
  border-color: rgba(230, 26, 64, 0.4);
}
.chapter-item-btn.active {
  background: rgba(230, 26, 64, 0.25);
  border-color: #e61a40;
}
.chapter-item-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chapter-item-name {
  font-size: 0.9rem;
  font-weight: 600;
}
.chapter-item-sub {
  font-size: 0.76rem;
  color: var(--muted);
}
.chapter-item-play-icon {
  font-size: 0.85rem;
  color: #e61a40;
}

/* Player Overlay "Siguiente capítulo" */
.player {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.player.hidden { display: none !important; }
.player .player-top { z-index: 106; }
.player.idle .player-top,
.player.idle .player-chrome { opacity: 0; pointer-events: none; }
.player-top-actions { display: flex; gap: 10px; }
.player-fs-btn { display: grid; place-items: center; }
.player-fs-btn svg { width: 20px; height: 20px; }
.player-title-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.player-chapter-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: normal;
}
.player-next-overlay {
  position: absolute;
  bottom: 72px;
  right: 28px;
  z-index: 110;
  max-width: 460px;
  animation: slideUpFade 0.3s ease;
}
.player-next-overlay.hidden { display: none !important; }
.next-overlay-card {
  background: #000;
  border: none;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
}
.next-overlay-thumb {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e61a40;
  background: #2a2a2a;
  align-self: center;
}
.next-overlay-thumb[hidden] { display: none !important; }
.next-overlay-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 2px 4px 2px 0;
}
.next-label {
  font-size: 0.78rem;
  color: #e61a40;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.next-label strong { font-weight: 800; color: #e61a40; }
.next-overlay-content h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
}
.next-remaining {
  font-size: 0.8rem;
  color: #b0b0b0;
  margin-bottom: 6px;
}
.next-overlay-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 4px;
}
.btn-play-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid #e61a40;
  background: #fff;
  color: #111;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-play-next:hover { background: #f3f3f3; }
.btn-cancel-next {
  background: transparent;
  border: none;
  color: #a8a8a8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  text-align: center;
}
.btn-cancel-next:hover { color: #fff; }

/* Pantalla final de tema completado */
.player-end-screen {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.player-end-screen.hidden { display: none !important; }
.end-screen-card {
  max-width: 580px;
  width: 100%;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}
.end-screen-badge {
  font-size: 3.2rem;
  margin-bottom: 8px;
}
.end-screen-card h2 {
  font-size: 1.6rem;
  margin: 0 0 6px;
  color: #fff;
}
.end-screen-course {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.end-screen-recognition {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.recognition-status-icon {
  font-size: 2.2rem;
}
.recognition-status-text h4 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: #fff;
}
.recognition-status-text p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.end-screen-suggested {
  margin-bottom: 24px;
  text-align: left;
}
.end-screen-suggested h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  color: #ccc;
}
.suggested-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.suggested-item {
  flex: 0 0 140px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: #202020;
  transition: transform 0.2s;
}
.suggested-item:hover {
  transform: scale(1.04);
}
.suggested-item img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}
.suggested-item span {
  display: block;
  padding: 6px;
  font-size: 0.76rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.end-screen-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

@media (max-width: 768px) {
  .stats-overview { grid-template-columns: repeat(2, 1fr); }
  .stats-tables-grid { grid-template-columns: 1fr; }
  .player-next-overlay { right: 12px; left: auto; bottom: 70px; max-width: min(460px, calc(100vw - 24px)); }
  .next-overlay-thumb { width: 88px; height: 88px; }
  .end-screen-card { padding: 20px; }
  .player-chrome { padding: 0 14px 14px; }
  .pc-bar { grid-template-columns: 1fr; gap: 10px; }
  .pc-left, .pc-right { justify-content: center; }
  .pc-center { order: -1; }
}

@media (max-width: 1100px) {
  .episode-card { flex-basis: 280px; }
  .episode-card.shape-square { flex-basis: 190px; }
  .episode-card.shape-wide { flex-basis: 338px; }
}

@media (max-width: 860px) {
  .main { margin-left: 0; }
  .sidebar {
    width: min(280px, 84vw);
    transform: translateX(-110%);
    transition: transform 0.25s ease, width 0.22s ease;
  }
  .sidebar.open {
    transform: translateX(0);
    width: min(280px, 84vw);
  }
  .sidebar.open .brand-name,
  .sidebar.open .side-label,
  .sidebar.open .footer-brand,
  .sidebar.open .footer-copy,
  .sidebar.open .footer-links {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .mobile-menu-btn { display: grid; }
  .topbar, .hero, .section, .group-bar { padding-left: 20px; padding-right: 20px; }
  .tabs { gap: 16px; }
  .tab { font-size: 0.86rem; }
  .search { width: 42px; padding: 0; justify-content: center; }
  .search input { display: none; }
  .search.open { width: min(260px, 58vw); padding: 0 14px; }
  .search.open input { display: block; }
  .episode-row { padding-left: 20px; padding-right: 20px; margin: 0 -20px; }
  .help-fab { width: 62px; height: 62px; }
  .hero-arrow { width: 36px; height: 36px; }
  .hero-arrow.prev { left: 8px; }
  .hero-arrow.next { right: 8px; }
}

/* Panel Subir contenido NODO (menú Cuenta) */
.nodo-upload-panel {
  width: min(920px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  overflow: auto;
  padding: 28px 28px 36px;
  background: #121212;
  border-radius: 16px;
  isolation: isolate;
}
.nodo-up-header h2 { margin: 0 0 4px; font-size: 1.35rem; }
.nodo-up-header .profile-muted { margin: 0; }
.nodo-up-body { margin-top: 18px; }
.nodo-up-lead { color: var(--muted); margin: 0 0 16px; line-height: 1.45; }
.nodo-up-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.nodo-up-type {
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.nodo-up-type:hover:not(:disabled) {
  border-color: #E61A40;
  background: rgba(230,26,64,.12);
}
.nodo-up-type:disabled,
.nodo-up-type.soon {
  opacity: .45;
  cursor: not-allowed;
}
.nodo-up-type strong { display: block; margin-bottom: 6px; }
.nodo-up-type small { color: var(--muted); line-height: 1.35; display: block; }
.nodo-up-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.nodo-up-field { display: flex; flex-direction: column; gap: 4px; }
.nodo-up-field:has(textarea),
.nodo-up-field.nodo-up-hero-preview-wrap,
.nodo-up-check { grid-column: 1 / -1; }
.nc-hero-preview {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: #070707;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.nc-hero-preview.is-dragging { cursor: grabbing; }
.nc-hero-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: default;
}
.nc-hero-preview-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #070707;
}
.nc-hero-preview-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
  display: block;
}
.nc-hero-preview-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.42) 42%, rgba(0,0,0,.18) 100%),
    linear-gradient(180deg, rgba(0,0,0,.12) 0%, transparent 38%, #000 100%);
}
.nc-hero-preview-ui {
  position: absolute;
  left: 18px;
  top: 22%;
  z-index: 2;
  max-width: 46%;
  pointer-events: none;
}
.nc-hero-preview-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
}
.nc-hero-preview-title {
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.nc-hero-preview-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.nc-hero-preview-actions span {
  width: 52px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.28);
}
.nc-hero-preview-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 0.72rem;
  pointer-events: none;
}
.nodo-up-label { font-size: .9rem; font-weight: 600; color: #fff; }
.nodo-up-help { font-size: .78rem; color: var(--muted); line-height: 1.35; margin-bottom: 2px; }
.nodo-up-example {
  display: block;
  margin-top: 4px;
  font-size: .76rem;
  font-style: italic;
  color: #c8c8c8;
}
.nodo-up-url-preview {
  display: block;
  margin-top: 6px;
  font-size: .72rem;
  color: var(--muted);
  word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
}
.nodo-up-catalog-kind,
.nodo-up-span2 { grid-column: 1 / -1; }
.nodo-up-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.nodo-up-check small { display: block; color: var(--muted); margin-top: 4px; }
.nodo-up-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}
.nodo-up-back { margin-top: 16px; }
.nodo-up-warn {
  grid-column: 1 / -1;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(230, 26, 64, 0.12);
  border: 1px solid rgba(230, 26, 64, 0.35);
  color: #ffb3c0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.nc-pick-filter { width: 100%; margin-bottom: 12px; }
.nc-pick-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(48vh, 420px);
  overflow: auto;
}
.nc-pick-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #fff;
  cursor: pointer;
}
.nc-pick-item:hover {
  border-color: #E61A40;
  background: rgba(230,26,64,.12);
}
.nc-pick-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #222;
}
.nc-pick-thumb--empty { display: inline-block; }
.nc-pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nc-pick-text strong { font-size: 0.95rem; }
.nc-pick-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-chapters { margin-top: 16px; grid-column: 1 / -1; }
.nc-chapters h4 { margin: 0 0 8px; }
.nc-ch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nc-ch-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}
.nc-ch-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
@media (max-width: 700px) {
  .nodo-up-form { grid-template-columns: 1fr; }
  .nodo-upload-panel { padding: 20px 16px 28px; }
}
