:root {
  --bg-0: #06080f;
  --bg-1: #0e121f;
  --bg-glass: rgba(16, 21, 35, 0.76);
  --bg-elevated: #161d31;
  --bg-hover: #1f2943;

  --border-subtle: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-highlight: rgba(139, 92, 246, 0.5);

  --text-primary: #f5f7ff;
  --text-secondary: #9aa4bf;
  --text-muted: #646f8c;

  --accent: #7c5cff;
  --accent-2: #a855f7;
  --accent-hover: #6c49ff;
  --accent-soft: rgba(124, 92, 255, 0.16);

  /* Categorías */
  --cat-anime: #8b5cf6;
  --cat-manga: #ec4899;
  --cat-series: #06b6d4;
  --cat-movie: #f59e0b;

  /* Estados */
  --st-completed: #10b981;
  --st-completed-soft: rgba(16, 185, 129, 0.15);
  --st-watching: #3b82f6;
  --st-watching-soft: rgba(59, 130, 246, 0.15);
  --st-planned: #f59e0b;
  --st-planned-soft: rgba(245, 158, 11, 0.15);
  --st-dropped: #ef4444;
  --st-dropped-soft: rgba(239, 68, 68, 0.15);

  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 30px -6px rgba(0, 0, 0, 0.5);
  --shadow-popover: 0 18px 48px rgba(0, 0, 0, 0.72);
  --shadow-modal: 0 28px 80px rgba(0, 0, 0, 0.78);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-0);
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: transparent;
}

/* =========================================================
   FONDO GLOBAL DE PÁGINA PERSONALIZABLE + LUCES AMBIENTALES
   ========================================================= */
.page-bg-root {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--bg-0);
  transition: background-color 0.35s ease;
  contain: strict;
}

.page-bg-image {
  position: absolute;
  inset: -32px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.35s ease, filter 0.25s ease;
}

.page-bg-image.has-bg {
  opacity: 1;
}

.page-bg-dim {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.25s ease;
}

.ambient-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  contain: strict;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.28;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.52) 34%, rgba(0, 0, 0, 0.14) 58%, transparent 74%);
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.52) 34%, rgba(0, 0, 0, 0.14) 58%, transparent 74%);
  transition: background 0.4s ease, opacity 0.35s ease;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.orb-violet {
  width: 740px;
  height: 580px;
  background: #6d4aff;
  top: -240px;
  left: 4%;
}

.orb-cyan {
  width: 660px;
  height: 520px;
  background: #06b6d4;
  top: -220px;
  right: 2%;
  opacity: 0.18;
}

.orb-rose {
  width: 620px;
  height: 540px;
  background: #ec4899;
  bottom: -240px;
  left: 32%;
  opacity: 0.14;
}

.container {
  width: 100%;
  max-width: min(1860px, 96vw);
  margin: 0 auto;
  padding: 0 clamp(20px, 2.5vw, 40px);
}

.hidden {
  display: none !important;
}

/* =========================================================
   BARRA SUPERIOR Y BUSCADOR OMNIBOX
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 8, 15, 0.8);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border-subtle);
  contain: layout paint style;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #7c5cff 0%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.45);
}

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-title {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, #ffffff 30%, #c7d0e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #a78bfa;
  margin-top: 2px;
}

/* Navegación segmentada */
.nav-segmented {
  display: flex;
  align-items: center;
  background: rgba(15, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 999px;
  gap: 3px;
}

.nav-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nav-seg-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.nav-seg-btn.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.3) 0%, rgba(168, 85, 247, 0.22) 100%);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.2);
}

.nav-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

.nav-seg-btn.active .nav-badge {
  background: rgba(139, 92, 246, 0.7);
  color: #fff;
}

/* Buscador Global Omnibox */
.global-omnibox {
  position: relative;
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
}

.omni-icon {
  position: absolute;
  left: 15px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: color 0.2s;
}

.global-omnibox:focus-within .omni-icon {
  color: #a48fff;
}

