:root {
  --bg-dark: #07090E;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-hover: rgba(28, 36, 56, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(99, 102, 241, 0.4);
  
  --primary-accent: #6366F1;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --secondary-accent: #E50914;
  --secondary-glow: rgba(229, 9, 20, 0.35);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Layout Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Navbar Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  gap: 1.5rem;
  width: 100%;
  max-width: 100vw;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
  border-radius: 12px;
  box-shadow: 0 0 20px var(--primary-glow);
  color: #fff;
}

.brand-title {
  color: var(--text-main);
}

.brand-accent {
  background: linear-gradient(135deg, #A5B4FC, var(--primary-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.nav-links::-webkit-scrollbar {
  display: none !important;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  font-weight: 700;
}

.badge-glow {
  background: var(--secondary-accent);
  box-shadow: 0 0 10px var(--secondary-glow);
}

/* Navbar Search */
.navbar-search {
  position: relative;
  width: 280px;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--primary-accent);
  box-shadow: 0 0 15px var(--primary-glow);
  background: rgba(18, 24, 38, 0.9);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.search-clear {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(13, 17, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 380px;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  z-index: 120;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.search-dropdown::-webkit-scrollbar {
  display: none !important;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.search-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.search-thumb {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: #1e293b;
}

.search-info h4 {
  font-size: 0.9rem;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.search-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.view-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.4s ease-out;
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Hero Carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #111827;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: flex-end;
  padding: 3rem;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 9, 14, 0.95) 0%, rgba(7, 9, 14, 0.4) 50%, rgba(7, 9, 14, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid var(--border-accent);
  color: #A5B4FC;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.8rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-overview {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* Section Header & Filter Controls */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.filter-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title-group h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title-group p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.text-accent {
  color: var(--primary-accent);
}

/* Filter Pills */
.filter-pills, .sub-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-glass);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow-x: auto;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.filter-pill, .sub-tab {
  padding: 0.45rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.filter-pill:hover, .sub-tab:hover {
  color: var(--text-main);
}

.filter-pill.active, .sub-tab.active {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* Media Card */
.media-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.media-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  overflow: hidden;
  background: #1e293b;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.badge-movie {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
}

.badge-tv {
  background: rgba(225, 29, 72, 0.85);
  color: #fff;
}

.card-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #FAC815;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-status-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.3rem;
  align-self: flex-start;
}

.pill-cinema {
  background: rgba(245, 158, 11, 0.25);
  color: #FBBF24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.pill-streaming {
  background: rgba(16, 185, 129, 0.25);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.pill-released {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.pill-upcoming {
  background: rgba(99, 102, 241, 0.2);
  color: #818CF8;
  border: 1px solid rgba(129, 140, 248, 0.3);
}

/* Pagination Load More */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.btn-load-more {
  padding: 0.9rem 2.2rem;
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
  background: #4F46E5;
  box-shadow: 0 0 28px var(--primary-glow);
}

.btn-secondary {
  background: rgba(225, 29, 72, 0.85);
  color: #fff;
  box-shadow: 0 0 20px var(--secondary-glow);
}

.btn-secondary:hover {
  background: #BE123C;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn.active-action {
  background: #10B981 !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
}

/* DEDICATED FULL-PAGE DETAIL VIEW */
.detail-page-view {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.breadcrumbs .crumb.active {
  color: #A5B4FC;
  font-weight: 700;
}

.detail-hero-banner {
  position: relative;
  width: 100%;
  min-height: 380px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #0f172a;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.backdrop-wrapper {
  position: absolute;
  inset: 0;
}

.detail-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.backdrop-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 9, 14, 0.98) 0%, rgba(7, 9, 14, 0.6) 50%, rgba(7, 9, 14, 0.2) 100%);
}

.detail-hero-body {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.badge-type {
  display: inline-block;
  background: var(--primary-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.detail-hero-body h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.4rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.detail-tagline {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.rating-badge {
  color: #FAC815;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Streaming Watch Providers / Cinema Availability */
.providers-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.providers-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.providers-list {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.provider-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(8px);
}

.provider-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* TV Series Stats & Season Episode Guide */
.series-stats-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pill-green {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.3);
  color: #34D399;
}

.pill-purple {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--border-accent);
  color: #A5B4FC;
}

.season-tabs {
  margin-bottom: 1.5rem;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.episode-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: var(--transition-fast);
}

.episode-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

.episode-thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #1e293b;
  flex-shrink: 0;
}

.episode-info {
  flex: 1;
  min-width: 0;
}

.episode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.episode-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.episode-badge-aired {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

.episode-badge-upcoming {
  background: rgba(225, 29, 72, 0.2);
  color: #F43F5E;
  border: 1px solid rgba(244, 63, 94, 0.3);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
}

.episode-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.episode-overview {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Detail Content Layout */
.detail-content-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.detail-side-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.detail-poster-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.genres-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.genre-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.meta-spec-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.meta-spec-box h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #A5B4FC;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.meta-val {
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 600;
}

.detail-main-col {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.detail-section {
  width: 100%;
  min-width: 0;
}

.detail-section h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}

.overview-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* In-Page Trailer Frame */
.page-trailer-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  width: 100%;
}

.page-trailer-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.cast-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  width: 100%;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.cast-scroll::-webkit-scrollbar {
  display: none !important;
}

.cast-card {
  min-width: 120px;
  width: 120px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.cast-img {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.5rem;
  background: #1e293b;
}

.cast-name {
  font-size: 0.85rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cast-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Radar Feed */
.radar-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.radar-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
  transition: var(--transition-fast);
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.radar-item:hover {
  transform: translateX(6px);
  background: var(--bg-card-hover);
}

.radar-poster {
  width: 75px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #1e293b;
  flex-shrink: 0;
}

.radar-info {
  flex: 1;
  min-width: 0;
}

.radar-badge {
  display: inline-block;
  background: var(--secondary-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.radar-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.radar-parent {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.radar-overview {
  font-size: 0.85rem;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Responsive Rules */
@media (max-width: 1024px) {
  .detail-content-layout {
    grid-template-columns: 1fr;
  }

  .detail-side-col {
    order: 2;
  }

  .detail-main-col {
    order: 1;
  }

  .detail-poster-img {
    max-width: 240px;
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .nav-btn span {
    display: none;
  }

  .navbar-search {
    width: 180px;
  }

  .main-content {
    padding: 1rem;
  }

  .episode-card {
    flex-direction: column;
  }

  .episode-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

.tv-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
  flex-wrap: wrap;
}

.tv-guide-header h3 {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.btn-sm {
  padding: 0.4rem 0.85rem !important;
  font-size: 0.8rem !important;
}

.btn-episode-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.btn-episode-watch:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-episode-watch.is-watched {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #34D399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* PENDING CARDS WITH DETAILED EPISODE LISTS */
.pending-list-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
}

.pending-card {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
  width: 100%;
}

.pending-card:hover {
  border-color: var(--border-accent);
}

.pending-poster-wrap {
  width: 140px;
  flex-shrink: 0;
  background: #0f172a;
}

.pending-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-card-body {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.pending-title-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.pending-title-link {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.pending-title-link:hover {
  color: var(--primary-accent);
}

.pending-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pending-ep-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-accent);
  color: #A5B4FC;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  width: fit-content;
}

.pending-episodes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.pending-ep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
}

.pending-ep-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.pending-ep-air {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* VIEW CALENDAR FULL SCREEN VIEWPORT FIT */
#view-calendar.view-section {
  height: calc(100vh - 100px);
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: visible;
  box-sizing: border-box;
}

.calendar-header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.2rem 0 0.5rem;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  flex-shrink: 0;
}

.cal-nav-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cal-nav-btn {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.cal-current-month-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cal-current-month-display span {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cal-current-month-display h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

.calendar-full-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  overflow: visible;
}

.calendar-grid-container {
  display: flex;
  flex-direction: column;
  background: rgba(13, 17, 26, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: visible;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  min-height: 0;
}

.cal-week-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  flex-shrink: 0;
}

.cal-week-head {
  padding: 0.6rem 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-days-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(var(--cal-rows, 5), 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.cal-day-cell {
  position: relative;
  z-index: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background 0.2s ease;
  height: 100%;
  min-height: 0;
  background: rgba(18, 24, 38, 0.3);
  overflow: visible;
  box-sizing: border-box;
}

.cal-day-cell:nth-child(7n) {
  border-right: none;
}

.cal-day-cell.other-month {
  background: rgba(7, 9, 14, 0.4);
  opacity: 0.3;
}

.cal-day-cell:hover {
  background: rgba(99, 102, 241, 0.08);
  z-index: 15;
}

.cal-day-cell.today-cell {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-accent);
}

.cal-day-num {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cal-day-cell.today-cell .cal-day-num {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.cal-day-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: visible;
}

.cal-item-card {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(28, 36, 56, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.cal-item-card:hover {
  background: rgba(24, 32, 50, 0.98);
  border-color: var(--primary-accent);
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85), 0 0 20px var(--primary-glow);
  z-index: 50;
}

.cal-item-poster {
  width: 42px;
  height: 63px;
  object-fit: cover;
  border-radius: 6px;
  background: #1e293b;
  flex-shrink: 0;
}

.cal-item-info {
  flex: 1;
  min-width: 0;
}

.cal-item-title {
  font-size: 0.88rem;
  font-family: var(--font-heading);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
}

.cal-item-type {
  font-size: 0.72rem;
  color: #A5B4FC;
  font-weight: 600;
  margin-top: 0.15rem;
}

.calendar-agenda-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(13, 17, 26, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  min-width: 0;
  height: fit-content;
}

.agenda-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 650px;
  overflow-y: auto;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.agenda-list::-webkit-scrollbar {
  display: none !important;
}

.agenda-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.agenda-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateX(4px);
}

.agenda-poster {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #1e293b;
  flex-shrink: 0;
}

.agenda-info {
  flex: 1;
  min-width: 0;
}

.agenda-date-badge {
  font-size: 0.72rem;
  color: #A5B4FC;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.agenda-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agenda-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

@media (max-width: 1024px) {
  .calendar-full-layout {
    grid-template-columns: 1fr;
  }
}

/* CUSTOM RIGHT-CLICK CONTEXT MENU */
.context-menu {
  position: absolute;
  z-index: 99999;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85), 0 0 25px var(--primary-glow);
  padding: 0.4rem;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: ctxFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ctxFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.context-menu-item:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
}

.context-menu-item.active-action {
  background: rgba(99, 102, 241, 0.35);
  color: #A5B4FC;
}

.context-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.2rem 0;
}

/* ============================================================
   PARA TI — AI RECOMMENDATION ENGINE STYLES
   ============================================================ */

/* Nav btn AI highlight */
.nav-btn-ai {
  position: relative;
}
.nav-btn-ai.active,
.nav-btn-ai:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.25) 0%, rgba(168,85,247,0.25) 100%) !important;
  border-color: rgba(168,85,247,0.5) !important;
}
.badge-ai {
  background: linear-gradient(135deg, #6366F1, #A855F7) !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.05em;
  font-weight: 700;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0); }
}

/* Section header */
.foryou-header {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(168,85,247,0.05) 100%);
  border-bottom: 1px solid rgba(99,102,241,0.15);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(168,85,247,0.25));
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #C084FC;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.ai-chip svg { width: 12px; height: 12px; }

.foryou-hero-title h2 { font-size: 2rem; font-weight: 800; }
.foryou-hero-title p { color: var(--text-muted); margin-top: 0.4rem; }

.btn-refresh-recs {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.18));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #F1F5F9;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
  cursor: pointer;
}
.btn-refresh-recs:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.35));
  border-color: rgba(168, 85, 247, 0.7);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.3);
}
.btn-refresh-recs:active {
  transform: translateY(0);
}
.btn-refresh-recs i, .btn-refresh-recs svg {
  width: 16px;
  height: 16px;
}

.btn-genre-filter {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-genre-filter:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #F87171;
}

.genre-exclusion-panel {
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
.genre-exclusion-panel.hidden {
  display: none;
}
.genre-exclusion-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: #F87171;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.genre-exclusion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.genre-exclusion-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: 100px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  user-select: none;
}
.genre-exclusion-chip:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #F87171;
  background: rgba(239, 68, 68, 0.1);
}
.genre-exclusion-chip.excluded {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.35), rgba(185, 28, 28, 0.35));
  border-color: rgba(239, 68, 68, 0.8);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

