/* ==========================================================================
   CineVerse — style.css
   Design language: cinematic marquee. Near-black stage lit by a single
   crimson-gold spotlight; condensed display type for headlines (the
   "marquee" voice) paired with a clean, quiet body face; a repeating
   film-sprocket motif is the page's one signature device, used sparingly
   as a divider under section titles and around the hero.
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  /* Palette */
  --color-bg: #090b10;
  --color-bg-alt: #0d1017;
  --color-surface: #131722;
  --color-surface-2: #1a1f2c;
  --color-surface-3: #212739;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);

  --color-text: #f4f5fa;
  --color-text-dim: #9aa1b8;
  --color-text-faint: #626a80;

  --color-accent: #ff2e50;
  --color-accent-2: #c1043a;
  --color-accent-soft: rgba(255, 46, 80, 0.14);
  --color-gold: #ffcf52;
  --color-gold-soft: rgba(255, 207, 82, 0.14);

  --gradient-accent: linear-gradient(135deg, #ff4d63 0%, #c1043a 100%);
  --gradient-fade-bottom: linear-gradient(180deg, rgba(9, 11, 16, 0) 0%, var(--color-bg) 100%);
  --gradient-fade-top: linear-gradient(0deg, rgba(9, 11, 16, 0) 0%, var(--color-bg) 100%);

  /* Typography */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Radii & shadow */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);

  /* Layout */
  --container-w: 1320px;
  --navbar-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-med: 320ms;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button, input, select { font-family: inherit; color: inherit; }

button { cursor: pointer; border: none; background: none; }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.is-hidden { display: none !important; }

.dot { color: var(--color-text-faint); }

/* Signature film-sprocket divider, used under key section titles */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: 0.03em;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 74px;
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--color-accent) 0 8px,
    transparent 8px 14px
  );
  border-radius: 3px;
  opacity: 0.9;
}

.star { color: var(--color-gold); margin-right: 0.2em; }

/* ==========================================================================
   3. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn--gradient {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 46, 80, 0.35);
}
.btn--gradient:hover { box-shadow: 0 12px 32px rgba(255, 46, 80, 0.5); transform: translateY(-2px); }

.btn--glass {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  backdrop-filter: blur(12px);
}
.btn--glass:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
.btn--glass.is-active { background: var(--color-gold-soft); border-color: var(--color-gold); color: var(--color-gold); }

.btn--ghost {
  background: transparent;
  color: var(--color-text-dim);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover { color: var(--color-text); border-color: var(--color-border-strong); }

.btn--play {
  background: #fff;
  color: #0d0f14;
  box-shadow: var(--shadow-md);
}
.btn--play:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn--icon-text { padding: 0.65rem 1.1rem; }

/* ==========================================================================
   4. NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--navbar-h);
  z-index: 200;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(9, 11, 16, 0.85), rgba(9, 11, 16, 0));
  transition: background var(--t-med) var(--ease), backdrop-filter var(--t-med) var(--ease), border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar--scrolled {
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.navbar__inner {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--color-text);
  flex-shrink: 0;
}
.navbar__logo svg { color: var(--color-accent); }
.navbar__logo em { font-style: normal; color: var(--color-accent); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: auto;
}
.navbar__link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-dim);
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.navbar__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--t-fast) var(--ease);
}
.navbar__link:hover, .navbar__link.is-active { color: var(--color-text); }
.navbar__link.is-active::after,
.navbar__link:hover::after { transform: scaleX(1); }

.navbar__search {
  position: relative;
  flex: 1 1 340px;
  max-width: 380px;
  display: flex;
  align-items: center;
}
.navbar__search-icon {
  position: absolute;
  left: 14px;
  color: var(--color-text-faint);
  pointer-events: none;
}
.navbar__search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.navbar__search input::placeholder { color: var(--color-text-faint); }
.navbar__search input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(19, 23, 34, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  z-index: 250;
}
.search-suggestions.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.search-suggestions__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin: 0.2rem;
  transition: background var(--t-fast);
}
.search-suggestions__item:hover { background: rgba(255, 255, 255, 0.06); }
.search-suggestions__item img,
.search-suggestions__noposter {
  width: 38px; height: 54px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--color-surface-2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.search-suggestions .ss-title { font-size: 0.87rem; font-weight: 600; margin: 0 0 2px; }
.search-suggestions .ss-year { font-size: 0.76rem; color: var(--color-text-faint); margin: 0; }
.search-suggestions__empty { padding: 1rem; color: var(--color-text-faint); font-size: 0.85rem; }

.navbar__actions { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }

.watchlist-link { position: relative; }
.watchlist-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--color-bg);
}

.navbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
}
.navbar__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   5. HERO
   ========================================================================== */