.global-omnibox input {
  width: 100%;
  background: rgba(15, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  padding: 10px 76px 10px 42px;
  transition: all 0.2s ease;
}

.global-omnibox input::placeholder {
  color: var(--text-muted);
}

.global-omnibox input:focus {
  outline: none;
  background: rgba(20, 26, 44, 0.95);
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Quitar la X nativa de WebKit search inputs */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.kbd-hint {
  position: absolute;
  right: 54px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 2px 7px;
  pointer-events: none;
}

.global-omnibox:focus-within .kbd-hint {
  display: none;
}

.icon-clear-btn {
  position: absolute;
  right: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-clear-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.spinner {
  position: absolute;
  right: 82px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #a48fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botones generales */
.primary-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.26) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.primary-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(124, 92, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.primary-btn:hover::after {
  transform: translateX(120%);
}

.primary-btn:active {
  transform: scale(0.97);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease;
}

.secondary-btn:hover {
  background: var(--bg-hover);
  border-color: rgba(167, 139, 250, 0.5);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.secondary-btn:active {
  transform: scale(0.97);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.ghost-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: rgba(167, 139, 250, 0.42);
  transform: translateY(-1px);
}

.ghost-btn:active {
  transform: scale(0.97);
}

.ghost-btn.danger-text:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
}

#cloudBtnLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.cloud-dot.configured { background: var(--st-planned); }
.cloud-dot.synced {
  background: var(--st-completed);
  box-shadow: 0 0 9px var(--st-completed);
}

.btn-sm { padding: 7px 13px; font-size: 0.8rem; }
.full-width { width: 100%; }

.link-btn {
  background: none;
  border: none;
  color: #a78bfa;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover { text-decoration: underline; }

/* =========================================================
   CINTA DE ESTADÍSTICAS (KPI RIBBON)
   ========================================================= */
.stats-section {
  padding-top: 20px;
}

.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  text-align: left;
  background: linear-gradient(155deg, rgba(20, 26, 44, 0.9) 0%, rgba(11, 15, 27, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 18px 22px;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.22s ease,
              box-shadow 0.22s ease,
              background 0.22s ease;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.65;
  transition: opacity 0.25s ease, height 0.25s ease;
}

.stat-card[data-kpi-status="all"]::before { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.stat-card[data-kpi-status="completed"]::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card[data-kpi-status="watching"]::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card[data-kpi-status="planned"]::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(155deg, rgba(26, 34, 58, 0.88) 0%, rgba(14, 20, 36, 0.96) 100%);
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.stat-card:hover::before,
.stat-card.active-kpi::before {
  opacity: 1;
  height: 3.5px;
}

.stat-card.active-kpi {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 12px 32px rgba(124, 92, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stat-card[data-kpi-status="all"]:hover {
  box-shadow: 0 16px 40px -6px rgba(124, 92, 255, 0.25), 0 0 24px rgba(124, 92, 255, 0.15);
}
.stat-card[data-kpi-status="completed"]:hover {
  box-shadow: 0 16px 40px -6px rgba(16, 185, 129, 0.25), 0 0 24px rgba(16, 185, 129, 0.15);
}
.stat-card[data-kpi-status="watching"]:hover {
  box-shadow: 0 16px 40px -6px rgba(56, 189, 248, 0.25), 0 0 24px rgba(56, 189, 248, 0.15);
}
.stat-card[data-kpi-status="planned"]:hover {
  box-shadow: 0 16px 40px -6px rgba(245, 158, 11, 0.25), 0 0 24px rgba(245, 158, 11, 0.15);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-icon-all { background: rgba(139, 92, 246, 0.18); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
.stat-icon-completed { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stat-icon-watching { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.stat-icon-planned { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stat-value {
  font-family: "Outfit", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.stat-pct {
  font-size: 0.78rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-sub {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 4px;
}

.stat-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  margin-top: 10px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #34d399);
  border-radius: 99px;
  transition: width 0.35s ease;
}

/* =========================================================
   FILTROS Y CATEGORÍAS DE BIBLIOTECA
   ========================================================= */
.filters-section {
  padding-top: 18px;
  padding-bottom: 8px;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.category-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 4px;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.cat-tab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
}

.cat-tab.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35) 0%, rgba(168, 85, 247, 0.25) 100%);
  border: 1px solid rgba(139, 92, 246, 0.55);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.25);
}

.cat-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
  color: #94a3b8;
  transition: all 0.18s ease;
}

.cat-tab.active .cat-count {
  background: rgba(139, 92, 246, 0.65);
  color: #fff;
}

.fav-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.fav-filter-btn .fav-heart {
  color: #fb7185;
  transition: transform 0.18s ease;
}

.fav-filter-btn:hover {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.1);
}

.fav-filter-btn:hover .fav-heart {
  transform: scale(1.15);
}

.fav-filter-btn.active {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.7);
  color: #fff;
  box-shadow: 0 2px 12px rgba(244, 63, 94, 0.35);
}

.fav-filter-btn.active .cat-count {
  background: rgba(244, 63, 94, 0.65);
  color: #fff;
}

.toolbar-right-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.local-filter-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(15, 20, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0 12px;
  color: #94a3b8;
  height: 38px;
  transition: all 0.2s ease;
}

.local-filter-box:focus-within {
  border-color: rgba(139, 92, 246, 0.65);
  background: rgba(20, 26, 44, 0.95);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  color: #f8fafc;
}

.local-filter-box input {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.84rem;
  padding: 6px 20px 6px 8px;
  width: 180px;
  transition: width 0.25s ease;
}

.local-filter-box input:focus { outline: none; }
.local-filter-box:focus-within input { width: 220px; }

.mini-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.mini-clear-btn:hover {
  color: #fff;
}

.roulette-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.2) 100%);
  border: 1px solid rgba(139, 92, 246, 0.38);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.roulette-action-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32) 0%, rgba(99, 102, 241, 0.32) 100%);
  border-color: rgba(139, 92, 246, 0.7);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.subfilters-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.status-pills::-webkit-scrollbar { display: none; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 20, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.status-pill:hover {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.status-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.pill-count {
  opacity: 0.65;
  font-size: 0.74rem;
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-completed { background: var(--st-completed); box-shadow: 0 0 8px rgba(16, 185, 129, 0.7); }
.dot-watching  { background: var(--st-watching); box-shadow: 0 0 8px rgba(59, 130, 246, 0.7); }
.dot-planned   { background: var(--st-planned); box-shadow: 0 0 8px rgba(245, 158, 11, 0.7); }
.dot-dropped   { background: var(--st-dropped); box-shadow: 0 0 8px rgba(239, 68, 68, 0.7); }

.sort-select {
  background: rgba(15, 20, 32, 0.85);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  height: 38px;
}

.sort-select option {
  background: var(--bg-1);
  color: var(--text-primary);
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent);
}

.density-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 20, 32, 0.85);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.density-btn:hover,
.density-btn.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(30, 41, 59, 0.85);
  transform: scale(1.05);
}

/* =========================================================
   VISTA EXPLORAR Y BÚSQUEDA GLOBAL
   ========================================================= */
.explore-view {
  padding-top: 22px;
  padding-bottom: 90px;
}

.explore-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.explore-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #a78bfa;
  margin-bottom: 4px;
}

.explore-heading {
  font-family: "Outfit", sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.explore-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.quick-chips-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.quick-try-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.suggestion-chip:hover {
  background: var(--accent-soft);
  border-color: rgba(124, 92, 255, 0.45);
  color: #fff;
}

.explore-tabs-bar {
  margin-bottom: 18px;
}

/* =========================================================
   CUADRÍCULA DE TARJETAS DE PORTADA (BIBLIOTECA + EXPLORAR)
   ========================================================= */
.main-content {
  padding-top: 12px;
  padding-bottom: 90px;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 18px;
}

.poster-grid.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 14px;
}

.media-card {
  background: #111422;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, box-shadow 0.22s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
  contain: layout style;
}

.media-card:hover {
  will-change: transform;
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.7), 0 0 20px rgba(139, 92, 246, 0.15);
}

/* Resalte en Explorar cuando ya está en tu biblioteca */
.media-card.in-library-completed {
  border-color: rgba(16, 185, 129, 0.45);
}

.media-card.in-library-watching {
  border-color: rgba(59, 130, 246, 0.45);
}

.media-card.in-library-planned {
  border-color: rgba(245, 158, 11, 0.45);
}

.poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #0c0f1c;
  overflow: hidden;
  cursor: pointer;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(9, 11, 18, 0.95) 0%, rgba(9, 11, 18, 0.45) 50%, transparent 100%);
  pointer-events: none;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.media-card:hover .poster-wrap img {
  transform: scale(1.05);
}

.fallback-poster {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  background: radial-gradient(circle at 30% 20%, #232a46, #0d101c);
}

.fallback-poster .fb-emoji {
  font-size: 2.3rem;
  margin-bottom: 8px;
}

.fallback-poster .fb-title {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Insignia superior izquierda: categoría + emisión apilados sin solapamiento */
.card-top-left-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  pointer-events: none;
  max-width: calc(100% - 46px);
}

.card-cat-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.card-top-left-badges .card-cat-badge {
  position: static;
  top: auto;
  left: auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-badge-anime  { background: rgba(139, 92, 246, 0.92); }
.cat-badge-manga  { background: rgba(236, 72, 153, 0.92); }
.cat-badge-novel  { background: rgba(16, 185, 129, 0.94); color: #fff; }
.cat-badge-series { background: rgba(6, 182, 212, 0.92); }
.cat-badge-movie  { background: rgba(245, 158, 11, 0.94); color: #121318; }

/* Insignia inferior izquierda: Puntuación / Episodios */
.card-bottom-left-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  flex-wrap: wrap;
}

.rating-chip {
  background: rgba(10, 13, 22, 0.92);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fcd34d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.user-rating-chip {
  background: rgba(88, 28, 135, 0.92);
  border: 1px solid rgba(168, 85, 247, 0.6);
  color: #f3e8ff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.4);
}

.seasons-chip {
  background: rgba(22, 30, 46, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

/* Acciones superiores derechas (Favorito / Editar) */
.card-top-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.card-top-actions.has-fav,
.media-card:hover .card-top-actions,
.media-card:focus-within .card-top-actions {
  opacity: 1;
}

.card-icon-btn {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 13, 24, 0.92);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.78rem;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

.card-icon-btn:hover {
  transform: scale(1.08);
  background: var(--bg-elevated);
}

.card-icon-btn.fav-btn.is-fav {
  background: rgba(244, 63, 94, 0.95);
  border-color: rgba(244, 63, 94, 1);
  color: #fff;
}

/* Orbe inferior derecho: Marcar Visto en 1 clic */
.quick-seen-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 13, 24, 0.92);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.quick-seen-btn:hover {
  transform: scale(1.12);
  color: #fff;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.quick-seen-btn.is-completed {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.55);
}

/* Pie de la tarjeta */
.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: space-between;
  cursor: pointer;
}

.card-meta-top {
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.card-genres-row,
.card-tracker-wrap,
.explore-card-actions {
  cursor: default;
}

.card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.32;
  color: #f8fafc;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.15s ease;
}

.card-title:hover,
.card-meta-top:hover .card-title {
  color: #c4b5fd;
}

.card-subline {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.card-author-line {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c4b5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.card-genres-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.card-genre-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-genre-tag:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #fff;
}

/* Botón personalizado de estado */
.status-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-radius: 8px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.status-trigger-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.status-trigger-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.status-chevron {
  font-size: 0.68rem;
  opacity: 0.75;
}

.status-trigger-btn.st-completed {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.status-trigger-btn.st-watching {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.status-trigger-btn.st-planned {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.status-trigger-btn.st-dropped {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Botones de acción rápida en Explorar (cuando aún no está guardado) */
.explore-card-actions {
  display: flex;
  gap: 6px;
}

.exp-seen-btn {
  flex: 1;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.exp-seen-btn:hover {
  background: var(--st-completed);
  border-color: var(--st-completed);
  color: #fff;
}

.exp-more-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.exp-more-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

/* =========================================================
   SELECTOR DE VISTA (CUADRÍCULA VS LISTA COMPACTA)
   ========================================================= */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 18, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  line-height: 1;
}

.view-mode-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.07);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.5) 0%, rgba(56, 189, 248, 0.45) 100%);
  color: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.65);
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.4);
}

/* =========================================================
   TRACKER RÁPIDO DE PROGRESO (+1 / -1 / BARRA)
   ========================================================= */
.card-tracker-wrap {
  margin-top: 6px;
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.18s ease;
}

.media-card:hover .card-tracker-wrap {
  border-color: rgba(124, 92, 255, 0.35);
}

.tracker-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tracker-step-btn {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}

.tracker-step-btn:hover:not(:disabled) {
  background: rgba(124, 92, 255, 0.4);
  border-color: #7c5cff;
  color: #fff;
  transform: scale(1.08);
}

.tracker-step-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

.tracker-plus-btn {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35) 0%, rgba(56, 189, 248, 0.35) 100%);
  border-color: rgba(124, 92, 255, 0.55);
  color: #c4b5fd;
  font-size: 0.74rem;
}

.tracker-plus-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c5cff 0%, #38bdf8 100%) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.65);
}

.tracker-prog-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-prog-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #38bdf8;
}