.foryou-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.foryou-stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 90px;
  transition: var(--transition-normal);
}
.foryou-stat-card:hover {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-2px);
}
.foryou-stat-icon { color: var(--primary-accent); margin-bottom: 0.3rem; }
.foryou-stat-icon svg { width: 18px; height: 18px; }
.foryou-stat-val { font-size: 1.8rem; font-weight: 800; color: var(--text-main); }
.foryou-stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Genre profile bars */
.genre-profile-section {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.genre-profile-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.profile-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: rgba(99,102,241,0.2);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  color: var(--primary-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.genre-profile-bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.genre-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.genre-bar-label {
  width: 120px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}
.genre-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.genre-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.genre-bar-pct {
  width: 40px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Recommendation sections */
.rec-section {
  padding: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rec-section:last-child { border-bottom: none; }
.rec-section-header {
  margin-bottom: 1.25rem;
}
.rec-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}
.rec-section-reason {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.rec-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
  cursor: pointer;
}
.rec-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.rec-poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}
.rec-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.rec-card:hover .rec-poster-img { transform: scale(1.05); }
.rec-tmdb-rating {
  position: absolute;
  bottom: 0.4rem;
  left: 0.4rem;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  color: #FBBF24;
}
.rec-score-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: linear-gradient(135deg, #6366F1, #A855F7);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  color: white;
  letter-spacing: 0.02em;
}
.rec-your-rating {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(251,191,36,0.9);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  color: #111;
}
.rec-info {
  padding: 0.6rem 0.75rem;
}
.rec-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

/* AI loading animation */
.foryou-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1rem;
}
.foryou-loading h3 { color: var(--text-main); font-size: 1.1rem; }
.foryou-loading p { color: var(--text-muted); font-size: 0.88rem; }
.ai-loading-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}
.ai-orb {
  position: absolute;
  inset: 20px;
  background: radial-gradient(circle, #6366F1, #A855F7);
  border-radius: 50%;
  animation: orb-pulse 1.5s ease-in-out infinite;
}
.ai-orb-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(168, 85, 247, 0.5);
  border-radius: 50%;
  animation: ring-spin 2s linear infinite;
}
@keyframes orb-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}
@keyframes ring-spin {
  from { transform: rotate(0deg) scale(1.1); }
  to { transform: rotate(360deg) scale(1.1); }
}