.hero {
  position: relative;
  height: min(92vh, 820px);
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5.5rem;
  background-color: var(--color-bg);
  background-image: var(--hero-backdrop, none);
  background-size: cover;
  background-position: top center;
  transition: background-image 600ms var(--ease);
  overflow: hidden;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9,11,16,0.35) 0%, rgba(9,11,16,0.35) 30%, rgba(9,11,16,0.92) 88%, var(--color-bg) 100%),
    linear-gradient(90deg, rgba(9,11,16,0.85) 0%, rgba(9,11,16,0.25) 48%, rgba(9,11,16,0.05) 70%);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 660px;
  padding: 0 clamp(1.25rem, 6vw, 5.5rem);
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  background: var(--color-gold-soft);
  border: 1px solid rgba(255, 207, 82, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin-bottom: 0.9rem;
  text-shadow: 0 6px 30px rgba(0,0,0,0.55);
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--color-text-dim);
  margin-bottom: 1.1rem;
}
.detail-rating { font-weight: 700; color: var(--color-text); }
.hero__overview {
  color: var(--color-text-dim);
  font-size: 1.02rem;
  max-width: 54ch;
  margin-bottom: 1.75rem;
}
.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero__controls {
  position: absolute;
  z-index: 3;
  right: clamp(1.25rem, 6vw, 5.5rem);
  bottom: 2.25rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.hero__arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--color-border-strong);
  backdrop-filter: blur(10px);
  color: var(--color-text);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.hero__arrow:hover { background: rgba(255,255,255,0.18); transform: scale(1.06); }
.hero__dots { display: flex; gap: 0.4rem; }
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background var(--t-fast), transform var(--t-fast);
}
.hero__dot.is-active { background: var(--color-accent); transform: scale(1.3); }
.hero__error { color: var(--color-text-dim); padding: 2rem; }

/* ==========================================================================
   6. RAILS (horizontal scroll rows — homepage only)
   ========================================================================== */
.rails-container { padding-top: 3rem; }

.rail { margin-bottom: 3rem; }
.rail__header { padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

.rail__viewport { position: relative; }

.rail__track {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.4rem clamp(1.25rem, 4vw, 2.5rem) 1.2rem;
  scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { flex: 0 0 auto; width: 190px; }

.rail__arrow {
  position: absolute;
  top: 0; bottom: 1.2rem;
  width: 52px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-text);
  background: linear-gradient(90deg, var(--color-bg) 15%, transparent);
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
}
.rail__arrow--right { right: 0; background: linear-gradient(270deg, var(--color-bg) 15%, transparent); }
.rail__arrow--left { left: 0; }
.rail__viewport:hover .rail__arrow { opacity: 1; }
.rail__error, .empty-state { color: var(--color-text-faint); padding: 1rem clamp(1.25rem, 4vw, 2.5rem); }

/* ==========================================================================
   7. MOVIE CARDS
   ========================================================================== */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.4rem 1.1rem;
}

.movie-card {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease);
}
.movie-card:hover { transform: translateY(-6px); }

.movie-card__poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.movie-card:hover .movie-card__poster-wrap {
  box-shadow: 0 18px 40px rgba(255, 46, 80, 0.25), var(--shadow-lg);
  border-color: rgba(255, 46, 80, 0.4);
}

.movie-card__poster {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.movie-card:hover .movie-card__poster { transform: scale(1.08); }

.movie-card__fallback {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem;
  color: var(--color-text-faint);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
}

.movie-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,11,16,0.05) 0%, rgba(9,11,16,0.1) 55%, rgba(9,11,16,0.92) 100%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.7rem;
}
.movie-card:hover .movie-card__overlay { opacity: 1; }

.watchlist-btn {
  align-self: flex-end;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(10,12,18,0.6);
  border: 1px solid var(--color-border-strong);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
}
.watchlist-btn:hover { transform: scale(1.1); background: rgba(10,12,18,0.85); }
.watchlist-btn.is-active { color: var(--color-gold); border-color: var(--color-gold); }

.movie-card__rating {
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(10,12,18,0.65);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
}