.tracker-prog-pill strong {
  color: #38bdf8;
  font-size: 0.84rem;
}

.tracker-prog-pill small {
  color: #94a3b8;
  font-weight: 600;
  margin-left: 1px;
}

.tracker-prog-pill.is-complete {
  color: #34d399;
}

.tracker-prog-pill.is-complete .tracker-check {
  font-weight: 900;
  color: #10b981;
  margin-right: 2px;
}

.tracker-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.tracker-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff 0%, #38bdf8 100%);
  border-radius: 99px;
  transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tracker-bar-fill.is-complete {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

/* =========================================================
   VISTA EN LISTA COMPACTA (HIGH-DENSITY GLASSMORPHIC TABLE)
   ========================================================= */
.poster-grid.compact-list-view {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  grid-template-columns: none !important;
}

.media-list-row {
  display: grid;
  grid-template-columns: 46px minmax(200px, 1fr) 95px 190px 145px 76px;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  background: rgba(14, 18, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  content-visibility: auto;
  contain-intrinsic-size: auto 60px;
  contain: layout style;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.media-list-row:hover {
  will-change: transform;
  transform: translateY(-2px);
  background: rgba(20, 26, 46, 0.88);
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 92, 255, 0.15);
}

.list-row-thumb {
  width: 44px;
  height: 60px;
  border-radius: 7px;
  overflow: hidden;
  background: #090c15;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  flex-shrink: 0;
}

.list-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.media-list-row:hover .list-row-thumb img {
  transform: scale(1.06);
}

.list-row-thumb .thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: #151b2e;
}

.list-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
}