/* Onboarding screen */
.foryou-onboarding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}
.foryou-onboarding.hidden { display: none; }
.onboarding-icon { font-size: 3rem; color: var(--primary-accent); margin-bottom: 0.5rem; }
.onboarding-icon svg { width: 60px; height: 60px; }
.foryou-onboarding h3 { font-size: 1.4rem; font-weight: 700; }
.foryou-onboarding p { color: var(--text-muted); line-height: 1.6; }
.onboarding-tip {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.9rem !important;
}

/* ============================================================
   STAR RATING WIDGET
   ============================================================ */
.user-rating-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(251,191,36,0.06);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.rating-widget-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.stars-row {
  display: flex;
  gap: 2px;
}
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: rgba(255,255,255,0.2);
  padding: 0 1px;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.star-btn:hover,
.star-btn.active {
  color: #FBBF24;
  text-shadow: 0 0 8px rgba(251,191,36,0.5);
}
.star-btn:hover { transform: scale(1.2); }
.rating-current-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FBBF24;
  min-width: 32px;
}
.btn-clear-rating {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-clear-rating:hover { border-color: var(--secondary-accent); color: var(--secondary-accent); }
.btn-clear-rating.hidden { display: none; }

/* ============================================================
   DISLIKE BUTTON
   ============================================================ */
.btn-dislike {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-dislike:hover {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.4);
  color: #F87171;
}
.btn-dislike.active-dislike {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.5);
  color: #F87171;
}
.btn-dislike svg { width: 16px; height: 16px; }

