/* ===== Global Styles & CSS Variables ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --background: #080f15;
  --topbar-height: 72px;
  --sidebar-collapsed: 60px;
  --sidebar-expanded: 276px;
  --surface: rgba(17, 24, 39, 0.72);
  --surface-hover: rgba(24, 34, 48, 0.86);
  --surface-soft: rgba(22, 31, 44, 0.56);
  --surface-muted: rgba(10, 16, 24, 0.92);
  
  --primary-color: #38bdf8;
  --primary-dark: #0284c7;
  --primary-glow: rgba(56, 189, 248, 0.22);
  
  --accent-color: #fb7185;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #14b8a6 52%, #fb7185 100%);
  --accent-glow: rgba(251, 113, 133, 0.24);
  
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  
  --warning-color: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.15);
  
  --danger-color: #f43f5e;
  --danger-glow: rgba(244, 63, 94, 0.15);
  
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #cbd5e1;
  --white: #ffffff;
  
  --border-color: rgba(148, 163, 184, 0.14);
  --border-hover: rgba(148, 163, 184, 0.28);
  
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.48);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  background-image:
    linear-gradient(135deg, rgba(20, 184, 166, 0.09), transparent 34%),
    linear-gradient(315deg, rgba(251, 113, 133, 0.08), transparent 30%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  border: 2px solid var(--background);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.4);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: 1.45rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

h2 {
  font-size: 1.55rem;
  margin-bottom: 1.25rem;
  border-left: 0;
  padding-left: 0;
}

h2::before {
  display: none;
}

h2 {
  position: relative;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.15rem;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.22);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 3px;
}

/* ===== Header & Glassmorphism Navigation ===== */
/* Topbar (logo + account) stays fixed at top */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0 1rem;
  z-index: 10006; /* keep topbar above everything for the hamburger */
  background: rgba(8, 15, 21, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
}

/* Compact account icon and panel */
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
}

.account-btn span {
  opacity: 0;
  width: 0;
  transition: opacity 0.18s ease;
}

.account-panel {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 4.75rem;
  background: rgba(8, 15, 21, 0.98);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 1;
  display: none;
  margin: 0;
  backdrop-filter: blur(16px);
}

.account-panel.show {
  display: block;
  animation: fadeIn 0.12s ease-out;
}

/* Sidebar layout and behavior */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-collapsed);
  background: linear-gradient(180deg, rgba(8, 15, 21, 0.98), rgba(8, 15, 21, 0.94));
  border-right: 1px solid var(--border-color);
  z-index: 10005; /* above content and overlay */
  transition: width 0.22s ease;
  overflow: hidden;
  will-change: width, transform;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
}

.sidebar.expanded {
  width: var(--sidebar-expanded);
}

.sidebar .sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: calc(var(--topbar-height) + 0.75rem);
  padding-bottom: 1rem;
  gap: 0.5rem;
}

.sidebar .sidebar-account {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.5rem;
}

.sidebar .page-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.5rem;
  width: 100%;
}

.sidebar .page-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--text-dark);
  min-height: 44px;
  overflow: hidden;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.94rem;
  font-weight: 700;
  box-shadow: none;
  width: 100%;
}

.sidebar .page-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--border-color);
  transform: none;
  text-shadow: none;
}

.sidebar .page-nav a.active {
  color: var(--white);
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: inset 3px 0 0 var(--primary-color);
}

.sidebar .page-nav a i,
.sidebar .sidebar-search .icon-btn i,
.account-btn i {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.sidebar .sidebar-search {
  padding: 0.5rem;
}

.sidebar .sidebar-search .icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  overflow: hidden;
  white-space: nowrap;
}

.sidebar .sidebar-search .icon-btn span {
  opacity: 0;
  width: 0;
  transition: opacity 0.18s ease;
}

.sidebar .search-controls {
  flex-direction: column;
  max-width: none;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius);
}

.sidebar #search-button {
  min-width: 0;
  width: 100%;
}


/* Collapsed sidebar: hide labels and center icons */
.sidebar:not(.expanded) {
  width: var(--sidebar-collapsed);
}
.sidebar:not(.expanded) .page-nav a {
  width: 100%;
  justify-content: center;
  gap: 0;
  padding: 0.6rem 0;
}
.sidebar:not(.expanded) .page-nav a i {
  margin-right: 0;
  display: inline-flex;
}
.sidebar:not(.expanded) .page-nav a .nav-label {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  width: 0;
  height: 0;
}

.sidebar:not(.expanded) .sidebar-search {
  display: flex;
  justify-content: center;
}

.sidebar:not(.expanded) .search-controls,
.sidebar:not(.expanded) .account-panel {
  display: none !important;
}

.sidebar.expanded .account-btn {
  width: 100%;
  border-radius: var(--radius-sm);
  justify-content: flex-start;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar.expanded .account-btn span {
  opacity: 1;
  width: auto;
}

.sidebar.expanded .sidebar-search .icon-btn {
  width: 100%;
  border-radius: var(--radius-sm);
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0 0.9rem;
}

.sidebar.expanded .sidebar-search .icon-btn span {
  opacity: 1;
  width: auto;
}

/* hamburger button */
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-right: 0;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 0;
  border-radius: 999px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

body.sidebar-open .hamburger span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.sidebar-open .hamburger span:nth-child(2) {
  opacity: 0;
}

body.sidebar-open .hamburger span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* content shift when sidebar is open */
main,
header {
  margin-left: var(--sidebar-collapsed);
  width: calc(100% - var(--sidebar-collapsed));
  transition: margin-left 0.22s ease, width 0.22s ease;
}

body.sidebar-open main,
body.sidebar-open header {
  margin-left: var(--sidebar-expanded);
  width: calc(100% - var(--sidebar-expanded));
}

/* overlay shown when sidebar expanded (captures clicks) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  z-index: 10004; /* below sidebar but above content */
  pointer-events: none;
}

body.sidebar-open .overlay {
  display: none;
}

@media (max-width: 768px) {
  body.sidebar-open .overlay {
    display: block;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(2px);
  }
}

/* make main/header lower stacking so sidebar overlays them reliably */
header, main {
  position: relative;
  z-index: 1;
}

/* hide-on-scroll behavior for header nav/search */
header {
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease;
}

header.nav-hidden nav.page-nav,
header.nav-hidden #search-controls {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
}

/* ensure header spacing remains but collapse nav visually */
header.nav-hidden {
  --nav-hidden-space: 0.5rem;
}