.list-row-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.list-row-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.16s ease;
}

.list-row-main:hover .list-row-title {
  color: #38bdf8;
}

.list-row-meta-tag {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.list-row-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row-author {
  color: #c4b5fd;
  font-weight: 600;
}

.list-row-genres {
  color: #64748b;
}

.list-row-score-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-row-empty-score {
  color: #475569;
  font-weight: 700;
}

.list-row-tracker-col {
  min-width: 0;
}

.list-row-tracker-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-row-status-col .status-trigger-btn {
  width: 100%;
  padding: 7px 11px;
  font-size: 0.78rem;
}

.list-row-actions-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Responsividad para Lista Compacta */
@media (max-width: 980px) {
  .media-list-row {
    grid-template-columns: 44px 1fr 160px 130px 40px;
    gap: 10px;
  }
  .list-row-score-box {
    display: none;
  }
}

@media (max-width: 720px) {
  .media-list-row {
    grid-template-columns: 42px 1fr 140px;
    gap: 8px;
  }
  .list-row-status-col,
  .list-row-actions-col,
  .list-row-subline {
    display: none;
  }
}

/* =========================================================
   ESQUELETOS DE CARGA (SHIMMER)
   ========================================================= */
.skeleton-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
}

.skeleton-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(110deg, #131829 25%, #1d253d 45%, #131829 65%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}

.skeleton-lines {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.skeleton-line.short { width: 58%; }

@keyframes shimmer {
  to { background-position-x: -200%; }
}

/* =========================================================
   POPOVER FLOTANTE DE ESTADOS
   ========================================================= */
.status-popover {
  position: fixed;
  z-index: 180;
  width: 210px;
  background: rgba(16, 21, 36, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-popover);
  animation: popIn 0.13s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.pop-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.pop-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pop-item.is-selected {
  background: rgba(124, 92, 255, 0.18);
  color: #fff;
}

.pop-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pop-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 5px 4px;
}

.pop-item.pop-danger {
  color: #fca5a5;
}

.pop-item.pop-danger:hover {
  background: rgba(239, 68, 68, 0.16);
}

/* =========================================================
   ESTADO VACÍO
   ========================================================= */
.empty-state {
  position: relative;
  text-align: center;
  max-width: 540px;
  margin: 48px auto;
  padding: 38px 26px;
  background: rgba(16, 21, 35, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.empty-icon-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
}

.empty-state h2 {
  font-family: "Outfit", sans-serif;
  font-size: 1.38rem;
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 22px;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-try-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.quick-chips-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}


/* Utilidades compartidas (extraídas para carga crítica) */
.mini-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
.empty-subpanel {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
}
.alert-banner {
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  margin-bottom: 14px;
}

.alert-banner.error {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-banner.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}
/* =========================================================
   TOASTS Y BOTÓN FLOTANTE MÓVIL
   ========================================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(22, 29, 49, 0.96);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.2s ease-out;
}

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

.mobile-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 55;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(124, 92, 255, 0.55);
  cursor: pointer;
}

/* =========================================================
   ADAPTACIÓN MÓVIL Y TABLET
   ========================================================= */
@media (max-width: 960px) {
  .container {
    padding: 0 18px;
  }

  .stats-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-inner {
    flex-wrap: wrap;
  }

  .global-omnibox {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .kbd-hint {
    display: none;
  }

  .category-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .category-tabs-wrap {
    justify-content: flex-start;
  }

  .toolbar-right-controls {
    justify-content: space-between;
    width: 100%;
  }

  .local-filter-box {
    flex: 1;
  }

  .local-filter-box input,
  .local-filter-box:focus-within input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }

  .hide-sm {
    display: none;
  }

  .brand-title {
    font-size: 1.08rem;
  }

  .nav-seg-btn {
    padding: 6px 10px;
    font-size: 0.79rem;
  }

  .poster-grid,
  .poster-grid.compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-top-actions {
    opacity: 1;
  }

  .mobile-fab {
    display: flex;
  }
}
.nav-mini-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.78rem;
  background: rgba(124, 92, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.nav-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seasons-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(124, 92, 255, 0.92);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================================
   HERO SPOTLIGHT DESTACADO (INSPIRADO EN SHADEMANGA CON ESTILO VISTOLIST)
   ========================================================= */
.explore-hero-spotlight {
  position: relative;
  min-height: clamp(430px, 56vh, 560px);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 56px -12px rgba(0, 0, 0, 0.72);
  background: #070910;
  display: flex;
  align-items: flex-end;
}

.hero-spotlight-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: brightness(0.92);
}

.hero-spotlight-skeleton {
  display: none;
}

.explore-hero-spotlight.is-skeleton {
  pointer-events: none;
}

.explore-hero-spotlight.is-skeleton .hero-spotlight-content,
.explore-hero-spotlight.is-skeleton .hero-carousel-dots {
  display: none;
}

.explore-hero-spotlight.is-skeleton .hero-spotlight-skeleton {
  position: relative;
  z-index: 2;
  padding: 34px 38px 30px;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-skel-pill,
.hero-skel-title,
.hero-skel-sub,
.hero-skel-btns {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.13) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.hero-skel-pill {
  width: 210px;
  height: 22px;
  border-radius: 999px;
}

.hero-skel-title {
  width: 82%;
  height: 40px;
}

.hero-skel-sub {
  width: 64%;
  height: 18px;
}

.hero-skel-btns {
  width: 290px;
  height: 42px;
  border-radius: 12px;
  margin-top: 4px;
}

.explore-hero-spotlight:hover .hero-spotlight-bg {
  transform: scale(1.02);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to top,
      rgba(9, 10, 16, 0.98) 0%,
      rgba(9, 10, 16, 0.86) 38%,
      rgba(9, 10, 16, 0.45) 70%,
      rgba(9, 10, 16, 0.15) 100%
    ),
    linear-gradient(
      to right,
      rgba(9, 10, 16, 0.95) 0%,
      rgba(9, 10, 16, 0.72) 48%,
      transparent 100%
    );
  pointer-events: none;
}

.hero-spotlight-content {
  position: relative;
  z-index: 2;
  padding: 34px 38px 30px;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-spotlight-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-trend-badge {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.hero-cat-badge {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.hero-rating-badge {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}

.hero-year-badge {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-spotlight-title {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.18;
  color: #fff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-spotlight-genres {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.hero-spotlight-genre-tag {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hero-spotlight-genre-tag:hover {
  background: var(--accent);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.hero-spotlight-synopsis {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(241, 245, 249, 0.84);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-spotlight-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.hero-action-btn {
  padding: 10px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 12px;
}

.hero-fav-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f43f5e;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.hero-fav-btn:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.5);
  transform: scale(1.08);
}

.hero-fav-btn.is-fav {
  background: #f43f5e;
  color: #fff;
  border-color: #f43f5e;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.45);
}

.hero-carousel-dots {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  width: 24px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* =========================================================
   BARRA DE GÉNEROS EN EXPLORAR (INSPIRADA EN SHADEMANGA)
   ========================================================= */
.explore-genres-section {
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px 16px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.explore-genres-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.explore-genres-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.explore-genres-icon {
  font-size: 1.05rem;
}

.explore-genres-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.genre-active-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 8px var(--accent-soft);
  animation: badgePop 0.2s ease-out;
}

@keyframes badgePop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.explore-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.genre-mode-btn,
.genre-view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.genre-mode-btn:hover,
.genre-view-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.mode-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  transition: background 0.2s ease;
}

.genre-mode-btn.mode-or .mode-indicator-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* Barra de controles: buscador en vivo y pestañas */
.genre-controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.genre-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0 10px;
  height: 33px;
  min-width: 250px;
  flex: 1 1 250px;
  transition: all 0.18s ease;
}

.genre-search-wrap:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.genre-search-icon {
  font-size: 0.85rem;
  opacity: 0.6;
}

.genre-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.79rem;
  width: 100%;
}

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

.genre-search-clear-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.14s;
  flex-shrink: 0;
}

.genre-search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.genre-cat-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.genre-cat-filter-tabs::-webkit-scrollbar {
  display: none;
}

.genre-cat-tab {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.genre-cat-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.genre-cat-tab.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 700;
}

/* Barra de píldoras horizontal (modo normal) */
.explore-genre-pills-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  transition: max-height 0.25s ease;
}

.explore-genre-pills-bar::-webkit-scrollbar {
  display: none;
}

/* Modo expandido (vista cuadrícula en varias filas) */
.explore-genre-pills-bar.is-expanded {
  flex-wrap: wrap;
  overflow-y: auto;
  max-height: 260px;
  padding: 4px 2px 6px;
  gap: 8px;
  scrollbar-width: thin;
}

.genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 13px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
  position: relative;
  user-select: none;
}

.genre-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.genre-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px var(--accent-soft);
  font-weight: 700;
}

.genre-pill-check {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: -2px;
}

.genre-pills-empty {
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

/* Botón Cargar Más Títulos en Explorar (Expansión de Catálogo) */
.explore-load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 0 54px;
  width: 100%;
}

.explore-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 34px;
  background: linear-gradient(135deg, #7c5cff 0%, #6343e0 100%);
  color: #ffffff;
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: 9999px;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(124, 92, 255, 0.35);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.explore-load-more-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #8b6aff 0%, #6f4ff0 100%);
  box-shadow: 0 8px 28px rgba(124, 92, 255, 0.5);
  border-color: rgba(192, 132, 252, 0.65);
}

.explore-load-more-btn:active {
  transform: translateY(0);
}

.explore-load-more-btn.loading {
  opacity: 0.75;
  pointer-events: none;
}

/* Sugerencia inteligente de género en Omnibox */
.smart-genre-suggestion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.14), rgba(236, 72, 153, 0.1));
  border: 1px dashed rgba(168, 85, 247, 0.5);
  border-radius: 12px;
  padding: 8px 14px;
  margin: 10px 0 14px;
  font-size: 0.82rem;
  color: #e2e8f0;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.smart-genre-prompt {
  font-weight: 600;
  color: #cbd5e1;
}