/* ============================================================
   CONTEXT MENU UPGRADES
   ============================================================ */
.context-menu {
  min-width: 240px;
}
.ctx-danger {
  color: #F87171 !important;
}
.ctx-danger:hover {
  background: rgba(239,68,68,0.15) !important;
}
.ctx-rating-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
}
.ctx-rating-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.ctx-stars {
  display: flex;
  gap: 1px;
}
.ctx-star {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: color 0.1s, transform 0.1s;
  user-select: none;
  line-height: 1;
}
.ctx-star:hover,
.ctx-star.active {
  color: #FBBF24;
}
.ctx-star:hover { transform: scale(1.15); }

/* ============================================================
   DISCOVER QUICK MARK SEARCH TOOL (Buscador rápido en Estrenos)
   ============================================================ */

.discover-quick-search {
  position: relative;
  margin: 1.5rem 2rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
}

.quick-search-header {
  margin-bottom: 1rem;
}

.quick-search-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #10B981;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.quick-search-badge svg { width: 12px; height: 12px; }

.quick-search-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.quick-search-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.quick-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--primary-accent);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

#discover-quick-search-input {
  width: 100%;
  padding: 0.85rem 2.8rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

#discover-quick-search-input:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 1);
}

.discover-search-results-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 100;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.discover-search-results-box.hidden { display: none; }