/* small-screen adjustments for account panel */
@media (max-width: 768px) {
  .sidebar .account-panel {
    right: 0.75rem;
    left: 0.75rem;
    top: auto;
    bottom: 4.75rem;
    max-width: none;
  }
}

/* Header holds nav and other controls; pushed below topbar */
header {
  background: transparent;
  padding: 1.25rem 2rem 0;
  margin-top: var(--topbar-height);
  display: block;
  border-bottom: 1px solid transparent;
}

header h1 {
  margin-bottom: 1.25rem;
}

/* Page Nav Links */
nav.page-nav {
  display: flex;
  gap: 0.75rem;
  margin: 0 auto 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: max-content;
}

nav.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background-color: var(--surface-soft);
  color: var(--text-dark);
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.page-nav a i {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

nav.page-nav a:hover {
  background-color: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

nav.page-nav a:hover i {
  transform: scale(1.15);
}

nav.page-nav a.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(20, 184, 166, 0.18));
  color: var(--white);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.14);
}

nav.page-nav a.active:hover {
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* Auth Section Panel */

  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

#auth-message:not(:empty) {
  display: block;
}

.welcome-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 200px;
}

/* Welcome banner shown in the scrollable content area */
#welcome-banner {
  display: block;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(20, 184, 166, 0.07)),
    rgba(8, 15, 21, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--text);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin: 0 auto 1.75rem;
  max-width: 1200px;
  box-shadow: var(--shadow);
  font-weight: 600;
}

/* Sub Navigation for Watchlist & Social Link (toggled dynamically) */
header > nav:last-child {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

header > nav:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

header > nav:last-child a:hover {
  color: var(--accent-color);
  background: rgba(168, 85, 247, 0.08);
}

/* Position account / auth area in the top-right of the header on larger screens */
#auth-section {
  position: absolute;
  top: 1.25rem;
  right: 2rem;
  z-index: 110;
  width: auto;
  max-width: 420px;
}
/* ===== Search Controls & Dynamic Panels ===== */
.search-controls {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 600px;
  margin-top: 1.25rem;
  background: rgba(8, 15, 21, 0.78);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

#search-input {
  flex: 1;
  min-width: 0;
}

#search-button {
  min-width: 170px;
}

/* Tonight's Choice Selection Banner */
#pick-random-section {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow);
}

#pick-random-button {
  background: var(--accent-gradient);
  border: none;
  box-shadow: 0 4px 15px var(--accent-glow);
}

#pick-random-button:hover {
  box-shadow: 0 6px 20px var(--accent-glow);
}

#tonight-choice-card {
  background: var(--surface-muted);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-top: 1.25rem;
  display: none;
  animation: fadeIn 0.4s ease-out;
}

#tonight-choice-card h2 {
  font-size: 1.35rem;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
  border-left: none;
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#tonight-choice-content img {
  border: 1px solid var(--border-color);
}