.smart-genre-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent-hover);
  border-radius: 999px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 2px 10px var(--accent-soft);
}

.smart-genre-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 14px var(--accent-soft);
}

.smart-genre-arrow {
  font-size: 0.85rem;
}

/* =========================================================
   FILTRO DE GÉNEROS EN MI BIBLIOTECA
   ========================================================= */
.library-genres-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.genre-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.genre-row-label {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-clear-filter-btn {
  background: transparent;
  border: none;
  color: #f87171;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.14s;
}

.mini-clear-filter-btn:hover {
  background: rgba(239, 68, 68, 0.14);
}

.genre-chips-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.genre-chips-scroll::-webkit-scrollbar {
  display: none;
}

.lib-genre-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.lib-genre-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.lib-genre-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-hover);
  box-shadow: 0 3px 10px var(--accent-soft);
  font-weight: 700;
}

.lib-genre-count {
  font-size: 0.68rem;
  opacity: 0.75;
}

/* =========================================================
   GÉNEROS EN TARJETA Y FICHA (ESTILO SHADEMANGA ELEVADO)
   ========================================================= */
.card-genres-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.card-genre-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.35;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.card-genre-tag:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.genre-chip.is-clickable {
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.genre-chip.is-clickable:hover {
  background: var(--accent);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 14px var(--accent-soft);
}

/* =========================================================
   MENÚ DESPLEGABLE DE FILTROS Y GÉNEROS (ESTILO DESPLEGABLE)
   ========================================================= */
.explore-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  flex-wrap: wrap;
}

