/* ==========================================================================
   XANION Design Tokens — Luxury AI Cinema design system.
   Target visual balance: ~80% graphite/black, ~15% dark emerald atmosphere,
   ~5% XANION neon green accent. When in doubt between "eye-catching" and
   "elegant," elegant wins — the film artwork is the spectacle, the UI
   around it stays quiet. Every component below should draw from these
   tokens rather than inventing new colors/radii/spacing inline.
   ========================================================================== */
:root {
  /* Surfaces */
  --bg: #050807;
  --bg-elevated: #090d0b;
  --surface: #101412;
  --surface-2: #141917;
  --input-bg: #171c1a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  /* Back-compat aliases used across existing components */
  --surface-border: var(--border);

  /* XANION green */
  --accent: #20f28a;
  --accent-hover: #35f59a;
  --accent-dark: #0b5e3c;
  --accent-atmo: #063d2a;
  --accent-dim: rgba(32, 242, 138, 0.18);
  /* Secondary accent used only for the green-to-blue title gradient */
  --accent-blue: #1fb8e8;

  /* Text */
  --text: #f5f7f6;
  --text-secondary: #a7aeaa;
  --text-muted: #6f7873;
  --text-disabled: #4c5450;

  --star: #f6c945;

  /* Radii */
  --radius-poster: 13px;
  --radius-btn: 11px;
  --radius-input: 10px;
  --radius-card: 16px;
  --radius-hero: 20px;
  --radius-modal: 20px;
  --radius: var(--radius-card);
  --radius-pill: 999px;

  /* Shadows — soft and dark by default; emerald glow is reserved for tiny,
     deliberate interaction feedback, never a resting-state effect. */
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-lifted: 0 16px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  /* A dark scrim over the existing atmospheric background keeps the glow
     restrained (target ~15% of the frame reading as "emerald atmosphere",
     not a bright feature) without discarding the art already made for it. */
  background-image:
    linear-gradient(rgba(5, 8, 7, 0.6), rgba(5, 8, 7, 0.6)),
    url("/img/glow-background.png");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

body.profile-page {
  background-image:
    linear-gradient(rgba(5, 8, 7, 0.65), rgba(5, 8, 7, 0.8)),
    url("/img/profile-bg.png");
}

body.settings-page {
  background-image:
    linear-gradient(rgba(5, 8, 7, 0.6), rgba(5, 8, 7, 0.78)),
    url("/img/settings-bg.png");
}

/* Reading pages favor comfort over atmosphere: dial the emerald glow
   down from ~15% to ~10% of the frame so body text stays easy on the eyes. */
body.legal-atmo {
  background-image:
    linear-gradient(rgba(5, 8, 7, 0.8), rgba(5, 8, 7, 0.8)),
    url("/img/glow-background.png");
}

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

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px 64px;
}

@media (max-width: 1024px) {
  .container { padding: 0 32px 56px; }
  .poster-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px 48px; }
}

/* Header — dark translucent glass, ~72px tall, subtle bottom border.
   Deepens very slightly on scroll (.scrolled, toggled in nav.js) rather
   than snapping, per the "controlled, expensive-feeling" motion rule. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  max-width: 1320px;
  margin: 0 auto;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 13, 11, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 200ms ease, backdrop-filter 200ms ease;
}

.site-header.scrolled {
  background: rgba(5, 8, 7, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@media (max-width: 1024px) { .site-header { padding: 16px 32px; } }

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

.brand img.hero-icon { height: 40px; }
.brand img.wordmark { height: 21px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-links a {
  position: relative;
  font-weight: 500;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--accent); }
.nav-links a.btn { padding-bottom: 0; }
.nav-links a.btn::after { display: none; }

.lang-switcher {
  position: relative;
  display: inline-flex;
  margin-left: 4px;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 8, 7, 0.55);
  border: 1px solid rgba(33, 242, 140, 0.5);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lang-toggle:hover { background: rgba(33, 242, 140, 0.12); border-color: rgba(33, 242, 140, 0.8); }
.lang-caret { font-size: 10px; opacity: 0.8; }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 130px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}
.lang-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-menu-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.lang-menu-item.active { color: var(--accent); }

.sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(6, 8, 7, 0.55);
  border: 1px solid rgba(33, 242, 140, 0.5);
  color: var(--accent);
  font-size: 13px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.sound-toggle:hover { background: rgba(33, 242, 140, 0.12); border-color: rgba(33, 242, 140, 0.8); transform: scale(1.08); }

/* Admin-only "Approvals" nav link with a live pending-count badge. */
.nav-approvals-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #06120a;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* Header hero area: wordmark + tagline sitting over the planet-horizon
   glow, same composition as the iOS app's Home header. */