/* Status badge design */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.status-badge.status-completed {
  background-color: var(--success-glow);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.status-watching {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-badge.status-planning_to_watch {
  background-color: rgba(148, 163, 184, 0.1);
  color: var(--text-dark);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.status-on_hold {
  background-color: var(--warning-glow);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.status-dropped {
  background-color: var(--danger-glow);
  color: var(--danger-color);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ===== Form inputs, select lists & text fields ===== */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  padding: 0.75rem 1rem;
  background-color: rgba(4, 9, 14, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  background-color: rgba(4, 9, 14, 0.95);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
}

select option {
  background-color: #0f172a;
  color: var(--text);
}

/* ===== Buttons ===== */
button,
input[type="button"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--primary-dark);
  color: var(--white);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

button i,
input[type="button"] i,
input[type="submit"] i {
  width: 18px;
  height: 18px;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background-color: var(--primary-color);
  color: #03131f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

button:active,
input[type="button"]:active,
input[type="submit"]:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button.secondary {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: none;
}

button.danger {
  background-color: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

button.danger:hover {
  background-color: var(--danger-color);
  color: var(--white);
  box-shadow: 0 4px 15px var(--danger-glow);
}

button.success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

button.success:hover {
  background-color: var(--success-color);
  color: var(--white);
  box-shadow: 0 4px 15px var(--success-glow);
}

/* ===== Progress Bars & Loading States ===== */
[role="progressbar"] {
  display: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin: 1.5rem 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

[role="progressbar"] > div {
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px var(--accent-color);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Shimmer Loading Animation (Skeleton Loader) ===== */
@keyframes shimmer-pulse {
  0% {
    background-position: -200% 0;
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
  100% {
    background-position: 200% 0;
    opacity: 0.85;
  }
}

.shimmer-pulse {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer-pulse 1.8s infinite ease-in-out;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-top: 1.5rem;
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.carousel-track > .skeleton-card {
  scroll-snap-align: start;
  flex: 0 0 310px;
  max-width: 310px;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  margin-bottom: 1rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer-pulse 1.8s infinite ease-in-out;
}

.skeleton-title {
  height: 1.25rem;
  width: 75%;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer-pulse 1.8s infinite ease-in-out;
}

.skeleton-meta {
  height: 0.85rem;
  width: 45%;
  border-radius: 4px;
  margin-bottom: 1rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer-pulse 1.8s infinite ease-in-out;
}

.skeleton-text {
  height: 3rem;
  width: 100%;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer-pulse 1.8s infinite ease-in-out;
}

.skeleton-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.skeleton-btn {
  height: 2.25rem;
  flex: 1;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 37%,
    rgba(255, 255, 255, 0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer-pulse 1.8s infinite ease-in-out;
}

#watchlist-completion-progress {
  background: var(--surface);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

#watchlist-completion-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

/* Override the inline styling for progress bar wrapper */
#watchlist-completion-progress > div:nth-child(2) {
  width: 100%;
  height: 8px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 999px !important;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

#watchlist-completion-bar {
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 12px var(--accent-color);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#watchlist-completion-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: progress-shimmer 2s infinite linear;
}

@keyframes progress-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

#watchlist-completion-text {
  color: var(--success-color);
  font-size: 1.1rem;
}

.card-mobile-info {
  display: none;
}

/* ===== Movie Cards Layout ===== */
.movie-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.08), var(--shadow-lg);
  background: var(--surface-hover);
}

.movie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover::before {
  opacity: 1;
}

.movie-card h3,
.movie-card h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.movie-card:hover img {
  transform: scale(1.02);
}

.movie-card p {
  display: none;
}

.movie-card .meta-row,
.movie-card .short-meta,
.movie-card .card-actions {
  display: none !important;
}

.movie-card button.add-to-watchlist-btn {
  width: auto; /* keep inline with other action buttons */
  margin-top: auto;
}

/* ===== Watchlist Categories Styling ===== */
.watchlist-category {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem 0.5rem; /* compact vertical padding, wide horizontal space for track */
  margin: 0; /* spacing handled by parent gap */
  box-shadow: var(--shadow);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.watchlist-category h3 {
  color: var(--primary-color);
  padding: 0.5rem 1.25rem;
  margin: 0 0 0.75rem 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Watchlist items actions bar */
.watchlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.watchlist-status-control {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
  min-width: 180px;
}

.watchlist-status-control label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.watchlist-status-control select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.85rem;
}

/* Layout Grid templates */
#search-results-wrapper,
#recommendations-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
  animation: fadeIn 0.5s ease-out;
}

/* Watchlist wrapper: stack category rows vertically; rows span full width */
#watchlist-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 1rem;
  animation: fadeIn 0.45s ease-out;
  width: 100%;
}

/* Make injected items (movie-card) stretch to fill grid cells */
#watchlist-wrapper .movie-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Empty state for watchlist */
#watchlist-wrapper.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 20%);
  border: 1px dashed rgba(148, 163, 184, 0.06);
  border-radius: var(--radius);
  color: var(--text-muted);
}

@media (max-width: 480px) {
  #watchlist-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
  }
}

/* Modal for full movie details */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  z-index: 20000;
  padding: 1.25rem;
  padding: 1.25rem;
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 920px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(8, 15, 21, 0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text);
  animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

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

.modal-card .modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.modal-card img {
  width: 160px;
  height: auto;
  border-radius: 12px;
  flex: 0 0 160px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.8);
}

.modal-card .modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  justify-content: flex-end;
}

.movie-card .short-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.movie-card p {
  margin-bottom: 0.5rem;
}

.movie-card .card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .modal-card img {
    display: none;
  }
}


/* Watchlist category grid and card polish (rows should span full width)
   Each category is a vertical block containing a heading and a horizontal track */
.watchlist-category {
  background: linear-gradient(180deg, rgba(255,255,255,0.012), transparent 20%);
  padding: 0.5rem 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.02);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.watchlist-category > h3 {
  margin: 0;
  padding: 0.5rem 1.25rem;
  font-size: 1.05rem;
  color: var(--primary-color);
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.02em;
}

.watchlist-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
  justify-content: flex-start;
}

/* Ensure cards grow/shrink and wrap horizontally */
.watchlist-grid > .movie-card {
  flex: 1 1 310px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

/* avoid forcing overly tall cards which create vertical gaps */
.movie-card {
  min-height: 0;
}

/* Carousel (Netflix-style) rows */
.carousel-row {
  position: relative;
  margin: 0.5rem 0 1.25rem 0;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 1.25rem 1rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  flex-wrap: nowrap; /* prefer horizontal scrolling; on very small widths items can wrap */
}

.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 999px; }

.carousel-track > .movie-card { scroll-snap-align: start; flex: 0 0 310px; max-width: 310px; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,0.6);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  z-index: 10;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.carousel-arrow.left { left: 6px; }
.carousel-arrow.right { right: 6px; }

.carousel-arrow.hidden { opacity: 0; pointer-events: none; transform: translateY(-50%) scale(0.9); }


@media (max-width: 720px) {
  .carousel-track > .movie-card { flex: 0 0 220px; max-width: 220px; }
  .carousel-arrow { width: 36px; height: 36px; }
}

/* Filter buttons */
#watchlist-filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

#watchlist-filters button {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

#watchlist-filters button.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(20,184,166,0.08));
  color: var(--white);
  border-color: rgba(56,189,248,0.25);
  box-shadow: 0 8px 18px rgba(56,189,248,0.06);
}

.movie-card {
  min-height: auto;
  padding: 0.95rem;
  cursor: pointer;
}

.movie-card h4 {
  margin: 0.5rem 0 0.5rem 0;
  font-size: 1.01rem;
}

.movie-card img {
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(2,6,23,0.5);
}

.watchlist-wrapper.empty p {
  color: var(--text-muted);
  font-weight: 600;
}

/* Modal close button positioned */
.modal-card #modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  z-index: 10;
}

.modal-card #modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
  transform: rotate(90deg);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.modal-card #modal-close i {
  width: 18px;
  height: 18px;
}

/* Slightly smaller meta badge on cards */
.movie-card .status-badge {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
}

/* Rich Meta Badges inside Modal */
#modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 8px;
  align-items: center;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Media Type variations */
.meta-badge.badge-movie {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.2);
}

.meta-badge.badge-tv {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.2);
}

/* Watch Status variations */
.meta-badge.status-watching {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.25);
}

.meta-badge.status-planning_to_watch,
.meta-badge.status-planning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

.meta-badge.status-completed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}

.meta-badge.status-on_hold {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

.meta-badge.status-dropped {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border-color: rgba(107, 114, 128, 0.25);
}

/* TV tracking badge */
.meta-badge.badge-tracking {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.08);
}

.meta-badge i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Genre badges and rating */
.meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.genre-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.genre-badge {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text-muted);
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 999px;
  font-weight: 700;
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.rating .rating-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: conic-gradient(#f59e0b var(--rating-percent, 0%), rgba(255, 255, 255, 0.08) 0%);
  display: inline-block;
  position: relative;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}
.rating .rating-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 50%;
}
.rating .rating-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffd873;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

/* Provider logos */
.providers {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-left: 0.25rem;
}
.providers img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.providers img:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Categories cards wrapper */
.watchlist-category {
  display: block;
}

.watchlist-category .movie-card {
  margin-bottom: 1rem;
}

.watchlist-category .movie-card:last-child {
  margin-bottom: 0;
}

/* Compact card button styles to ensure fit */
.card-actions button {
  font-size: 0.88rem;
  padding: 0.4rem 0.65rem;
}
.card-actions .secondary {
  background: rgba(255,255,255,0.04);
}

/* ===== Upcoming Releases Banner ===== */
#upcoming-releases-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.7) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#upcoming-releases-banner h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#upcoming-releases-list p {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  color: #fde047;
  font-size: 0.95rem;
}

#upcoming-releases-list p strong {
  color: var(--white);
}

/* ===== Main Container Layout ===== */
main {
  max-width: none;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding: 1.75rem 1.5rem 4rem;
  animation: fadeIn 0.5s ease-out;
}