.explore-filter-anchor {
  position: relative;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.explore-recs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #181d2c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  font-family: inherit;
}

.explore-recs-btn:hover {
  background: #232a3f;
  border-color: rgba(168, 85, 247, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.explore-recs-btn.active {
  background: linear-gradient(135deg, #7c5cff 0%, #9333ea 100%);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.48);
}

.explore-roulette-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(56, 189, 248, 0.18) 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.24);
  font-family: inherit;
  white-space: nowrap;
}

.explore-roulette-btn svg,
.roulette-action-btn svg {
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.explore-roulette-btn:hover svg,
.roulette-action-btn:hover svg {
  transform: rotate(35deg) scale(1.08);
}

.explore-roulette-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.36) 0%, rgba(56, 189, 248, 0.32) 100%);
  border-color: rgba(168, 85, 247, 0.78);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.32);
}

.explore-hide-watched-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #181d2c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  font-family: inherit;
}

.explore-hide-watched-btn:hover {
  background: #232a3f;
  border-color: rgba(56, 189, 248, 0.45);
  color: #fff;
  transform: translateY(-1px);
}

.explore-hide-watched-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24) 0%, rgba(14, 165, 233, 0.24) 100%);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #181d2c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  font-family: inherit;
}

.filter-dropdown-btn:hover {
  background: #232a3f;
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.filter-dropdown-btn.is-active,
.filter-dropdown-btn.has-active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(168, 85, 247, 0.22));
  border-color: #7c5cff;
  color: #fff;
  box-shadow: 0 0 16px rgba(124, 92, 255, 0.42);
}

.filter-btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  background: linear-gradient(135deg, #7c5cff 0%, #6d28d9 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.55);
}

.filter-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 460px;
  max-width: calc(100vw - 28px);
  max-height: min(85vh, 680px);
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(165deg, rgba(18, 23, 40, 0.96) 0%, rgba(10, 13, 24, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 22px 24px 20px;
  box-shadow: 0 24px 64px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fdropSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.45) transparent;
}

.filter-dropdown-panel::-webkit-scrollbar {
  width: 6px;
}

.filter-dropdown-panel::-webkit-scrollbar-track {
  background: transparent;
}

.filter-dropdown-panel::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 255, 0.35);
  border-radius: 4px;
}

.filter-dropdown-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 92, 255, 0.6);
}

@keyframes fdropSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fdrop-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fdrop-label {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #718096;
  text-transform: uppercase;
}

