/* ============================================================
   CineVault - Premium OTT Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary:     #06060a;
  --bg-secondary:   #0d0d14;
  --bg-tertiary:    #12121c;
  --bg-card:        #13131f;
  --bg-glass:       rgba(255,255,255,0.04);
  --bg-glass-hover: rgba(255,255,255,0.08);
  --border-glass:   rgba(255,255,255,0.08);
  --border-subtle:  rgba(255,255,255,0.05);

  --accent-primary:   #7c3aed;
  --accent-secondary: #6d28d9;
  --accent-pink:      #ec4899;
  --accent-cyan:      #06b6d4;
  --accent-gold:      #f59e0b;

  --gradient-brand: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --gradient-hero:  linear-gradient(180deg, transparent 0%, rgba(6,6,10,0.6) 50%, #06060a 100%);
  --gradient-card:  linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.95) 100%);

  --text-primary:   #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted:     #52525b;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.3);
  --shadow-pink: 0 0 30px rgba(236,72,153,0.3);

  --transition-fast:   150ms cubic-bezier(0.4,0,0.2,1);
  --transition-base:   250ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow:   400ms cubic-bezier(0.4,0,0.2,1);
  --transition-spring: 500ms cubic-bezier(0.34,1.56,0.64,1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-pink); }

/* ── Typography ─────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', sans-serif; font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Gradient Text ──────────────────────────────────────────── */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Effects ──────────────────────────────────────────── */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
}

.glass-dark {
  background: rgba(6,6,10,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
}

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
  background: rgba(6,6,10,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 var(--border-glass);
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-search-btn:hover { color: white; background: var(--bg-glass-hover); }

/* ── Hero Section ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 92vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.05);
  transition: transform 8s ease-out;
  animation: heroZoom 12s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(6,6,10,0.95) 0%,
    rgba(6,6,10,0.7) 40%,
    transparent 70%
  ),
  linear-gradient(
    180deg,
    transparent 0%,
    rgba(6,6,10,0.3) 60%,
    rgba(6,6,10,0.98) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 4rem 6rem;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-brand);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  width: fit-content;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.hero-meta .rating { color: var(--accent-gold); font-weight: 600; }

.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-slider-indicators {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.hero-indicator {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all var(--transition-base);
}

.hero-indicator.active {
  width: 56px;
  background: var(--accent-primary);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.5);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}
.btn-ghost:hover { color: white; border-color: rgba(255,255,255,0.2); background: var(--bg-glass); }

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ── Content Sections ───────────────────────────────────────── */
.section {
  padding: 3rem 0;
  position: relative;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0 4rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.3em;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.section-link {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--transition-fast);
}
.section-link:hover { gap: 0.7rem; }

/* ── Content Carousel ───────────────────────────────────────── */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.carousel {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 4rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(6,6,10,0.9);
  border: 1px solid var(--border-glass);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
}
.carousel-btn:hover { background: var(--accent-primary); transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 0.75rem; }
.carousel-btn.next { right: 0.75rem; }
.carousel-btn:disabled { opacity: 0.3; pointer-events: none; }

/* ── Content Card ───────────────────────────────────────────── */
.content-card {
  flex: 0 0 auto;
  width: 185px;
  cursor: pointer;
}

.content-card-wide {
  width: 280px;
}

.content-card-img {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-card);
}

.content-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.content-card:hover .content-card-img img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  gap: 0.6rem;
}

.content-card:hover .card-overlay { opacity: 1; }

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

.content-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.premium-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
}

.series-badge {
  background: rgba(124,58,237,0.8);
  color: white;
  border: 1px solid rgba(124,58,237,0.5);
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: white;
}

.card-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.card-info .rating { color: var(--accent-gold); }

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-play, .btn-watchlist {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.btn-play {
  background: var(--gradient-brand);
  color: white;
}
.btn-play:hover { transform: scale(1.1); }

.btn-watchlist {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-watchlist:hover { background: rgba(255,255,255,0.25); }
.btn-watchlist.added { background: var(--accent-primary); border-color: var(--accent-primary); }

.card-meta {
  margin-top: auto;
}

/* ── Content card info below image ─────────────────────────── */
.card-below-info {
  padding: 0.6rem 0.2rem 0;
}

.card-below-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.card-below-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Trending Row ────────────────────────────────────────────── */
.trending-card {
  position: relative;
  flex: 0 0 auto;
  width: 280px;
}

.trending-number {
  position: absolute;
  bottom: -10px;
  left: -15px;
  font-family: 'Outfit', sans-serif;
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 2px rgba(255,255,255,0.15);
  color: transparent;
  z-index: 2;
  pointer-events: none;
  text-shadow: none;
  letter-spacing: -4px;
}

/* ── Continue Watching Card ─────────────────────────────────── */
.cw-card {
  flex: 0 0 auto;
  width: 280px;
}

.cw-thumb {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  margin-bottom: 0.6rem;
}

.cw-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.cw-card:hover .cw-thumb img { transform: scale(1.05); }

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.cw-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.cw-card:hover .cw-play-overlay { opacity: 1; }

.cw-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

/* ── Search Overlay ─────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6,6,10,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 6rem 4rem 4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.search-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.search-input-wrap {
  position: relative;
  max-width: 700px;
  margin: 0 auto 3rem;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  color: white;
  font-size: 1.5rem;
  padding: 1.2rem 1.5rem 1.2rem 4rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus { border-color: var(--accent-primary); }
.search-input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.25rem;
}

/* ── User Menu Dropdown ─────────────────────────────────────── */
.user-menu { position: relative; }

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.user-avatar:hover { border-color: var(--accent-pink); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-card);
}

.user-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.dropdown-item:hover { background: var(--bg-glass); color: white; }

.dropdown-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 0.3rem 0;
}

