/* 
  CineWave — Modern Cinema Design System & Glassmorphism Styles
*/

:root {
  --bg-main: #090c15;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 36, 56, 0.9);
  --bg-glass: rgba(14, 19, 32, 0.82);
  --bg-input: rgba(10, 14, 24, 0.7);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);

  --gold-4k: #f59e0b;
  --gold-4k-glow: rgba(245, 158, 11, 0.4);
  --blue-1080p: #3b82f6;
  --blue-1080p-glow: rgba(59, 130, 246, 0.4);
  --emerald-seeds: #10b981;
  --rose-like: #f43f5e;
  --violet-brother: #a855f7;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.4);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-glow);
  --transition-smooth: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #252e42;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* -------------------------------------------------------------------------- */
/* Header & Navigation */
/* -------------------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), #ec4899);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
  fill: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-4k);
}

/* Search Box */
.search-wrapper {
  flex: 1;
  max-width: 540px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  transition: var(--transition-smooth);
}

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

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  margin-right: 10px;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-sub);
}

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.search-clear-btn svg {
  width: 16px;
  height: 16px;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

/* Header Actions & Profile */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-switch-dropdown {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-glow);
}

.chevron-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #111726;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 110;
}

.profile-menu.open {
  display: flex;
}

.profile-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.profile-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-option.active {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-glow);
}

.opt-avatar {
  font-size: 1.2rem;
}

.opt-text {
  display: flex;
  flex-direction: column;
}

.opt-text strong {
  font-size: 0.85rem;
}

.opt-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Sync Indicator */
.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  background: var(--emerald-seeds);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-seeds);
  animation: pulse-sync 2s infinite ease-in-out;
}

@keyframes pulse-sync {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* -------------------------------------------------------------------------- */
/* Sub-Navigation (Filters & Sorting) */
/* -------------------------------------------------------------------------- */
.sub-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(10, 14, 24, 0.6);
}

.sub-nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

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

.pill-tag {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.watchlist-tab .tab-heart {
  font-size: 0.9rem;
}

.badge-count {
  background: var(--rose-like);
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Filter & Sort Controls */
.sub-nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.select-container select {
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.select-container select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(26, 34, 52, 0.95);
}

.select-container select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* -------------------------------------------------------------------------- */
/* Main Content & Spotlight Hero */
/* -------------------------------------------------------------------------- */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.spotlight-section {
  margin-bottom: 32px;
}

.spotlight-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
  padding: 40px;
  background: linear-gradient(135deg, #182032 0%, #0d121f 100%);
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.spotlight-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  opacity: 0.25;
  filter: blur(8px);
  transform: scale(1.05);
  transition: opacity 0.5s ease;
}

.spotlight-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 12, 21, 0.95) 0%, rgba(9, 12, 21, 0.6) 60%, rgba(9, 12, 21, 0.3) 100%);
}

.spotlight-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.spotlight-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-spotlight {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-4k);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-edge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.spotlight-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  color: #fff;
}

.spotlight-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.spotlight-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4338ca);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

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

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/* Section Title & Grid */
/* -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-external-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-external-source:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.movie-count-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Movies Dynamic Grid */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px;
}

/* -------------------------------------------------------------------------- */
/* Movie Card Component */
/* -------------------------------------------------------------------------- */
.movie-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.movie-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-hover);
}

/* Poster Box */
.card-poster-wrap {
  position: relative;
  width: 100%;
  padding-top: 145%; /* 2:3 cinematic aspect ratio */
  background: #141b2a;
  overflow: hidden;
  cursor: pointer;
}

.card-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

/* Fallback Poster Art */
.card-poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  padding: 16px;
  text-align: center;
}

.card-poster-fallback .fb-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.card-poster-fallback .fb-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Resolution Badges Over Poster */
.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
  pointer-events: none;
}

.res-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.res-4k {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 900;
}

.res-1080p {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

/* Like / Save Button on Card */
.card-like-btn {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.card-like-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.card-like-btn:hover {
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.85);
  color: var(--rose-like);
}

.card-like-btn.liked {
  background: var(--rose-like);
  color: #fff;
  border-color: var(--rose-like);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}

/* Hover Quick-Action Overlay */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 21, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.movie-card:hover .card-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.btn-trailer-hover {
  background: #ff0000;
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
  transition: transform 0.2s ease;
  text-decoration: none;
}

.btn-trailer-hover:hover {
  transform: scale(1.08);
}

.btn-dl-hover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s ease;
  text-decoration: none;
}

.btn-dl-hover:hover {
  transform: scale(1.08);
  color: #fff;
}

.btn-source-hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-source-hover:hover {
  background: rgba(59, 130, 246, 0.45);
  color: #fff;
  transform: scale(1.05);
}

.btn-info-hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

/* Card Content / Details */
.card-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-year {
  color: #cbd5e1;
  font-weight: 600;
}

/* Quality Switcher Pills */
.quality-pills-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.quality-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quality-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.quality-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: #a5b4fc;
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: auto;
}

.card-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.card-dl-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.4));
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.card-dl-btn:hover {
  background: #10b981;
  color: #000;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.card-source-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.card-source-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
  border-color: #3b82f6;
}

.seeds-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--emerald-seeds);
  font-weight: 600;
}

.size-stat {
  color: var(--text-sub);
}

/* Shared Like Status Indicator */
.mutual-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
}

/* -------------------------------------------------------------------------- */
/* Infinite Scroll Loader & Sentinel */
/* -------------------------------------------------------------------------- */
.scroll-sentinel {
  padding: 40px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Skeleton Loading State */
.skeleton-card {
  height: 340px;
  background: linear-gradient(90deg, #121826 25%, #1c2438 50%, #121826 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  max-width: 440px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.empty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* -------------------------------------------------------------------------- */
/* Modal Dialog & Quick View */
/* -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  position: relative;
  background: #111726;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 32px;
}

.modal-movie-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
}

.modal-poster-side img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

.modal-info-side {
  display: flex;
  flex-direction: column;
}

.modal-movie-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.modal-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-actions-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn-yt-large {
  background: #ff0000;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.btn-yt-large:hover {
  transform: translateY(-2px);
  background: #e60000;
}

/* Releases Table inside Modal */
.modal-releases-section {
  margin-top: 16px;
}

.modal-releases-heading {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #cbd5e1;
}

.releases-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  gap: 12px;
}

.release-row-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  word-break: break-all;
}

.release-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-magnet {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--accent-primary);
  color: #c7d2fe;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-magnet:hover {
  background: var(--accent-primary);
  color: #fff;
}

.btn-magnet-direct {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
  border-color: rgba(16, 185, 129, 0.6);
  color: #a7f3d0;
}

.btn-magnet-direct:hover {
  background: #10b981;
  color: #000;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-source-link {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-source-link:hover {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
  border-color: #3b82f6;
}

/* -------------------------------------------------------------------------- */
/* Toast Notifications */
/* -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: #1e293b;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-slide-in 0.3s ease;
}

@keyframes toast-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* -------------------------------------------------------------------------- */
/* Responsive Media Queries */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .modal-movie-layout {
    grid-template-columns: 1fr;
  }
  .modal-poster-side {
    max-width: 200px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
  }
  .search-wrapper {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .spotlight-card {
    padding: 24px;
  }
  .spotlight-title {
    font-size: 1.6rem;
  }
  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
}