.movie-card__play {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  transform: translateY(6px);
  opacity: 0;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.movie-card:hover .movie-card__play { transform: translateY(0); opacity: 1; }

.movie-card__info { padding-top: 0.65rem; }
.movie-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.movie-card__meta { font-size: 0.8rem; color: var(--color-text-faint); }

/* ==========================================================================
   8. SKELETON LOADING
   ========================================================================== */
.skeleton {
  position: relative;
  background: var(--color-surface-2);
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.skeleton-card { display: flex; flex-direction: column; gap: 0.55rem; width: 190px; flex: 0 0 auto; }
.skeleton-poster { aspect-ratio: 2/3; border-radius: var(--radius-md); }
.skeleton-line { height: 0.85rem; border-radius: 4px; }
.skeleton-backdrop { width: 100%; height: 46vh; min-height: 340px; border-radius: 0; }
.skeleton-poster-lg { width: 240px; aspect-ratio: 2/3; border-radius: var(--radius-lg); flex-shrink: 0; margin-top: -120px; }

.detail-skeleton { display: flex; gap: 2rem; position: relative; z-index: 2; }
.detail-skeleton__text { display: flex; flex-direction: column; gap: 0.9rem; padding-top: 1rem; flex: 1; }

.infinite-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2.2rem 0;
  color: var(--color-text-dim);
  font-size: 0.9rem;
}
.infinite-loader.is-visible { display: flex; }
.sentinel { height: 1px; }

.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong);
  border-top-color: var(--color-accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   9. BROWSE-ALL / SEARCH RESULTS / CATEGORY GRID
   ========================================================================== */
.browse-all, .search-results { padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 4rem; }
.search-results .container { padding: 0; }

.category-grid-section {
  padding-top: 1rem;
  padding-bottom: 4rem;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.year-groups {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.category-year-group {
  margin-bottom: 3rem;
}

.category-year-group:last-child {
  margin-bottom: 0;
}

.category-year-heading {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

/* ==========================================================================
   10. TOASTS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: min(360px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(19, 23, 34, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid var(--color-border-strong);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  transform: translateX(30px);
  opacity: 0;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
}
.toast--show { transform: translateX(0); opacity: 1; }
.toast--hide { opacity: 0; transform: translateX(20px); }
.toast--success { border-left-color: #35d488; }
.toast--error { border-left-color: #ff4d4d; }
.toast--info { border-left-color: var(--color-gold); }
.toast__icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255,255,255,0.08);
}
.toast--success .toast__icon { color: #35d488; }
.toast--error .toast__icon { color: #ff4d4d; }
.toast--info .toast__icon { color: var(--color-gold); }

/* ==========================================================================
   11. MOVIE DETAIL PAGE
   ========================================================================== */
.movie-loading, .movie-error { padding-top: var(--navbar-h); }
.empty-state-block {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--color-text-dim);
}
.empty-state-block__icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state-block h2 { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: 0.02em; margin-bottom: 0.5rem; color: var(--color-text); }
.empty-state-block p { margin-bottom: 1.5rem; }

.movie-detail { padding-top: var(--navbar-h); position: relative; }

.detail-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 62vh;
  min-height: 420px;
  background-size: cover;
  background-position: top center;
  z-index: -1;
}

.detail-hero {
  display: flex;
  gap: 2.5rem;
  padding-top: clamp(2rem, 10vw, 5rem);
  padding-bottom: 3rem;
  align-items: flex-end;
}

.detail-poster {
  flex: 0 0 240px;
  width: 240px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-2);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-poster__fallback { font-family: var(--font-display); font-size: 1.4rem; }

.detail-info { flex: 1; min-width: 0; padding-bottom: 0.5rem; }

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  letter-spacing: 0.01em;
  line-height: 1;
  text-shadow: 0 6px 30px rgba(0,0,0,0.6);
  margin-bottom: 0.5rem;
}
.detail-tagline {
  color: var(--color-text-dim);
  font-style: italic;
  margin-bottom: 0.9rem;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--color-text-dim);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cert-badge {
  border: 1px solid var(--color-border-strong);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.detail-genres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.genre-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-soft);
  color: #ff8fa1;
  border: 1px solid rgba(255, 46, 80, 0.3);
}

.detail-actions { display: flex; gap: 0.9rem; margin-bottom: 1.6rem; flex-wrap: wrap; }

.detail-overview {
  max-width: 72ch;
  color: var(--color-text-dim);
  font-size: 1.02rem;
  margin-bottom: 1.4rem;
}

.detail-director {
  display: flex;
  gap: 0.4rem;
  flex-direction: column;
  margin-bottom: 1.6rem;
}
.detail-director .label,
.detail-stats .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}
.detail-director .value { font-weight: 700; font-size: 1.05rem; }