.fdrop-sort-pills {
  display: flex;
  background: #090c15;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 4px;
}

.fdrop-sort-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
  font-family: inherit;
}

.fdrop-sort-pill:hover {
  color: #fff;
}

.fdrop-sort-pill.active {
  background: linear-gradient(135deg, #7c5cff 0%, #6366f1 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(124, 92, 255, 0.45);
}

.fdrop-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fdrop-chip {
  background: #171b2a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  font-size: 0.79rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.fdrop-chip:hover {
  background: #20263b;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.fdrop-chip.active {
  background: #000;
  color: #fff;
  border-color: #7c5cff;
  box-shadow: inset 0 0 0 1px #7c5cff, 0 0 12px rgba(124, 92, 255, 0.38);
}

.fdrop-year-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fdrop-sublabel {
  font-size: 0.73rem;
  color: #a855f7;
  font-weight: 700;
}

.fdrop-year-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 2px;
  margin-bottom: 4px;
}

.fdrop-year-search-wrap svg {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.card-rec-pill {
  display: inline-block;
  font-size: 0.7rem;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 6px;
  padding: 2px 7px;
  margin-top: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fdrop-genres-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fdrop-mode-toggle {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.73rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease;
}

.fdrop-mode-toggle:hover {
  color: #a855f7;
  text-decoration: underline;
}

.fdrop-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 2px;
  margin-bottom: 4px;
}

.fdrop-search-wrap svg {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.fdrop-search-input {
  width: 100%;
  background: #090c15;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-pill);
  padding: 7px 14px 7px 34px;
  color: #fff;
  font-size: 0.8rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fdrop-search-input:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.26);
}

.fdrop-genres-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 4px;
}

.fdrop-genres-cloud::-webkit-scrollbar {
  width: 5px;
}

.fdrop-genres-cloud::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.fdrop-genre-pill {
  background: #171b2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
  white-space: nowrap;
}

.fdrop-genre-pill:hover {
  background: #20263b;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.fdrop-genre-pill.active {
  background: #000;
  color: #fff;
  border-color: #7c5cff;
  box-shadow: inset 0 0 0 1px #7c5cff, 0 0 10px rgba(124, 92, 255, 0.38);
}

.fdrop-actions {
  position: sticky;
  bottom: -18px;
  background: #121522;
  margin-top: auto;
  padding: 12px 0 4px;
  z-index: 30;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
}

.fdrop-apply-btn {
  background: linear-gradient(135deg, #7c5cff 0%, #6d28d9 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 26px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.42);
}

.fdrop-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.58);
}

.fdrop-clear-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.fdrop-clear-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}


@media (max-width: 640px) {
  .filter-dropdown-panel {
    width: min(420px, calc(100vw - 20px));
    max-height: 84vh;
    right: 0;
    left: auto;
    padding: 16px 16px 14px;
  }
}
.user-rating-chip {
  background: rgba(245, 158, 11, 0.22) !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  color: #fbbf24 !important;
  font-size: 0.71rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
/* --- 2. RULETA / ELIGE POR MÍ --- */
.roulette-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(236, 72, 153, 0.16) 100%);
  border: 1px solid rgba(168, 85, 247, 0.44);
  color: #f1f5f9;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.roulette-action-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.36) 0%, rgba(236, 72, 153, 0.32) 100%);
  border-color: rgba(192, 132, 252, 0.75);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(168, 85, 247, 0.32);
}

/* =========================================================
   CARRUSELES HORIZONTALES ESTILO STREAMING (SHADEMANGA STYLE)
   ========================================================= */
.explore-showcase-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 34px;
}

.explore-carousel-section {
  position: relative;
  width: 100%;
}

.carousel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.carousel-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.carousel-section-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.015em;
}

.carousel-title-icon {
  font-size: 1.15rem;
  color: var(--accent);
}

.carousel-section-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.airing-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 10px #10b981;
  animation: pulseGreenDot 1.8s ease-in-out infinite;
}

@keyframes pulseGreenDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #10b981;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.8;
    box-shadow: 0 0 16px #34d399;
  }
}

.carousel-nav-arrows {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.carousel-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0;
  line-height: 1;
  user-select: none;
}

.carousel-arrow-btn:hover:not(:disabled) {
  background: rgba(124, 92, 255, 0.25);
  border-color: rgba(124, 92, 255, 0.55);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.35);
}

.carousel-arrow-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.carousel-arrow-btn:disabled,
.carousel-arrow-btn.is-disabled {
  opacity: 0.22;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-scroll-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.35) transparent;
  contain: layout style;
}

#exploreAiringRail:empty,
#explorePopularRail:empty {
  min-height: 335px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.carousel-scroll-rail::-webkit-scrollbar {
  height: 6px;
}

.carousel-scroll-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.carousel-scroll-rail::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 92, 255, 0.45);
}

.carousel-scroll-rail > * {
  flex: 0 0 178px;
  max-width: 178px;
  scroll-snap-align: start;
}

/* Carrusel de Listas en el Perfil (elimina el espacio vacío a la derecha) */
.profile-cat-mini-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

#profileListsGrid.profile-scroll-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.35) transparent;
  contain: layout style;
}

#profileListsGrid.profile-scroll-rail > * {
  flex: 0 0 178px;
  max-width: 178px;
  scroll-snap-align: start;
}