.hero-header {
  max-width: 1320px;
  margin: 0 auto;
  padding: 64px 48px 0;
  text-align: center;
  position: relative;
}

@media (max-width: 1024px) { .hero-header { padding: 48px 32px 0; } }

.hero-header .planet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 220px;
  background-image: url("/img/header-planet.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

.hero-header .content { position: relative; z-index: 1; }
.hero-header img.wordmark-lg { height: 44px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, border-color 150ms ease, background 150ms ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #04120b;
  box-shadow: 0 0 0 rgba(0,0,0,0); /* resting state has no glow — see .btn-primary:hover */
}

.btn-primary:hover { background: var(--accent-hover); }

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

.btn-secondary:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.08); }

.btn:disabled { opacity: 0.5; cursor: default; }

/* Restrained nav Sign Up: outlined, not a solid green block */
.nav-signup {
  min-height: 38px;
  padding: 0 18px;
  font-size: 13px;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.nav-signup:hover { border-color: rgba(32, 242, 138, 0.55); color: var(--accent); background: transparent; }

/* Hero */
.hero {
  text-align: center;
  padding: 40px 24px 20px;
}

.hero h1 {
  font-size: 15px;
  letter-spacing: 1.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin: 0;
}

/* Featured hero carousel */
.hero-carousel { position: relative; margin-top: 32px; }

.hero-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hero-track::-webkit-scrollbar { display: none; }

.hero-arrow {
  position: absolute;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(6, 8, 7, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  font-size: 18px;
  line-height: 1;
  transition: background 150ms ease, transform 150ms ease;
}
.hero-arrow:hover { background: rgba(6, 8, 7, 0.88); transform: scale(1.06); }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 150ms ease, width 150ms ease;
}
.hero-dot.active { background: var(--accent); width: 20px; border-radius: 4px; }

@media (max-width: 640px) {
  .hero-arrow { display: none; }
}

.featured-hero {
  position: relative;
  border-radius: var(--radius-hero);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  aspect-ratio: 16 / 8.2;
  display: block;
  background: linear-gradient(180deg, #1a2036, #0a0c14);
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.featured-hero video,
.featured-hero .fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Portrait posters reused as hero banners: blurred cover backdrop behind a
   full, uncropped poster — avoids cutting off the top/bottom of the art. */
.featured-hero .fallback-img-bg {
  filter: blur(40px) brightness(0.55) saturate(1.15);
  transform: scale(1.2);
}
.featured-hero .fallback-img-fg {
  object-fit: contain;
}

.featured-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.15) 45%, transparent 70%);
}

/* Banners with the title/badge already baked into the art need only a
   light bottom scrim, just enough to keep the CTA buttons legible. */
.featured-hero-baked::after {
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, transparent 30%);
}
.overlay-baked {
  display: flex;
  justify-content: flex-end;
}

.featured-hero .overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 32px;
  z-index: 2;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 8, 7, 0.55);
  border: 1px solid rgba(33, 242, 140, 0.5);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.featured-badge.promoted { border-color: rgba(246, 201, 69, 0.5); color: var(--star); }

.featured-hero .f-title {
  display: block;
  width: fit-content;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-blue) 55%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(32, 242, 138, 0.35)) drop-shadow(0 0 16px rgba(31, 184, 232, 0.35));
}
.featured-hero .f-meta { font-size: 14px; color: rgba(255,255,255,0.75); margin: 0 0 20px; }
.featured-hero .f-ctas { display: flex; gap: 12px; }
.featured-hero .f-ctas .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

/* Genre filter chips */
.genre-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 28px 0 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.genre-bar::-webkit-scrollbar { display: none; }

.genre-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.genre-chip:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }

.genre-chip.selected {
  background: var(--accent-dim);
  border-color: rgba(32, 242, 138, 0.6);
  color: var(--accent);
}

/* Poster rails (horizontal scroll) */
.poster-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.poster-rail::-webkit-scrollbar { display: none; }
.poster-rail .poster-card { flex: 0 0 170px; scroll-snap-align: start; }

/* Poster grid */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.poster-card {
  position: relative;
  display: block;
  border-radius: var(--radius-poster);
  overflow: hidden;
  background: linear-gradient(180deg, #1c211f, #0a0c0b);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.poster-card:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-lifted);
  border-color: rgba(32, 242, 138, 0.3);
}

/* Decorative-only cards (demo catalog): no hover lift, no pointer cursor —
   nothing about them should imply they're clickable. */
.poster-card-demo { cursor: default; }
.poster-card-demo:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
  border-color: var(--border);
}
.poster-card-demo img { opacity: 0.82; }