/* Allow watchlist-section to use full width while other sections remain centered */
main > *,
header > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Make the watchlist section span full width so category rows can be full-bleed */
#watchlist-section,
#watchlist-section > * {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Home page layout overrides */
.home main > * {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.home #recommendations-wrapper {
  display: grid;
  width: 100%;
}

.home .welcome-message {
  background: transparent;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}

/* Topbar adjustments to accommodate search on home page */
.home .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home .topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home .topbar .search-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(255,255,255,0.03);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
}

/* Hero banner (backdrop) */
.hero-banner {
  position: relative;
  width: 100%;
  height: 56vh;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background-size: cover;
  background-position: center center;
  color: var(--white);
  overflow: hidden;
  transition: background-image 0.8s ease-in-out;
}

.hero-banner .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,6,23,0.86) 18%, rgba(2,6,23,0.45) 40%, rgba(2,6,23,0.15) 65%, transparent 85%);
  pointer-events: none;
}

.hero-banner .hero-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1.75rem;
  max-width: 1100px;
}

.hero-banner #hero-title {
  font-size: 2.05rem;
  font-weight: 900;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.hero-banner #hero-overview {
  max-width: 70ch;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.hero-banner .hero-actions {
  display: flex;
  gap: 0.75rem;
}

.hero-banner .primary {
  background: linear-gradient(90deg, rgba(56,189,248,1), rgba(20,184,166,1));
  color: #02121a;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 800;
}

.hero-banner .secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
}

.hero-banner .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}

.hero-banner .hero-badge i {
  width: 14px;
  height: 14px;
}

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

.hero-banner .hero-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-banner .hero-indicator:hover {
  background: rgba(255, 255, 255, 0.55);
}

.hero-banner .hero-indicator.active {
  background: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 10px var(--primary-glow);
  width: 26px;
  border-radius: 999px;
}

/* Video modal styles */
.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  z-index: 30000;
  padding: 1rem;
}
.video-modal.show { display: flex; }
.video-modal-card {
  width: 100%;
  max-width: 1000px;
  background: transparent;
  border-radius: 10px;
  position: relative;
}
.video-modal .video-frame-wrap {
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  position: relative;
}
.video-modal iframe#video-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal .secondary {
  position: absolute;
  top: -42px;
  right: 0;
}