.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.1rem;
  max-width: 640px;
  padding-top: 1.4rem;
  border-top: 1px solid var(--color-border);
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat .value { font-weight: 700; font-size: 0.95rem; }

.detail-section { padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 3.5rem; }

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1.3rem;
}
.cast-card { text-align: center; }
.cast-card__photo {
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  margin-bottom: 0.55rem;
}
.cast-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.cast-card__fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.cast-card__name { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.15rem; }
.cast-card__role { font-size: 0.78rem; color: var(--color-text-faint); }

/* ==========================================================================
   12. TRAILER MODAL
   ========================================================================== */
.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4, 5, 8, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
  padding: 2rem;
}
.trailer-modal.is-open { opacity: 1; pointer-events: auto; }
.trailer-modal__inner {
  width: min(960px, 100%);
  transform: scale(0.94);
  transition: transform var(--t-med) var(--ease);
}
.trailer-modal.is-open .trailer-modal__inner { transform: scale(1); }
.trailer-modal__frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
}
.trailer-modal__frame-wrap iframe { width: 100%; height: 100%; border: 0; }
.trailer-modal__close {
  position: absolute;
  top: -46px; right: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.trailer-modal__close:hover { background: rgba(255,255,255,0.2); }

/* ==========================================================================
   13. WATCHLIST PAGE
   ========================================================================== */
.watchlist-page { padding-top: calc(var(--navbar-h) + 2.5rem); padding-bottom: 5rem; }
.watchlist-page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.02em;
}
.page-subtitle { color: var(--color-text-dim); margin-top: 0.3rem; }
.watchlist-page__controls { display: flex; gap: 0.8rem; align-items: center; }

.select {
  appearance: none;
  background: var(--color-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center / 16px;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  padding: 0.65rem 2.2rem 0.65rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2.5rem;
  background: var(--color-bg-alt);
}
.footer__inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
}
.footer__note, .footer__copy { color: var(--color-text-faint); font-size: 0.82rem; max-width: 60ch; }
.footer__note a { color: var(--color-text-dim); text-decoration: underline; }

/* ==========================================================================
   15. RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .navbar__links { display: none; }
  .navbar__burger { display: flex; }
  .navbar__search { order: 3; flex-basis: 100%; max-width: none; margin-top: 0.6rem; }
  .navbar__inner { flex-wrap: wrap; padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .navbar { position: fixed; height: auto; }
  body { padding-top: 0; }

  .navbar__links.is-open {
    display: flex;
    flex-direction: column;
    width: 100%;
    order: 4;
    gap: 0.2rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.6rem;
  }
  .navbar__link { padding: 0.6rem 0; }

  .detail-hero { flex-direction: column; align-items: center; text-align: center; }
  .detail-poster { margin-top: -80px; }
  .detail-meta, .detail-genres, .detail-actions { justify-content: center; }
  .detail-director { align-items: center; }
  .detail-stats { justify-items: center; text-align: center; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: 4rem; }
  .hero__controls { position: static; justify-content: center; margin-top: 1.5rem; padding: 0 1.25rem 2rem; }
  .hero__content { padding-top: 6rem; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem 0.7rem; }
  .rail__track > * { width: 140px; }
  .watchlist-page__header { flex-direction: column; align-items: flex-start; }
}
.developer-name {
    position: fixed;
    top: 20px;
    right: 25px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    
    font-size: 15px;
    font-weight: 600;
    z-index: 9999;
}
.developer-credit {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: white;
    text-align: right;
    z-index: 9999;
}

.developer-credit strong {
    font-size: 16px;
    font-weight: 700;
}

.developer-credit span {
    font-size: 13px;
    opacity: 0.8;
}
/* =========================================
   CINERVERSE NAVBAR DROPDOWNS
   ========================================= */

.navbar__dropdown {
  position: relative;
}

.navbar__dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
}

/* Dropdown menu */

.navbar__dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;

  min-width: 190px;
  padding: 8px;

  background: #111318;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;

  z-index: 1000;
}

/* Dropdown links */

.navbar__dropdown-menu a {
  display: block;
  padding: 10px 12px;

  color: #fff;
  text-decoration: none;

  border-radius: 8px;
  font-size: 14px;

  transition: background 0.2s ease;
}