/* Badges y metadatos estilo ShadeManga para las tarjetas */
.badge-airing-pill {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  background: rgba(6, 78, 59, 0.94);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.card-top-left-badges .badge-airing-pill {
  position: static;
  top: auto;
  left: auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-airing-pill .pill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px #34d399;
}

.airing-card-meta {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.airing-ep-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: #6ee7b7;
}

.airing-genres-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tarjetas Continuar Viendo / Leyendo */
.continue-card-meta {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.continue-progress-text {
  font-size: 0.74rem;
  color: #a78bfa;
  font-weight: 700;
}

.continue-next-text {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.continue-progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.continue-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff, #38bdf8);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* =========================================================
   VISUAL LENS — BÚSQUEDA VISUAL DE ANIME & MANGA
   ========================================================= */
.icon-lens-btn {
  flex-shrink: 0;
  margin-left: 6px;
  margin-right: 0;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 9px;
  cursor: pointer;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.icon-lens-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.3), rgba(236, 72, 153, 0.3));
  border-color: rgba(236, 72, 153, 0.55);
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.35);
}

.explore-lens-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(236, 72, 153, 0.16));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #fdf2f8;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.explore-lens-btn:hover {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.3), rgba(236, 72, 153, 0.32));
  border-color: rgba(236, 72, 153, 0.7);
  color: #fff;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .airing-live-dot,
  .hero-skel-pill,
  .hero-skel-title,
  .hero-skel-sub,
  .hero-skel-btns,
  .skeleton-poster,
  .skeleton-line,
  .spinner {
    animation: none !important;
  }

  .carousel-scroll-rail,
  #profileListsGrid.profile-scroll-rail {
    scroll-behavior: auto !important;
  }
}


/* Colecciones personalizadas, Rewatch, Avisos Hoy y PWA */
.pwa-install-btn{border-color:rgba(124,92,255,.45);background:rgba(124,92,255,.14);color:#ddd6fe}
.pwa-install-btn:hover{background:rgba(124,92,255,.26);border-color:rgba(124,92,255,.7)}
.lib-collections-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.06)}
.lib-collections-label{font-size:.76rem;font-weight:700;color:var(--text-muted);white-space:nowrap}
.lib-collections-pills{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.lib-collection-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid var(--border-soft);background:rgba(255,255,255,.04);color:var(--text-soft);font-size:.75rem;font-weight:600;cursor:pointer;font-family:inherit;transition:.15s}
.lib-collection-pill:hover{border-color:rgba(124,92,255,.45);color:#fff}
.lib-collection-pill.active{background:rgba(124,92,255,.2);border-color:rgba(124,92,255,.7);color:#f3e8ff}
.lib-col-del{font-size:.7rem;opacity:.65;padding:0 2px;line-height:1}
.lib-col-del:hover{opacity:1;color:#fca5a5}
.lib-collection-add-btn{padding:4px 9px;font-size:.74rem;border-radius:999px}
.lib-airing-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px;padding:10px 14px;border-radius:12px;background:linear-gradient(90deg,rgba(239,68,68,.14),rgba(124,92,255,.1));border:1px solid rgba(248,113,113,.32)}
.lib-airing-banner-title{font-size:.82rem;font-weight:800;color:#fecaca;white-space:nowrap}
.lib-airing-banner-pills{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.lib-airing-banner-chip{padding:4px 10px;border-radius:999px;border:1px solid rgba(248,113,113,.35);background:rgba(15,23,42,.75);color:#fee2e2;font-size:.74rem;font-weight:700;cursor:pointer;font-family:inherit}
.lib-airing-banner-chip:hover{background:rgba(239,68,68,.25);border-color:#fca5a5}
.badge-airing-today-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:rgba(153,27,27,.94);border:1px solid rgba(248,113,113,.65);color:#fee2e2;font-size:.64rem;font-weight:800;letter-spacing:.03em;white-space:nowrap}
.rewatch-chip{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;background:rgba(14,165,233,.22);border:1px solid rgba(56,189,248,.45);color:#bae6fd;font-size:.68rem;font-weight:800;white-space:nowrap}
.seasonal-effects-layer{position:fixed;inset:0;pointer-events:none;z-index:2;overflow:hidden;contain:strict}
.seasonal-effects-layer.is-paused .seasonal-p{animation-play-state:paused}
.seasonal-btn.is-active{border-color:rgba(56,189,248,.45);background:rgba(56,189,248,.12);color:#e0f2fe}
.seasonal-popover{position:fixed;top:64px;left:16px;min-width:214px;padding:6px;border-radius:12px;background:rgba(15,23,42,.97);border:1px solid rgba(255,255,255,.14);box-shadow:0 14px 36px rgba(0,0,0,.6);z-index:400;display:flex;flex-direction:column;gap:3px}
.user-menu-trigger{position:relative;display:inline-flex;align-items:center;gap:8px;padding:4px 8px 4px 4px;border-radius:999px;background:#ffffff0a;border:1px solid #ffffff1f;color:#e2e8f0;cursor:pointer;transition:.18s}
.user-menu-avatar{width:34px;height:34px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:#1e293b;border:1.5px solid #f472b68c;flex-shrink:0}
.user-menu-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.user-menu-status-dot{position:absolute;left:30px;bottom:4px;border:1.5px solid #0b0f1c}
.user-menu-chevron{color:#9b7bff;transition:transform .2s}
.donate-pill-btn{border-color:#fbbf2459;color:#fde68a}
.user-menu-popover{position:fixed;top:64px;right:16px;min-width:228px;z-index:410}
.hero-nav-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:4;width:36px;height:36px;border-radius:50%;border:none;background:#0000004d;color:#fff;font-size:1.5rem;cursor:pointer}
.hero-nav-prev{left:12px}.hero-nav-next{right:12px}