section {
  margin-bottom: 3rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

section:first-of-type {
  padding-top: 1.25rem;
}

section > h2 {
  margin-top: 0;
}

/* ===== Social & Friends Panel Layouts ===== */
.social-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

.social-dashboard {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

.social-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.social-main-column {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.social-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.social-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.social-card .card-header h3 {
  margin: 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.count-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary-color);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
  margin-left: 0.4rem;
}

.count-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Friends list styles */
.friends-list-container {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.friend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  transition: transform 0.18s, border-color 0.18s;
}

.friend-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.friend-info .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

.friend-details {
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.friend-username {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Friend Requests */
.pending-requests-container {
  max-height: 240px;
  overflow-y: auto;
}

.pending-request-item {
  background: var(--surface-soft);
  border-left: 4px solid var(--warning-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeIn 0.25s ease-out;
}

.pending-request-item .request-user {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.pending-request-item .button-wrapper {
  display: flex;
  gap: 0.5rem;
}

.pending-request-item button {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

/* Search results */
.search-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-input-row input {
  flex: 1;
}

.search-results-container {
  max-height: 200px;
  overflow-y: auto;
}

.user-search-item {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.2s ease-out;
}

.user-search-item .username-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.user-search-item button {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Groups Styles */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

.group-card {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.group-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.group-card.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
  background: rgba(56, 189, 248, 0.04);
}

.group-card-header h4 {
  font-size: 1rem;
  margin: 0 0 0.25rem 0;
  color: var(--text);
  word-break: break-word;
}

.group-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.group-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.group-card-actions button {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: auto;
  width: fit-content;
}

.badge.owner {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge.member {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Create / Join Drawer */
.group-actions-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.action-box {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.action-divider {
  width: 1px;
  background: var(--border-color);
  align-self: stretch;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
}

/* Live Chat styles */
.chat-card {
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-container {
  display: flex;
  flex-direction: column;
  background: var(--surface-muted);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 16, 24, 0.5);
  flex-wrap: wrap;
  gap: 1rem;
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-header-info h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.group-id-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.group-id-wrapper code {
  background: rgba(0,0,0,0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--primary-color);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

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

.chat-header-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Members drawer */
.members-drawer {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.members-drawer h4 {
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.members-drawer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.member-tag {
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Chat Messages */
.chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(6, 10, 16, 0.45);
}

/* Chat bubbles list */
.chat-bubble {
  max-width: 75%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease-out;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
}

.chat-bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  color: var(--background);
  border-bottom-right-radius: 2px;
}

.chat-bubble.other {
  align-self: flex-start;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  color: var(--text);
  border-bottom-left-radius: 2px;
}

.bubble-sender {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.chat-bubble.me .bubble-sender {
  color: rgba(8, 15, 21, 0.85);
}

.chat-bubble.other .bubble-sender {
  color: var(--primary-color);
}

.bubble-text {
  font-size: 0.9rem;
  word-break: break-word;
}

.bubble-time {
  font-size: 0.65rem;
  align-self: flex-end;
  margin-top: 0.25rem;
}

.chat-bubble.me .bubble-time {
  color: rgba(8, 15, 21, 0.65);
}

.chat-bubble.other .bubble-time {
  color: var(--text-muted);
}

/* Input Row */
.chat-input-wrapper {
  display: flex;
  padding: 0.75rem 1.25rem;
  background: rgba(10, 16, 24, 0.8);
  border-top: 1px solid var(--border-color);
  gap: 0.75rem;
  align-items: center;
}

.chat-input-wrapper textarea {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  min-height: 38px;
  max-height: 100px;
  transition: border-color 0.2s;
}

.chat-input-wrapper textarea:focus {
  border-color: var(--primary-color);
}

.chat-input-wrapper .send-btn {
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--background);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-input-wrapper .send-btn:hover {
  background: white;
  transform: scale(1.05);
}

.chat-input-wrapper .send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Empty State */
.chat-empty-state {
  padding: 4.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(8, 12, 20, 0.2);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  gap: 1.25rem;
  margin: 1.5rem;
}

.chat-empty-state .empty-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  opacity: 0.55;
  height: 60px;
  display: flex;
  align-items: center;
}

.chat-empty-state h3 {
  font-size: 1.3rem;
  color: var(--text);
  margin: 0;
}

.chat-empty-state p {
  color: var(--text-muted);
  max-width: 420px;
  font-size: 0.9rem;
  margin: 0;
}

.chat-empty-state button {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.empty-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 1.5rem 0;
  width: 100%;
}

}

/* ===== Interactive Animations & Utilities ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.rounded { border-radius: var(--radius-sm); }
.shadow { box-shadow: var(--shadow); }

/* ===== Responsive Media Queries ===== */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  h2 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
  }

  main {
    padding: 1.25rem 1rem 3rem;
  }

  main,
  header,
  body.sidebar-open main,
  body.sidebar-open header {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar {
    width: var(--sidebar-expanded) !important;
    transform: translateX(-100%);
    transition: transform 0.22s ease !important;
  }

  .sidebar.expanded {
    transform: translateX(0) !important;
  }

  /* Compact cards on mobile */
  .movie-card {
    padding: 0.5rem !important;
    cursor: pointer;
  }

  .movie-card .meta-row,
  .movie-card .short-meta,
  .movie-card p,
  .movie-card .card-actions,
  .movie-card .show-tracking-row {
    display: none !important;
  }

  .movie-card img {
    margin-bottom: 0.5rem !important;
    height: auto !important;
  }

  .movie-card h3,
  .movie-card h4 {
    font-size: 0.88rem !important;
    margin-bottom: 0.25rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.25 !important;
    height: 2.5rem;
    overflow: hidden;
  }

  .card-mobile-info {
    display: block;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: auto;
  }

  /* Resize cards inside search results and recommendations */
  #search-results-wrapper,
  #recommendations-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 0.75rem !important;
  }

  /* Resize cards inside carousels (watchlist tracks, Release Radar) */
  .carousel-track > .movie-card {
    flex: 0 0 130px !important;
    max-width: 130px !important;
  }

  /* Resize cards inside watchlist-grid */
  .watchlist-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 0.75rem !important;
    padding: 0 0.5rem !important;
  }

  .watchlist-grid > .movie-card {
    max-width: none !important;
    flex: none !important;
    width: 100% !important;
  }

  #auth-section {
    position: static;
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
  }

  #signed-out-actions,
  #signed-in-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  #signed-out-actions button,
  #signed-in-actions button {
    width: 100%;
  }

  nav.page-nav {
    flex-direction: column;
  }

  nav.page-nav {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    width: auto;
    margin: 0;
    padding: 0.5rem;
    background: transparent;
    box-shadow: none;
  }

  nav.page-nav a {
    flex: 0 0 auto;
    justify-content: flex-start;
    font-size: 0.94rem;
  }

  .sidebar:not(.expanded) .page-nav a {
    width: 44px;
    justify-content: center;
    gap: 0;
    padding: 0.6rem 0;
  }

  .search-controls {
    flex-direction: column;
    max-width: 100%;
  }

  .search-controls button {
    width: 100%;
  }

  #search-results-wrapper,
  #recommendations-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
  }

  .movie-card {
    padding: 1.25rem;
  }

  .watchlist-category {
    padding: 1.25rem;
  }

  .watchlist-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .watchlist-status-control {
    width: 100%;
  }

  .watchlist-actions button {
    width: 100%;
  }

  #tonight-choice-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #tonight-choice-content img {
    max-width: 140px;
  }

  .social-dashboard {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .group-actions-row {
    flex-direction: column;
    gap: 1.25rem;
  }

  .action-divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
  }

  .chat-messages {
    height: 320px;
  }
}

@media (max-width: 480px) {
  nav.page-nav a {
    flex: 0 0 auto;
  }
}

/* ===== Account Dropdown ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.dropdown-btn i.chevron-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.dropdown-btn.active i.chevron-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease-out;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.dropdown-item.danger {
  color: #fda4af;
}

.dropdown-item.danger:hover {
  background-color: rgba(244, 63, 94, 0.1);
  color: #fda4af;
}

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

/* ===== Toast Notification System ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.toast-success {
  border-left: 4px solid var(--success-color);
}
.toast-success .toast-icon {
  background: var(--success-glow);
  color: var(--success-color);
}

.toast-error {
  border-left: 4px solid var(--danger-color);
}
.toast-error .toast-icon {
  background: var(--danger-glow);
  color: var(--danger-color);
}

.toast-warning {
  border-left: 4px solid var(--warning-color);
}
.toast-warning .toast-icon {
  background: var(--warning-glow);
  color: var(--warning-color);
}

.toast-info {
  border-left: 4px solid var(--primary-color);
}
.toast-info .toast-icon {
  background: var(--primary-glow);
  color: var(--primary-color);
}

/* ===== TV Show Episode Tracking Section ===== */
.modal-episodes-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.episodes-progress-container {
  margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, 0.35);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.episodes-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

#episodes-progress-label {
  color: var(--text-muted);
}

#episodes-progress-percent {
  color: #14b8a6;
}

.episodes-progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.episodes-progress-bar-fg {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #14b8a6 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.4);
}

.seasons-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.season-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.season-accordion:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.season-header:hover {
  background-color: var(--surface-hover);
}

.season-header .season-title-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.season-header .season-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: var(--text);
}

.season-header .season-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.season-header .season-toggle-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.season-accordion.expanded .season-toggle-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.season-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
  border-top: 1px solid transparent;
  background: var(--surface-soft);
}

.season-accordion.expanded .season-content {
  max-height: 400px;
  overflow-y: auto;
  opacity: 1;
  border-top: 1px solid var(--border-color);
}

/* ===== TV Show Card Progress Tracking Styles ===== */
.show-tracking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 8px 0;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

.show-tracking-row:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.show-tracking-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.show-tracking-val-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.show-tracking-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.show-tracking-item > span:first-child {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.show-tracking-item .season-val,
.show-tracking-item .episode-val {
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  color: var(--text);
  font-size: 0.9rem;
}

.track-btn {
  padding: 2px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.track-btn:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
  transform: scale(1.05);
}

.track-btn:active {
  transform: scale(0.95);
}

/* ===== Release Radar Countdown Badge ===== */
.radar-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  align-self: flex-start;
  font-family: 'Outfit', sans-serif;
  transition: all 0.3s ease;
}

.radar-countdown-badge.airs-today {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
  animation: pulse-badge 2s infinite;
}

.radar-countdown-badge.upcoming {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary-color);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.radar-countdown-badge.released {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

@keyframes pulse-badge {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Season content inner lists */
.episodes-list {
  display: flex;
  flex-direction: column;
}

.episode-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
  transition: background-color 0.2s ease, background-color 0.25s ease;
}

.episode-item:last-child {
  border-bottom: none;
}

.episode-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.episode-item.watched {
  background-color: rgba(16, 185, 129, 0.04);
}

.episode-item.watched .episode-title {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.75;
}

.episode-item.watched .episode-overview {
  opacity: 0.6;
}

.episode-checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  margin-top: 2px;
}

/* Customized modern checkbox */
.episode-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.episode-checkbox:hover {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.episode-checkbox:checked {
  background-color: #10b981;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.episode-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.episode-info {
  flex: 1;
}

.episode-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.episode-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

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

.episode-overview {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* ===== Next Episodes Countdown Section ===== */
.next-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.countdown-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.countdown-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.countdown-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  opacity: 0.85;
}

.countdown-show-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown-episode-info {
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 600;
}

.countdown-days-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary-color);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  width: fit-content;
}

.countdown-days-badge.airs-today {
  background: var(--success-glow);
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.3);
}