.poster-thumb { position: relative; overflow: hidden; }

.poster-thumb .poster-hover-cta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.poster-card:hover .poster-hover-cta { opacity: 1; transform: translateY(0); }

.fav-star {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(6, 8, 7, 0.55);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
  z-index: 2;
}
.fav-star:hover { transform: scale(1.1); background: rgba(6, 8, 7, 0.8); }
.fav-star.favorited { color: var(--star); }

.poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 400ms ease;
}
.poster-card img.loaded { opacity: 1; }

.poster-meta { padding: 10px 4px 0; }
.poster-title { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.3; }
.poster-sub { font-size: 12px; color: var(--text-secondary); margin: 2px 0 0; }
.poster-price { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-top: 5px; opacity: 0.9; }

/* Section header */
.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 4px;
}

.section-title {
  display: block;
  width: fit-content;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, var(--accent) 15%, var(--accent-blue) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(32, 242, 138, 0.3)) drop-shadow(0 0 10px rgba(31, 184, 232, 0.3));
}

/* Page-level heading (Search XANION, My Library, Profile, Create Account) —
   one shared size/weight so no page invents its own. */
.page-title {
  display: block;
  width: fit-content;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 28px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent) 15%, var(--accent-blue) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(32, 242, 138, 0.35)) drop-shadow(0 0 14px rgba(31, 184, 232, 0.35));
}

@media (max-width: 640px) {
  .page-title { font-size: 24px; margin-bottom: 20px; letter-spacing: 0.6px; }
}

.creator-hero {
  position: relative;
  border-radius: var(--radius-hero);
  overflow: hidden;
  border: 1px solid rgba(32, 242, 138, 0.18);
  box-shadow: var(--shadow-lifted);
  padding: 72px 48px;
  text-align: center;
  margin-bottom: 40px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(32, 242, 138, 0.16), transparent 70%),
    linear-gradient(180deg, #0d1310, #050807);
}
.creator-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.creator-hero-title {
  display: block;
  width: fit-content;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 44px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 auto 18px;
  max-width: 640px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-blue) 55%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(32, 242, 138, 0.4)) drop-shadow(0 0 18px rgba(31, 184, 232, 0.35));
}
.creator-hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .creator-hero { padding: 48px 24px; }
  .creator-hero-title { font-size: 28px; }
}

.section-row a { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.section-row a:hover { color: var(--accent); }

/* Movie detail */
.detail-hero {
  position: relative;
  border-radius: var(--radius-hero);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  margin-top: 24px;
}

.preview-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: #04120b;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, background 150ms ease;
}
.preview-play:hover { background: var(--accent-hover); transform: translate(-50%, -50%) scale(1.03); }

.paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(180deg, rgba(6, 8, 7, 0.55) 0%, rgba(6, 8, 7, 0.75) 100%);
}
.paywall-title {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.detail-hero img,
.detail-hero video {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  background: #000;
  opacity: 0;
  transition: opacity 400ms ease;
}
.detail-hero img.loaded,
.detail-hero video.loaded { opacity: 1; }

.detail-title {
  display: block;
  width: fit-content;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 30px;
  font-weight: 800;
  margin: 24px 0 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent) 15%, var(--accent-blue) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(32, 242, 138, 0.35)) drop-shadow(0 0 14px rgba(31, 184, 232, 0.35));
}
.detail-meta { color: var(--text-secondary); font-size: 14px; }
.detail-meta .rating-star { color: var(--star); }
.detail-meta .text-muted { color: var(--text-muted); }
.detail-synopsis { font-size: 16px; line-height: 1.6; margin: 20px 0; color: var(--text); opacity: 0.9; }

.price-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 20px 0;
}

.price-card .label { font-size: 12px; color: var(--text-secondary); }
.price-card .value { font-size: 20px; font-weight: 700; color: var(--accent); }