.quick-search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.quick-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  gap: 1rem;
  transition: var(--transition-fast);
}

.quick-search-row:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.quick-search-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.quick-search-thumb {
  width: 38px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.quick-search-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.quick-search-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-search-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quick-search-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-qs-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn-qs-action svg { width: 13px; height: 13px; }

.btn-qs-action:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--text-main);
}

.btn-qs-action.active-watched {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #10B981 !important;
}

.btn-qs-action.active-fav {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #F87171 !important;
}

.qs-rating-select {
  padding: 0.35rem 0.5rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-sm);
  color: #FBBF24;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.qs-rating-select.has-rating {
  background: rgba(251, 191, 36, 0.2);
  border-color: #FBBF24;
}

/* Card Status Badges in Media Grid */
.card-status-badge {
  position: absolute;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5;
  width: max-content;
  max-width: 90%;
  height: auto;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card-watched-badge {
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.card-fav-badge {
  top: 2.2rem;
  left: 0.4rem;
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.card-super-fav-badge {
  top: 4.0rem;
  left: 0.4rem;
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #8b5cf6 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}

.btn-super-favorite {
  background: linear-gradient(135deg, #ec4899 0%, #d946ef 50%, #8b5cf6 100%);
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
  transition: all 0.25s ease;
}

.btn-super-favorite:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.6);
  filter: brightness(1.1);
}

.btn-super-favorite.active-action {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.8);
}

.card-user-rating-badge {
  top: auto;
  bottom: 0.4rem;
  right: 0.4rem;
  background: rgba(251, 191, 36, 0.95);
  color: #111;
}


/* Catalog Search Box in Estrenos */
.catalog-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 280px;
  flex: 1;
  max-width: 400px;
}

.catalog-search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

#catalog-search-input {
  width: 100%;
  padding: 0.55rem 2.4rem 0.55rem 2.4rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

#catalog-search-input:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 1);
}


/* Floating Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.5);
  color: #F8FAFC;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 10000;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.feather-spin {
  animation: iconSpin 0.75s linear infinite;
}