.countdown-air-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Watch Statistics Styling ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stats-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-color) 0%, var(--primary-dark, var(--primary-color)) 100%);
  opacity: 0.85;
}

.stats-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.stats-icon i {
  width: 24px;
  height: 24px;
}

.stats-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stats-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stats-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-chart-container {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.status-bar-wrapper {
  display: flex;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.status-bar-segment {
  height: 100%;
  transition: width 0.4s ease;
  position: relative;
}

/* Status colors and gradients */
.status-planning {
  background: linear-gradient(90deg, #64748b, #475569);
}
.status-watching {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}
.status-completed {
  background: linear-gradient(90deg, #10b981, #059669);
}
.status-on_hold {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.status-dropped {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.status-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ===== Collection / Saga Suggestion Modal ===== */
.collection-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.76);
  z-index: 31000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.collection-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.collection-modal-content {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(56, 189, 248, 0.03);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.collection-modal.show .collection-modal-content {
  transform: scale(1) translateY(0);
}

.collection-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.collection-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.collection-modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary-color);
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.collection-modal-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.collection-movies-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  padding-right: 0.5rem;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.collection-movies-list::-webkit-scrollbar {
  width: 6px;
}
.collection-movies-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

.collection-movie-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.22s ease;
  overflow: hidden;
}

.collection-movie-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.collection-movie-label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  width: 100%;
}

.collection-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.collection-checkbox:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-glow);
}

.collection-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.collection-movie-poster {
  width: 44px;
  height: 66px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.collection-movie-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.collection-movie-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-movie-overview {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.collection-modal-actions button {
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collection-modal-actions .primary {
  background: linear-gradient(90deg, rgba(56,189,248,1), rgba(20,184,166,1));
  color: #02121a;
  border: none;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.collection-modal-actions .primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.3);
}

.collection-modal-actions .secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border-color);
}

.collection-modal-actions .secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Genre Breakdown & Stats Grid ===== */
.stats-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stats-chart-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.genre-pie-chart {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

/* Custom Cutout to make it a Doughnut Chart */
.genre-pie-chart::after {
  content: '';
  position: absolute;
  inset: 32px;
  background: #090f1d; /* Matches var(--surface) or the background */
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 6px rgba(255, 255, 255, 0.05);
}

.genre-legend {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.genre-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.genre-legend-item:last-child {
  border-bottom: none;
}

.genre-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

/* Movie countdown card layout overrides */
.movie-countdown-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}
.movie-countdown-card img {
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.movie-countdown-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
}
/* Quick Watches Button styling refinements */
#watchlist-filters button.quick-watches-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(251, 191, 36, 0.04);
  border-color: rgba(251, 191, 36, 0.15);
  color: var(--text-muted);
  transition: all 0.22s ease;
}

#watchlist-filters button.quick-watches-btn:hover {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--text);
}

#watchlist-filters button.quick-watches-btn.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 18px rgba(251, 191, 36, 0.08);
}

/* ===== PREMIUM COSMETIC ENHANCEMENTS ===== */

/* 1. Glassmorphism for Core Layout Elements */
.topbar {
  background: rgba(8, 15, 21, 0.6) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar {
  background: rgba(8, 15, 21, 0.5) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-card, .video-modal-card {
  background: rgba(10, 16, 24, 0.8) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6) !important;
}

/* 2. Enhanced Glassmorphic Cards & Hover Lift Glows */
.movie-card, .countdown-card, .stats-card, .stats-chart-card {
  background: rgba(17, 24, 39, 0.45) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.movie-card:hover, .countdown-card:hover, .stats-card:hover {
  transform: translateY(-5px) scale(1.01) !important;
  border-color: rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 12px 40px 0 rgba(56, 189, 248, 0.15) !important;
}

/* 3. Micro-Animations */
@keyframes badgePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.airs-today {
  animation: badgePulse 2s infinite;
}

@keyframes zapPulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

#watchlist-filters button.quick-watches-btn.active {
  animation: zapPulse 2.5s infinite;
}

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

main {
  animation: fadeInUp 0.45s ease-out forwards;
}

/* 4. Pick for Me Button styling */
#watchlist-filters button.watchlist-pick-random-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(139, 92, 246, 0.04);
  border-color: rgba(139, 92, 246, 0.15);
  color: var(--text-muted);
  transition: all 0.22s ease;
  margin-left: auto;
  font-weight: 700;
}

#watchlist-filters button.watchlist-pick-random-btn:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.35);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

#watchlist-filters button.watchlist-pick-random-btn:active {
  transform: scale(0.96);
}

@media (max-width: 768px) {
  #watchlist-filters button.watchlist-pick-random-btn {
    margin-left: 0;
  }
}

/* ===== TV Show Card Progress Tracking Styles ===== */
.show-card-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.85rem 0;
  padding: 0.85rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.show-card-progress:hover {
  border-color: var(--border-hover);
}

.show-card-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.show-card-progress-label {
  font-weight: 600;
  color: var(--text-muted);
}

.show-card-progress-badge {
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary-color);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.show-card-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.show-card-progress-bar-fg {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: 999px;
  width: 0%;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.show-card-progress-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.15rem;
  gap: 0.5rem;
}

.show-card-progress-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.show-card-progress-buttons {
  display: flex;
  gap: 0.35rem;
}