.navbar__dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Group labels inside the Upcoming dropdown */
.dropdown-group-label {
  display: block;
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.dropdown-group-label:first-child {
  padding-top: 6px;
}

/* Show dropdown on hover */

.navbar__dropdown:hover .navbar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar__dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}
/* =========================================
   CATEGORY FEATURED MOVIE
   ========================================= */

.category-featured {
  position: relative;
  min-height: 430px;
  margin: 30px 0 50px;
  padding: 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(
      90deg,
      rgba(8, 10, 15, 0.98) 0%,
      rgba(8, 10, 15, 0.88) 45%,
      rgba(8, 10, 15, 0.35) 100%
    ),
    var(--category-featured-backdrop) center / cover no-repeat;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.category-featured__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.category-featured__label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}

.category-featured__content h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
}

.category-featured__meta {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  font-size: 15px;
}

.category-featured__meta .star {
  margin-right: 4px;
}

.category-featured__content p {
  margin: 0 0 25px;
  max-width: 560px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.category-featured__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.category-featured__actions .btn {
  min-height: 44px;
}

/* Mobile */

@media (max-width: 700px) {
  .category-featured {
    min-height: 460px;
    padding: 30px 24px;
    align-items: flex-end;

    background:
      linear-gradient(
        0deg,
        rgba(8, 10, 15, 0.98) 10%,
        rgba(8, 10, 15, 0.55) 70%,
        rgba(8, 10, 15, 0.25) 100%
      ),
      var(--category-featured-backdrop) center / cover no-repeat;
  }

  .category-featured__content h1 {
    font-size: 34px;
  }

  .category-featured__content p {
    font-size: 14px;
    line-height: 1.55;
  }
}

/* ==========================================================================
   16. NEWS PAGE (Feature #48)
   ========================================================================== */

.news-hero {
  padding-top: calc(var(--navbar-h) + 2.5rem);
  padding-bottom: 2rem;
}

.news-hero .page-title { margin-bottom: 0.4rem; }
.news-hero .page-subtitle { margin-bottom: 1.8rem; max-width: 60ch; }

.news-search {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-search__input-wrap {
  max-width: 460px;
  flex: none;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.news-filter-chip {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-dim);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-pill);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.news-filter-chip:hover { color: var(--color-text); border-color: var(--color-text-dim); }
.news-filter-chip.is-active {
  background: var(--color-accent-soft);
  color: #ff8fa1;
  border-color: rgba(255, 46, 80, 0.4);
}

.news-section { padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 5rem; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(255, 46, 80, 0.18), var(--shadow-lg);
  border-color: rgba(255, 46, 80, 0.35);
}

.news-card__img-wrap {
  aspect-ratio: 16 / 9;
  background: var(--color-surface-2);
  overflow: hidden;
}
.news-card__img { width: 100%; height: 100%; object-fit: cover; }
.news-card__img-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
  color: var(--color-text-faint);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
}

.news-card__body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.news-card__source { color: var(--color-gold); }

.news-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__excerpt {
  font-size: 0.88rem;
  color: var(--color-text-dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card__read {
  align-self: flex-start;
  margin-top: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
}

/* News skeleton cards */
.news-skeleton-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.news-skeleton-img { aspect-ratio: 16 / 9; border-radius: 0; }
.news-skeleton-body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* News error state */
.news-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--color-text-dim);
}
.news-error__title { font-weight: 700; color: var(--color-text); margin-bottom: 0.4rem; }
.news-error__detail { font-size: 0.85rem; color: var(--color-text-faint); margin-bottom: 1.2rem; }

@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ==========================================================================
   17. THEME SYSTEM (Feature 11 — Appearance)
   Default Dark (the CineVerse default look) uses the :root values defined
   in section 1 and needs no override block below. Each additional theme
   overrides only the same custom properties already used throughout this
   stylesheet, so every existing component (navbar, cards, rails, modals,
   forms, news, watchlist, movie details) updates automatically wherever
   it is used, on every page.
   ========================================================================== */

[data-theme="midnight-blue"] {
  --color-bg: #060912;
  --color-bg-alt: #080c18;
  --color-surface: #0f1626;
  --color-surface-2: #151d33;
  --color-surface-3: #1c2640;
  --color-border: rgba(140, 170, 255, 0.10);
  --color-border-strong: rgba(140, 170, 255, 0.20);
  --color-text: #eef1fb;
  --color-text-dim: #9aa8c9;
  --color-text-faint: #5c6788;
  --color-accent: #3d7dff;
  --color-accent-2: #1c4fd6;
  --color-accent-soft: rgba(61, 125, 255, 0.16);
  --color-gold: #6fd3ff;
  --color-gold-soft: rgba(111, 211, 255, 0.14);
  --gradient-accent: linear-gradient(135deg, #5b93ff 0%, #1c4fd6 100%);
}

[data-theme="cinema-red"] {
  --color-bg: #0c0708;
  --color-bg-alt: #100809;
  --color-surface: #1a0f10;
  --color-surface-2: #241416;
  --color-surface-3: #2e191c;
  --color-border: rgba(255, 120, 120, 0.10);
  --color-border-strong: rgba(255, 120, 120, 0.20);
  --color-text: #fbf2f2;
  --color-text-dim: #c9a3a3;
  --color-text-faint: #8a6363;
  --color-accent: #ff1f3d;
  --color-accent-2: #8f0022;
  --color-accent-soft: rgba(255, 31, 61, 0.16);
  --color-gold: #ffb454;
  --color-gold-soft: rgba(255, 180, 84, 0.14);
  --gradient-accent: linear-gradient(135deg, #ff4757 0%, #8f0022 100%);
}

[data-theme="neon-purple"] {
  --color-bg: #0a0714;
  --color-bg-alt: #0d0919;
  --color-surface: #150f26;
  --color-surface-2: #1d1533;
  --color-surface-3: #261c42;
  --color-border: rgba(190, 140, 255, 0.10);
  --color-border-strong: rgba(190, 140, 255, 0.22);
  --color-text: #f3eefc;
  --color-text-dim: #ad9cc9;
  --color-text-faint: #6e6088;
  --color-accent: #a855f7;
  --color-accent-2: #6d28d9;
  --color-accent-soft: rgba(168, 85, 247, 0.16);
  --color-gold: #ff7ce5;
  --color-gold-soft: rgba(255, 124, 229, 0.14);
  --gradient-accent: linear-gradient(135deg, #c084fc 0%, #6d28d9 100%);
}

[data-theme="amoled-black"] {
  --color-bg: #000000;
  --color-bg-alt: #000000;
  --color-surface: #0a0a0a;
  --color-surface-2: #121212;
  --color-surface-3: #1a1a1a;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-text: #ffffff;
  --color-text-dim: #a0a0a0;
  --color-text-faint: #666666;
  --color-accent: #ff2e50;
  --color-accent-2: #c1043a;
  --color-accent-soft: rgba(255, 46, 80, 0.14);
  --color-gold: #ffcf52;
  --color-gold-soft: rgba(255, 207, 82, 0.14);
  --gradient-accent: linear-gradient(135deg, #ff4d63 0%, #c1043a 100%);
}

/* ==========================================================================
   18. SETTINGS / APPEARANCE (THEME) PANEL
   ========================================================================== */

.navbar__settings {
  position: relative;
}

.navbar__settings-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.navbar__settings-btn:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-border-strong);
}
.navbar__settings-btn[aria-expanded="true"] {
  color: var(--color-gold);
  border-color: var(--color-gold);
  background: var(--color-gold-soft);
}

.theme-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 250px;
  max-width: calc(100vw - 2rem);
  background: rgba(19, 23, 34, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.9rem;
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast) var(--ease);
  z-index: 260;
}
.theme-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.theme-panel__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 0.65rem;
  padding: 0 0.2rem;
}

.theme-panel__options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}
.theme-option:hover { background: rgba(255, 255, 255, 0.06); color: var(--color-text); }
.theme-option.is-active { color: var(--color-text); background: rgba(255, 255, 255, 0.08); }

.theme-option__swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
}
.theme-option__swatch[data-swatch="default-dark"] { background: linear-gradient(135deg, #ff4d63, #0d1017); }
.theme-option__swatch[data-swatch="midnight-blue"] { background: linear-gradient(135deg, #5b93ff, #060912); }
.theme-option__swatch[data-swatch="cinema-red"] { background: linear-gradient(135deg, #ff4757, #0c0708); }
.theme-option__swatch[data-swatch="neon-purple"] { background: linear-gradient(135deg, #c084fc, #0a0714); }
.theme-option__swatch[data-swatch="amoled-black"] { background: linear-gradient(135deg, #ff2e50, #000000); }

.theme-option__check {
  margin-left: auto;
  opacity: 0;
  color: var(--color-gold);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.theme-option.is-active .theme-option__check { opacity: 1; }

@media (max-width: 640px) {
  .theme-panel {
    right: -0.5rem;
    width: min(280px, calc(100vw - 1.5rem));
  }
}