/* ── Video Player Modal ─────────────────────────────────────── */
.player-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.player-modal.open {
  opacity: 1;
  pointer-events: all;
}

.player-container {
  position: relative;
  width: 90vw;
  max-width: 1280px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}
.player-close:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

/* ── Subscription Cards ─────────────────────────────────────── */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  position: relative;
  transition: all var(--transition-base);
}

.plan-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.plan-card.popular {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(236,72,153,0.08));
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  padding: 0.3rem 1.2rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin: 1rem 0;
}

.plan-price .amount {
  font-size: 3rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.plan-price .period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.plan-features { list-style: none; margin: 1.5rem 0; }
.plan-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li i { color: var(--accent-primary); width: 16px; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: #ef4444; }

.form-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at center top, rgba(124,58,237,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(236,72,153,0.1) 0%, transparent 50%),
              var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  min-width: 300px;
  max-width: 420px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

.toast.success { background: #052e16; border: 1px solid #15803d; color: #86efac; }
.toast.error   { background: #2d0808; border: 1px solid #dc2626; color: #fca5a5; }
.toast.info    { background: #0c1a3a; border: 1px solid #3b82f6; color: #93c5fd; }
.toast.warning { background: #2d1a00; border: 1px solid #d97706; color: #fcd34d; }

/* ── Skeleton Loading ─────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--bg-card) 0%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-card {
  flex: 0 0 185px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-card-img {
  aspect-ratio: 2/3;
  background: linear-gradient(90deg,
    var(--bg-card) 0%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 0.875rem;
  margin-top: 0.5rem;
  background: linear-gradient(90deg,
    var(--bg-card) 0%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* ── Genre Tags ───────────────────────────────────────────────── */
.genre-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.genre-tag:hover { transform: translateY(-2px); }

/* ── Page Transitions ─────────────────────────────────────────── */
.page-enter {
  animation: pageFadeIn 0.4s ease forwards;
}

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

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 4rem 4rem 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand { max-width: 300px; }
.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.footer-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }

.footer-heading { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 1rem; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.875rem; color: var(--text-muted); transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-socials { display: flex; gap: 0.75rem; }
.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}
.footer-social-btn:hover { color: white; background: var(--accent-primary); border-color: var(--accent-primary); }

/* ── Age Rating Badge ─────────────────────────────────────────── */
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 20px;
  border: 1px solid var(--text-secondary);
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* ── Quality Badge ─────────────────────────────────────────────── */
.quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  border: 1px solid;
}

.quality-4k  { color: #06b6d4; border-color: #06b6d4; }
.quality-fhd { color: #8b5cf6; border-color: #8b5cf6; }
.quality-hd  { color: #10b981; border-color: #10b981; }
.quality-sd  { color: #6b7280; border-color: #6b7280; }

/* ── Detail Page ─────────────────────────────────────────────── */
.detail-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(6,6,10,0.98) 0%,
    rgba(6,6,10,0.7) 50%,
    rgba(6,6,10,0.3) 100%
  ),
  linear-gradient(180deg, rgba(6,6,10,0.3) 0%, rgba(6,6,10,0.98) 100%);
}

.detail-content {
  position: relative;
  z-index: 2;
  padding: 5rem 4rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: end;
  width: 100%;
}

.detail-poster {
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  aspect-ratio: 2/3;
  object-fit: cover;
  width: 220px;
}

.detail-info { max-width: 700px; }

.detail-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border-glass); margin-bottom: 2rem; }

.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: white; }
.tab-btn.active::after { transform: scaleX(1); }

/* ── Mobile Menu ─────────────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg-secondary);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu.open { transform: translateX(0); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .section-header { padding: 0 2rem; }
  .carousel { padding: 0.5rem 2rem; }
  .hero-content { padding: 0 2rem 5rem; }
  .detail-content { padding: 5rem 2rem; grid-template-columns: 180px 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { height: 75vh; }
  .hero-content { padding: 0 1.5rem 4rem; }
  .hero-title { font-size: 2rem; }
  .hero-desc { display: none; }
  .section-header { padding: 0 1.5rem; }
  .carousel { padding: 0.5rem 1.5rem; }
  .content-card { width: 150px; }
  .content-card-wide { width: 220px; }
  .cw-card, .trending-card { width: 220px; }
  .detail-content { grid-template-columns: 1fr; padding: 4rem 1.5rem 2rem; }
  .detail-poster { width: 150px; }
  .footer { padding: 3rem 1.5rem 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .auth-card { padding: 2rem 1.5rem; }
  .search-overlay { padding: 5rem 1.5rem 2rem; }
  .player-container { width: 100%; border-radius: var(--radius-md); }
}

@media (max-width: 480px) {
  .content-card { width: 130px; }
  .carousel { gap: 0.75rem; }
  .hero-actions .btn-secondary { display: none; }
}

/* ── Utility Classes ─────────────────────────────────────────── */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-gradient { background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }

/* ── Loading Spinner ──────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-glass);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Glow Orbs Background ─────────────────────────────────────── */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.bg-orb-purple { background: #7c3aed; }
.bg-orb-pink   { background: #ec4899; }
.bg-orb-cyan   { background: #06b6d4; }