.show-card-progress-btn {
  padding: 3px 6px;
  font-size: 0.72rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.show-card-progress-btn i {
  width: 12px;
  height: 12px;
}

.show-card-progress-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--text);
}

.show-card-progress-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ===== Mobile & Touch View Optimizations ===== */
@media (max-width: 768px) {
  /* Polish the watchlist progress tracking controls for narrow screens */
  .show-tracking-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .show-tracking-label {
    text-align: center;
    font-size: 0.8rem;
  }
  .show-tracking-val-container {
    width: 100% !important;
    justify-content: space-around !important;
    gap: 8px !important;
  }
  
  /* Make details and video modals fully scrollable and responsive */
  .modal-overlay {
    align-items: flex-start !important;
    overflow-y: auto !important;
    padding: 1rem !important;
  }
  .modal-card {
    margin: 1.5rem auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .modal-card .modal-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  .modal-card .modal-header > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }
  #modal-meta {
    justify-content: center !important;
  }
  #modal-genres {
    justify-content: center !important;
  }
  #modal-providers {
    justify-content: center !important;
  }
  .modal-card img {
    display: block !important;
    width: 130px !important;
    height: auto !important;
    margin: 0 auto !important;
    flex: 0 0 auto !important;
  }
  .modal-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }
  .modal-actions button {
    width: 100% !important;
  }
  
  /* Adjust episodes items inside the accordion to be compact and mobile-friendly */
  .episode-item {
    padding: 0.75rem 0.5rem !important;
    gap: 0.75rem !important;
  }
  .episode-title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
  }
  .episode-title {
    font-size: 0.88rem !important;
  }
  .episode-meta {
    font-size: 0.75rem !important;
  }
  .episode-overview {
    font-size: 0.8rem !important;
  }

  /* Hide carousel arrow buttons on mobile/touch screens in favor of swipe gestures */
  .carousel-arrow {
    display: none !important;
  }

  /* Mobile search dropdown polish for topbar */
  .home .topbar .search-controls {
    position: absolute !important;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: none !important;
    margin-top: 0 !important;
    background: rgba(8, 15, 21, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem 0.8rem !important;
    z-index: 10000 !important;
    border-radius: 8px !important;
  }
  .home .topbar .search-controls button {
    width: auto !important; /* keep inline search button */
  }
}

/* ===== Premium Live Search Suggestions Styles ===== */
.home .topbar .search-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  position: relative; /* essential for absolute suggestions list positioning */
  margin-top: 0; /* override general .search-controls margin-top */
  width: auto; /* override general .search-controls width */
  box-shadow: none; /* override general .search-controls shadow */
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 21000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.suggestion-item {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  cursor: pointer;
  align-items: center;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  background-color: rgba(255, 255, 255, 0.08);
}

.suggestion-item.highlighted {
  border-left: 3px solid var(--primary-color);
}

.suggestion-item img {
  width: 42px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.suggestion-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  min-width: 0;
}

.suggestion-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.suggestion-overview {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  text-align: left;
}

/* ==========================================================================
   Monthly Wrapped Feature Styles
   ========================================================================== */

/* 1. Home Promo Banner */
.wrapped-banner {
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 50%, #1d4ed8 100%);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 36px rgba(124, 58, 237, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  animation: wrappedBannerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wrapped-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.wrapped-banner-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.wrapped-banner-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: wrappedPulseIcon 2s infinite ease-in-out;
}

.wrapped-banner-text {
  flex: 1;
  min-width: 220px;
}

.wrapped-banner-text h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  font-family: 'Outfit', sans-serif;
}

.wrapped-banner-text p {
  margin: 4px 0 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

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

.wrapped-banner-actions button.primary {
  background: #ffffff;
  color: #7c3aed;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, background-color 0.2s;
  cursor: pointer;
}

.wrapped-banner-actions button.primary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.wrapped-banner-actions button.secondary-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.wrapped-banner-actions button.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* 2. Stats Section Card Control overrides */
.wrapped-stats-card .stats-icon {
  background: rgba(168, 85, 247, 0.12) !important;
  color: #a855f7 !important;
}

.wrapped-select {
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s, background-color 0.2s;
}

.wrapped-select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08) !important;
}

.wrapped-select option {
  background: #0f172a;
  color: var(--text);
}

/* 3. Modal Overlay & Card Container */
.wrapped-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.wrapped-modal-overlay.show {
  opacity: 1;
}

.wrapped-modal-card {
  width: 90%;
  max-width: 420px;
  height: 82vh;
  max-height: 740px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0.02) 100%), #090d16;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(124, 58, 237, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wrapped-modal-overlay.show .wrapped-modal-card {
  transform: scale(1) translateY(0);
}

/* 4. Story Progress Indicators */
.wrapped-story-progress {
  display: flex;
  gap: 5px;
  padding: 18px 20px 8px 20px;
  z-index: 102;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.wrapped-story-progress .progress-bar-segment {
  height: 3px;
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.wrapped-story-progress .progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* 5. Control Buttons Overlay */
.wrapped-modal-actions-overlay {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 30px 20px 8px 20px;
  z-index: 102;
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  pointer-events: none;
}

.wrapped-modal-actions-overlay button.icon-btn {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.wrapped-modal-actions-overlay button.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.08);
}

.wrapped-modal-actions-overlay button.icon-btn i {
  width: 16px;
  height: 16px;
}

/* 6. Slides & Background Themes */
.wrapped-slides-container {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
}

.wrapped-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 85px 32px 50px 32px;
  opacity: 0;
  transform: scale(0.96);
  visibility: hidden;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out, visibility 0.5s;
  z-index: 1;
  pointer-events: none;
}

.wrapped-slide.active {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  z-index: 10;
  pointer-events: auto;
}

/* Theme gradients styled like Spotify Wrapped - Liquid Backdrops */
.slide-theme-1 {
  background: radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.4) 0%, transparent 60%), radial-gradient(circle at 10% 70%, rgba(59, 130, 246, 0.3) 0%, transparent 70%), #0c0f18;
}
.slide-theme-2 {
  background: radial-gradient(circle at 70% 80%, rgba(236, 72, 153, 0.35) 0%, transparent 60%), radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.4) 0%, transparent 75%), #090a10;
}
.slide-theme-3 {
  background: radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.3) 0%, transparent 65%), radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.35) 0%, transparent 70%), #050b12;
}
.slide-theme-4 {
  background: radial-gradient(circle at 85% 15%, rgba(244, 63, 94, 0.35) 0%, transparent 60%), radial-gradient(circle at 20% 70%, rgba(225, 29, 72, 0.25) 0%, transparent 70%), #0b070f;
}
.slide-theme-5 {
  background: radial-gradient(circle at 90% 75%, rgba(219, 39, 119, 0.35) 0%, transparent 60%), radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.35) 0%, transparent 70%), #090511;
}
.slide-theme-6 {
  background: radial-gradient(circle at 50% -20%, rgba(124, 58, 237, 0.25) 0%, transparent 70%), #070913;
}