.price-card-picker {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.price-card-picker .label { font-size: 13px; }

.price-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-pill {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.price-pill:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.price-pill.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #04120b;
  transform: translateY(-1px);
}

.owned-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* Forms */
.auth-page {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-page.with-photo {
  background-image:
    linear-gradient(180deg, rgba(5,8,7,0.6) 0%, rgba(5,8,7,0.72) 55%, rgba(5,8,7,0.92) 100%),
    var(--photo);
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

/* Library gets its own themed background photo, same overlay technique as
   the auth pages, applied at the body level since Library isn't a
   single-centered-card layout. */
body.page-bg-photo {
  background-image:
    linear-gradient(180deg, rgba(5,8,7,0.4) 0%, rgba(5,8,7,0.68) 40%, rgba(5,8,7,0.94) 85%),
    var(--photo);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

/* Glassmorphism — used sparingly (header, auth cards, empty states, filter
   panels); never applied to every card. */
.auth-card {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  background: rgba(15, 20, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-modal);
  padding: 32px;
  box-shadow: var(--shadow-lifted);
}

.auth-card h2 {
  font-family: "Orbitron", "Inter", sans-serif;
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(32, 242, 138, 0.35);
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 15px;
}
.field input:focus { outline: none; border-color: rgba(32, 242, 138, 0.5); }

.form-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 10px;
  min-height: 16px;
}

.form-note { font-size: 13px; color: var(--text-secondary); margin-top: 16px; text-align: center; }

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 16px;
  transition: border-color 200ms ease;
}
.search-input:focus { outline: none; border-color: rgba(32, 242, 138, 0.45); }
.search-input::placeholder { color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 48px 40px;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 64px auto;
  background: rgba(15, 20, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-modal);
  box-shadow: var(--shadow-lifted);
}

.empty-state-cinematic {
  background-image:
    linear-gradient(rgba(15, 20, 18, 0.88), rgba(15, 20, 18, 0.88)),
    var(--photo);
  background-size: cover;
  background-position: center;
}

.empty-state h2 {
  color: var(--text);
  font-size: 22px;
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Skeleton loading state for poster grids/rails while content fetches */
.skeleton-card {
  border-radius: var(--radius);
  aspect-ratio: 2 / 3;
  background: linear-gradient(
    100deg,
    rgba(255,255,255,0.04) 30%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 70%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

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

footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 40px 24px;
}
footer .footer-links { margin-top: 10px; }
footer a { color: var(--text-secondary); text-decoration: none; margin: 0 8px; }
footer a:hover { color: var(--accent); }

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease;
}
.settings-row:hover { border-color: var(--border-strong); }
.settings-row .settings-row-title { font-weight: 600; font-size: 15px; }
.settings-row .settings-row-sub { color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.settings-row .chevron { color: var(--text-muted); font-size: 18px; }
.settings-row.danger .settings-row-title { color: #ff6b6b; }

.legal-content h2 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.legal-content ul { padding-left: 20px; margin: 8px 0; }
.legal-content a:not(.btn) { color: var(--accent); }

/* Mobile: header wraps instead of overflowing horizontally */
@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    row-gap: 12px;
    padding: 16px 20px;
  }
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
  }
  .brand img.wordmark { height: 16px; }
  .brand img.hero-icon { height: 30px; }
  .hero-header { padding: 32px 20px 0; }
  .hero-header .planet { height: 140px; }
  .hero-header img.wordmark-lg { height: 32px; }
  .featured-hero { aspect-ratio: 4 / 5; }
  .featured-hero .f-title { font-size: 26px; }
  .featured-hero .f-ctas { flex-wrap: wrap; }
  .poster-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .poster-rail .poster-card { flex: 0 0 140px; }
}

/* ==========================================================================
   Global rich footer (About/Legal/Support columns)
   ========================================================================== */
.site-footer {
  padding: 56px 48px 32px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  text-align: left;
}
.footer-cols {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  max-width: 1320px;
  margin: 0 auto;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
.footer-heading {
  display: block;
  width: fit-content;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 4px;
  background: linear-gradient(90deg, var(--accent) 15%, var(--accent-blue) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(32, 242, 138, 0.3)) drop-shadow(0 0 8px rgba(31, 184, 232, 0.3));
}
.footer-col a { color: var(--text-secondary); font-size: 14px; text-decoration: none; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1320px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.footer-bottom p { margin: 2px 0; }

@media (max-width: 640px) {
  .site-footer { padding: 40px 20px 24px; }
  .footer-cols { gap: 28px; }
}

/* ==========================================================================
   Legal / informational page shell
   ========================================================================== */
.legal-page { max-width: 820px; }
.legal-page .page-title { margin-bottom: 8px; }
.legal-updated { color: var(--text-muted); font-size: 13px; margin: 0 0 28px; }

.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin: 0 0 32px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.toc a { display: block; padding: 4px 0; color: var(--text); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--accent); }

.legal-content section { scroll-margin-top: 90px; }
.legal-note {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 20px 0;
}

/* Help Center categories + simple client-side filter */
.help-search {
  min-height: 52px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0 20px;
  font-size: 15px;
  margin-bottom: 28px;
}
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease;
}
.help-card:hover { border-color: var(--border-strong); }
.help-card .h-title { font-weight: 600; font-size: 15px; margin: 0 0 4px; }
.help-card .h-sub { color: var(--text-secondary); font-size: 13px; margin: 0; }
@media (max-width: 900px) { .help-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .help-grid { grid-template-columns: 1fr; } }