/* 7. Navigation Tap overlays */
.wrapped-nav-overlay {
  position: absolute;
  inset: 80px 0 0 0;
  display: flex;
  z-index: 50;
}

.wrapped-nav-zone {
  height: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wrapped-nav-zone#wrapped-nav-prev {
  width: 25%;
}

.wrapped-nav-zone#wrapped-nav-next {
  width: 75%;
}

/* 8. Slide Components & Layouts */
.slide-content-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.slide-content-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 1.5rem 0;
}

.slide-content-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Typography animations */
.slide-title-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #a855f7;
  margin-bottom: 8px;
  animation: slideTextUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-heading {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0;
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
  animation: slideTextUp 0.6s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 10px;
  line-height: 1.45;
  max-width: 280px;
  animation: slideTextUp 0.6s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Big Metrics card */
.wrapped-huge-stat {
  font-size: 4.8rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 30%, rgba(255, 255, 255, 0.4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: wrappedPopIn 0.8s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.wrapped-huge-unit {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  letter-spacing: 0.05em;
  animation: slideTextUp 0.6s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Grid of posters */
.slide-posters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 280px;
  margin-top: 10px;
}

.slide-poster-wrapper {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) rotate(-3deg);
  opacity: 0;
  animation: slidePosterEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.slide-poster-wrapper:nth-child(1) { animation-delay: 0.2s; }
.slide-poster-wrapper:nth-child(2) { animation-delay: 0.35s; transform: scale(0.9) rotate(3deg); }
.slide-poster-wrapper:nth-child(3) { animation-delay: 0.5s; transform: scale(0.9) rotate(-2deg); }
.slide-poster-wrapper:nth-child(4) { animation-delay: 0.65s; transform: scale(0.9) rotate(2deg); }

.slide-poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.slide-poster-wrapper img:hover {
  transform: scale(1.08);
}

.slide-poster-title-tooltip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Top Show Card styling */
.slide-show-highlight-card {
  width: 100%;
  max-width: 260px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  animation: wrappedPopIn 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.slide-show-poster-wrap {
  width: 100px;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.slide-show-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-show-meta-wrap {
  text-align: center;
}

.slide-show-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.slide-show-stats {
  font-size: 0.82rem;
  color: #a855f7;
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Genre Pills styling */
.slide-genre-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin-top: 15px;
}

.slide-genre-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 14px;
  transform: translateX(-15px);
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: slideGenreRowEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-genre-row:nth-child(1) { animation-delay: 0.2s; background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); }
.slide-genre-row:nth-child(2) { animation-delay: 0.32s; }
.slide-genre-row:nth-child(3) { animation-delay: 0.44s; }
.slide-genre-row:nth-child(4) { animation-delay: 0.56s; }

.slide-genre-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-genre-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.slide-genre-row:nth-child(1) .slide-genre-bullet { background: #a855f7; }
.slide-genre-row:nth-child(2) .slide-genre-bullet { background: #3b82f6; }
.slide-genre-row:nth-child(3) .slide-genre-bullet { background: #10b981; }
.slide-genre-row:nth-child(4) .slide-genre-bullet { background: #f59e0b; }

.slide-genre-percentage {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* 9. Final Summary Card */
.wrapped-summary-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.55), 0 0 30px rgba(124, 58, 237, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  animation: wrappedPopIn 0.8s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.wrapped-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.wrapped-summary-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.wrapped-summary-header span {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wrapped-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.wrapped-summary-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.wrapped-summary-item.full-width {
  grid-column: span 2;
}

.wrapped-summary-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.wrapped-summary-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
  font-weight: 600;
}

.wrapped-summary-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

.wrapped-summary-actions button {
  flex: 1;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.2s, background-color 0.2s;
}

.wrapped-summary-actions button.wrapped-replay-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.wrapped-summary-actions button.wrapped-replay-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.wrapped-summary-actions button.wrapped-share-btn {
  background: #a855f7;
  border: none;
  color: #fff;
}

.wrapped-summary-actions button.wrapped-share-btn:hover {
  background: #9333ea;
  transform: translateY(-2px);
}

/* Animations Keyframes */
@keyframes wrappedBannerEntrance {
  0% {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wrappedPulseIcon {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
    transform: scale(1.05);
  }
}

@keyframes slideTextUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wrappedPopIn {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slidePosterEntrance {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(0.9) rotate(var(--rot, -3deg)) translateY(0);
  }
}

@keyframes slideGenreRowEntrance {
  0% {
    opacity: 0;
    transform: translateX(-15px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 10. Mobile Responsive Overrides */
@media (max-width: 480px) {
  .wrapped-banner {
    padding: 1rem;
    border-radius: 12px;
  }
  .wrapped-banner-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  .wrapped-banner-actions {
    width: 100%;
    margin-top: 10px;
    justify-content: flex-end;
  }
  .wrapped-banner-actions button.primary {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
  }

  .wrapped-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
  }
  
  .wrapped-story-progress {
    padding: 14px 14px 8px 14px;
  }
  .wrapped-modal-actions-overlay {
    padding: 24px 14px 8px 14px;
  }
  .wrapped-slide {
    padding: 70px 24px 36px 24px;
  }
}

/* ==========================================================================
   Global Liquid Glass Theme Override
   ========================================================================== */
.topbar, 
#sidebar, 
.modal-card, 
.video-modal-card,
.movie-card, 
.countdown-card, 
.stats-card, 
.stats-chart-card,
.social-card, 
.group-card, 
.chat-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
}

/* Hover glow effects for cards */
.movie-card:hover, 
.countdown-card:hover, 
.stats-card:hover, 
.social-card:hover, 
.group-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 20px 48px rgba(56, 189, 248, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}

/* Subtle adjustment for inputs to look glassy */
input[type="text"], 
input[type="email"], 
input[type="password"], 
select, 
textarea {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s !important;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
select:focus, 
textarea:focus {
  border-color: var(--primary-color) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}


