@charset "UTF-8";
/*!
 * ─────────────────────────────────────────────────────────────────────────────
 *  MovieRate — Design System
 *  Hand-authored CSS. No framework, no build step, no runtime CSS-in-JS.
 * ─────────────────────────────────────────────────────────────────────────────
 *
 *  CONTENTS
 *    01  Design tokens (dark + light)
 *    02  Reset & base
 *    03  Typography
 *    04  Motion primitives (@keyframes)
 *    05  Atmosphere: aurora, grain, spotlight, vignette
 *    06  Layout primitives
 *    07  Buttons
 *    08  Forms
 *    09  Cards & surfaces
 *    10  Movie card
 *    11  Badges, chips, pills
 *    12  Stars & rating
 *    13  Navbar
 *    14  Toasts
 *    15  Modal & dialog
 *    16  Skeletons & loaders
 *    17  Empty states
 *    18  Tables
 *    19  Pagination
 *    20  Notifications
 *    21  Utilities
 *    22  Scroll reveal
 *    23  Reduced motion & print
 *
 *  MOTION BUDGET
 *    Only `transform`, `opacity` and `filter` are animated — properties the
 *    compositor can handle without layout or paint. `will-change` is applied
 *    by JS for the duration of an interaction and then removed. Everything is
 *    disabled under `prefers-reduced-motion: reduce`.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   01  DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand — sampled from the application icon: gold star on deep graphite */
  --gold-50:  #FFF8E1;
  --gold-100: #FFEDB3;
  --gold-200: #FFDD7A;
  --gold-300: #FFD24D;
  --gold-400: #F7C324;
  --gold-500: #E9B21B;
  --gold-600: #C9931A;
  --gold-700: #9E7213;

  --ink-950: #06070B;
  --ink-900: #0A0C12;
  --ink-850: #0F111A;
  --ink-800: #14171F;
  --ink-750: #191D27;
  --ink-700: #20242F;
  --ink-600: #2C313E;
  --ink-500: #3C4252;
  --ink-400: #565D70;
  --ink-300: #7A8195;
  --ink-200: #A6ACBD;
  --ink-100: #D2D6E0;
  --ink-050: #EDEFF4;

  --crimson: #E5484D;
  --crimson-soft: #F2696D;
  --emerald: #35D08A;
  --sky: #4BA3F5;
  --violet: #9B6BF2;

  /* Semantic — dark theme is the default */
  --bg: var(--ink-950);
  --bg-elev-1: var(--ink-900);
  --bg-elev-2: var(--ink-850);
  --bg-elev-3: var(--ink-800);
  --surface: rgba(255, 255, 255, .035);
  --surface-hover: rgba(255, 255, 255, .06);
  --surface-strong: rgba(255, 255, 255, .09);
  --hairline: rgba(255, 255, 255, .08);
  --hairline-strong: rgba(255, 255, 255, .14);

  --text: #F2F4F8;
  --text-soft: var(--ink-200);
  --text-muted: var(--ink-300);
  --text-faint: var(--ink-400);
  --text-on-gold: #17130A;

  --accent: var(--gold-400);
  --accent-hi: var(--gold-300);
  --accent-lo: var(--gold-600);
  --accent-glow: rgba(247, 195, 36, .28);
  --accent-wash: rgba(247, 195, 36, .1);

  --danger: var(--crimson);
  --success: var(--emerald);
  --info: var(--sky);
  --warning: #F5A524;

  /* Elevation — layered, low-alpha shadows read as depth rather than blur */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7), 0 8px 20px -8px rgba(0, 0, 0, .45);
  --shadow-xl: 0 40px 100px -28px rgba(0, 0, 0, .8), 0 12px 32px -12px rgba(0, 0, 0, .5);
  --shadow-gold: 0 10px 40px -12px var(--accent-glow);

  /* Geometry */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --gutter: clamp(1rem, 3.2vw, 2.5rem);
  --shell: 1440px;
  --nav-h: 68px;

  /* Motion — one easing vocabulary used everywhere */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, .05, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-glide: cubic-bezier(.16, 1, .3, 1);

  --t-fast: 140ms;
  --t-base: 240ms;
  --t-slow: 420ms;
  --t-slower: 700ms;

  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  color-scheme: dark;
}

/* ── Light theme ─────────────────────────────────────────────────────────── */

html[data-theme="light"] {
  --bg: #F5F4F0;
  --bg-elev-1: #FBFAF7;
  --bg-elev-2: #FFFFFF;
  --bg-elev-3: #FFFFFF;
  --surface: rgba(10, 12, 18, .035);
  --surface-hover: rgba(10, 12, 18, .06);
  --surface-strong: rgba(10, 12, 18, .085);
  --hairline: rgba(10, 12, 18, .1);
  --hairline-strong: rgba(10, 12, 18, .17);

  --text: #12141B;
  --text-soft: #3A4050;
  --text-muted: #5A6273;
  --text-faint: #858C9C;

  --accent: var(--gold-600);
  --accent-hi: var(--gold-500);
  --accent-lo: var(--gold-700);
  --accent-glow: rgba(201, 147, 26, .22);
  --accent-wash: rgba(201, 147, 26, .09);

  --shadow-xs: 0 1px 2px rgba(20, 23, 31, .08);
  --shadow-sm: 0 2px 8px rgba(20, 23, 31, .08);
  --shadow-md: 0 8px 24px -8px rgba(20, 23, 31, .16), 0 2px 6px rgba(20, 23, 31, .06);
  --shadow-lg: 0 24px 60px -20px rgba(20, 23, 31, .22), 0 8px 20px -10px rgba(20, 23, 31, .1);
  --shadow-xl: 0 40px 100px -30px rgba(20, 23, 31, .26), 0 12px 32px -14px rgba(20, 23, 31, .12);

  color-scheme: light;
}

/* ═══════════════════════════════════════════════════════════════════════════
   02  RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-600) transparent;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Cross-fades the whole page when the theme flips */
  transition: background-color var(--t-slow) var(--ease-out), color var(--t-slow) var(--ease-out);
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

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

ul, ol { list-style: none; padding: 0; }

:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-xs); }

::selection { background: var(--accent); color: var(--text-on-gold); }

/* Slim, themed scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-600);
  border: 3px solid transparent;
  border-radius: var(--r-pill);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); background-clip: content-box; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px; left: 50%;
  z-index: 999;
  padding: .7rem 1.2rem;
  background: var(--accent);
  color: var(--text-on-gold);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600;
  transform: translateX(-50%);
  transition: top var(--t-base) var(--ease-spring);
}
.skip-link:focus { top: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   03  TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.022em;
  text-wrap: balance;
}

.display {
  font-family: 'Bebas Neue', 'Outfit', sans-serif;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: .95;
  text-transform: uppercase;
}

.t-hero    { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
.t-h1      { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
.t-h2      { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.t-h3      { font-size: clamp(1.12rem, 1.7vw, 1.35rem); }
.t-body    { font-size: 1rem; }
.t-sm      { font-size: .875rem; }
.t-xs      { font-size: .78rem; }
.t-2xs     { font-size: .69rem; }

.t-muted   { color: var(--text-muted); }
.t-soft    { color: var(--text-soft); }
.t-faint   { color: var(--text-faint); }
.t-accent  { color: var(--accent); }
.t-danger  { color: var(--danger); }
.t-success { color: var(--success); }

.t-mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.t-num { font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

/* Animated gold gradient — the wordmark and hero headings */
.t-gold {
  background: linear-gradient(100deg,
    var(--gold-600) 0%, var(--gold-300) 22%, var(--gold-100) 38%,
    var(--gold-300) 54%, var(--gold-500) 74%, var(--gold-600) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gold-drift 9s var(--ease-in-out) infinite;
}

/* The bright gold scale has too little contrast on the light ground, so the
   light palette gets its own, deeper set of stops. */
html[data-theme="light"] .t-gold {
  background: none;
  color: var(--gold-700);
  -webkit-text-fill-color: currentColor;
  animation: none;
}

.t-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════════
   04  MOTION PRIMITIVES
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes gold-drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-scale {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slide-left {
  from { opacity: 0; transform: translate3d(28px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pop-in {
  0%   { opacity: 0; transform: scale(.7); }
  60%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* Slow, organic drift for the background blobs */
@keyframes aurora-a {
  0%, 100% { transform: translate3d(-6%, -4%, 0) scale(1); }
  33%      { transform: translate3d(8%, 6%, 0) scale(1.16); }
  66%      { transform: translate3d(-4%, 10%, 0) scale(.94); }
}
@keyframes aurora-b {
  0%, 100% { transform: translate3d(6%, 8%, 0) scale(1.08); }
  40%      { transform: translate3d(-10%, -6%, 0) scale(.92); }
  70%      { transform: translate3d(4%, -10%, 0) scale(1.2); }
}
@keyframes aurora-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-12%, 4%, 0) scale(1.28); }
}

/* Film grain: nudging the tile makes the noise "boil" like real stock */
@keyframes grain-shift {
  0%,  100% { transform: translate3d(0, 0, 0); }
  10%  { transform: translate3d(-2%, -3%, 0); }
  20%  { transform: translate3d(-8%, 2%, 0); }
  30%  { transform: translate3d(4%, -6%, 0); }
  40%  { transform: translate3d(-3%, 6%, 0); }
  50%  { transform: translate3d(-6%, -2%, 0); }
  60%  { transform: translate3d(6%, 1%, 0); }
  70%  { transform: translate3d(-1%, 5%, 0); }
  80%  { transform: translate3d(2%, -4%, 0); }
  90%  { transform: translate3d(-4%, 3%, 0); }
}

@keyframes shimmer {
  from { transform: translate3d(-100%, 0, 0); }
  to   { transform: translate3d(100%, 0, 0); }
}

@keyframes sheen-sweep {
  from { transform: translate3d(-130%, 0, 0) skewX(-18deg); }
  to   { transform: translate3d(230%, 0, 0) skewX(-18deg); }
}

@keyframes heart-pop {
  0%   { transform: scale(1); }
  32%  { transform: scale(.82); }
  62%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}

@keyframes ring-burst {
  from { opacity: .8; transform: scale(.4); }
  to   { opacity: 0;  transform: scale(2.4); }
}

@keyframes star-burst {
  0%   { opacity: 0; transform: scale(.3) rotate(-30deg); }
  50%  { opacity: 1; transform: scale(1.35) rotate(6deg); }
  100% { opacity: 0; transform: scale(1.8) rotate(14deg); }
}

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

@keyframes reel-spin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

@keyframes float-y {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -9px, 0); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: .5; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.06); }
}

@keyframes dot-bounce {
  0%, 80%, 100% { transform: translate3d(0, 0, 0); opacity: .35; }
  40%           { transform: translate3d(0, -7px, 0); opacity: 1; }
}

@keyframes shake-x {
  0%, 100%      { transform: translate3d(0, 0, 0); }
  15%, 45%, 75% { transform: translate3d(-7px, 0, 0); }
  30%, 60%, 90% { transform: translate3d(7px, 0, 0); }
}

@keyframes draw-check {
  from { stroke-dashoffset: 48; }
  to   { stroke-dashoffset: 0; }
}

@keyframes ripple-out {
  from { opacity: .45; transform: scale(0); }
  to   { opacity: 0;   transform: scale(2.6); }
}

@keyframes toast-in {
  0%   { opacity: 0; transform: translate3d(0, -22px, 0) scale(.96); }
  70%  { opacity: 1; transform: translate3d(0, 3px, 0) scale(1.01); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translate3d(0, -16px, 0) scale(.95); }
}

@keyframes bar-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@keyframes curtain-open {
  from { opacity: 0; transform: scale(.9) translate3d(0, 26px, 0); filter: blur(10px); }
  to   { opacity: 1; transform: scale(1) translate3d(0, 0, 0);    filter: blur(0); }
}

@keyframes bell-swing {
  0%, 100% { transform: rotate(0); }
  15%      { transform: rotate(13deg); }
  30%      { transform: rotate(-11deg); }
  45%      { transform: rotate(8deg); }
  60%      { transform: rotate(-6deg); }
  75%      { transform: rotate(3deg); }
}

@keyframes caret-blink { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0; } }

@keyframes glint-travel {
  0%   { opacity: 0; transform: translate3d(-40%, 0, 0); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(140%, 0, 0); }
}

@keyframes scale-in-y {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   05  ATMOSPHERE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Three blurred colour fields drifting behind the content. Fixed-position and
   `pointer-events: none`, so they never touch layout or interaction. */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  will-change: transform;
}

.aurora__blob--gold {
  top: -18%; left: -8%;
  width: 52vw; height: 52vw;
  background: radial-gradient(circle at 30% 30%, rgba(247, 195, 36, .5), transparent 68%);
  animation: aurora-a 26s var(--ease-in-out) infinite;
}
.aurora__blob--violet {
  bottom: -24%; right: -12%;
  width: 58vw; height: 58vw;
  background: radial-gradient(circle at 60% 40%, rgba(155, 107, 242, .34), transparent 68%);
  animation: aurora-b 32s var(--ease-in-out) infinite;
}
.aurora__blob--sky {
  top: 28%; right: 12%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle at 50% 50%, rgba(75, 163, 245, .26), transparent 70%);
  animation: aurora-c 38s var(--ease-in-out) infinite;
}

html[data-theme="light"] .aurora__blob { opacity: .32; filter: blur(96px); }

/* Fine film grain — a 64×64 SVG noise tile scaled up and jittered */
.grain {
  position: fixed;
  inset: -120px;
  z-index: 1;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='64' height='64' filter='url(%23n)'/></svg>");
  background-size: 128px 128px;
  animation: grain-shift 900ms steps(1) infinite;
  mix-blend-mode: overlay;
  contain: strict;
}
html[data-theme="light"] .grain { opacity: .028; mix-blend-mode: multiply; }

/* Cinema vignette — darkens the corners so posters pop */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 42%, transparent 42%, rgba(0, 0, 0, .5) 100%);
  contain: strict;
}
html[data-theme="light"] .vignette { display: none; }

/* Cursor-tracking highlight. JS writes --mx/--my as percentages. */
.spotlight {
  position: relative;
  isolation: isolate;
}
.spotlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
    var(--accent-glow), transparent 62%);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-out);
}
.spotlight:hover::before, .spotlight:focus-within::before { opacity: 1; }

/* A thin travelling glint used on section dividers */
.glint {
  position: relative;
  height: 1px;
  background: var(--hairline);
  overflow: hidden;
}
.glint::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 34%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: glint-travel 4.5s var(--ease-in-out) infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   06  LAYOUT PRIMITIVES
   ═══════════════════════════════════════════════════════════════════════════ */

.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: 780px; }
.shell--mid    { max-width: 1080px; }

.page { position: relative; z-index: 2; padding-block: clamp(1.5rem, 4vw, 3rem) 5rem; }

.stack     { display: flex; flex-direction: column; }
.stack-2   { gap: .5rem; }  .stack-3 { gap: .75rem; }
.stack-4   { gap: 1rem; }   .stack-5 { gap: 1.25rem; }
.stack-6   { gap: 1.5rem; } .stack-8 { gap: 2rem; }
.stack-10  { gap: 2.5rem; } .stack-12 { gap: 3rem; }

.row { display: flex; align-items: center; gap: .75rem; }
.row--wrap  { flex-wrap: wrap; }
.row--tight { gap: .4rem; }
.row--loose { gap: 1.25rem; }
.row--between { justify-content: space-between; }
.row--end   { justify-content: flex-end; }
.row--center { justify-content: center; }
.row--top   { align-items: flex-start; }
.row--baseline { align-items: baseline; }

.grow  { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--posters {
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 20vw, 200px), 1fr));
  /* Lets the browser skip layout+paint for grid rows still far off-screen */
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.divider { height: 1px; background: var(--hairline); border: 0; }

/* Horizontal rail with snap points — the discovery rows */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 22vw, 196px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  padding-block: .25rem 1rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   07  BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.35rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform var(--t-fast) var(--ease-spring),
    box-shadow var(--t-base) var(--ease-out),
    background-color var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out),
    opacity var(--t-base) var(--ease-out);
}

.btn:active:not(:disabled) { transform: scale(.965); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.btn .icon { width: 1.05em; height: 1.05em; }

/* Light sweep on hover — pure transform, so it costs nothing */
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%; height: 100%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: translate3d(-130%, 0, 0) skewX(-18deg);
  opacity: 0;
}
.btn:hover:not(:disabled)::after { opacity: 1; animation: sheen-sweep 750ms var(--ease-out); }

/* Primary — gold */
.btn--primary {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--text-on-gold);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .38);
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* Ghost — hairline on glass */
.btn--ghost {
  background: var(--surface);
  border-color: var(--hairline-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Quiet — text-only */
.btn--quiet { padding-inline: .8rem; color: var(--text-muted); }
.btn--quiet:hover:not(:disabled) { color: var(--accent); background: var(--accent-wash); }

.btn--danger {
  background: linear-gradient(135deg, var(--crimson-soft), var(--crimson));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 10px 34px -14px rgba(229, 72, 77, .55);
}

.btn--outline-danger { border-color: rgba(229, 72, 77, .4); color: var(--crimson-soft); background: rgba(229, 72, 77, .07); }
.btn--outline-danger:hover:not(:disabled) { background: rgba(229, 72, 77, .16); border-color: var(--crimson); }

.btn--sm { padding: .48rem .95rem; font-size: .8rem; }
.btn--lg { padding: .95rem 1.9rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* Icon-only, circular */
.btn--icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  border-color: var(--hairline);
  color: var(--text-soft);
}
.btn--icon:hover:not(:disabled) { background: var(--surface-hover); color: var(--accent); border-color: var(--hairline-strong); }
.btn--icon .icon { width: 18px; height: 18px; }
.btn--icon.btn--sm { width: 32px; height: 32px; }
.btn--icon.btn--sm .icon { width: 15px; height: 15px; }

/* Material-style ripple; JS positions --rx/--ry at the click point */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  pointer-events: none;
  width: 12px; height: 12px;
  left: var(--rx); top: var(--ry);
  margin: -6px 0 0 -6px;
  animation: ripple-out 620ms var(--ease-out) forwards;
}

/* Inline spinner replacing the label while a form is submitting */
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy > * { opacity: 0; }
.btn.is-busy::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 17px; height: 17px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--text-on-gold);
  animation: spin 620ms linear infinite;
}
.btn--ghost.is-busy::before, .btn--quiet.is-busy::before { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   08  FORMS
   ═══════════════════════════════════════════════════════════════════════════ */

.field { position: relative; display: flex; flex-direction: column; gap: .45rem; }

.field__label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-base) var(--ease-out);
}
.field:focus-within .field__label { color: var(--accent); }

.field__wrap { position: relative; display: flex; align-items: center; }

.input, .select, .textarea {
  width: 100%;
  padding: .82rem 1rem;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: .95rem;
  transition:
    border-color var(--t-base) var(--ease-out),
    background-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }

/* The app draws its own clear button, so suppress the browser's — two overlapping
   crosses in one field is a bug, not a feature. */
.input[type="search"] { appearance: none; -webkit-appearance: none; }
.input[type="search"]::-webkit-search-cancel-button,
.input[type="search"]::-webkit-search-decoration,
.input[type="search"]::-webkit-search-results-button { appearance: none; -webkit-appearance: none; display: none; }

.input:hover, .select:hover { border-color: var(--hairline-strong); background: var(--surface-hover); }

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: 0 0 0 4px var(--accent-wash);
}

.field--icon .input { padding-left: 2.85rem; }
.field__icon {
  position: absolute;
  left: 1rem;
  width: 18px; height: 18px;
  color: var(--text-faint);
  pointer-events: none;
  transition: color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-spring);
}
.field:focus-within .field__icon { color: var(--accent); transform: scale(1.1); }

.field__suffix {
  position: absolute;
  right: .5rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A8195' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right .95rem center;
  background-size: 15px;
  cursor: pointer;
}

.textarea { min-height: 110px; resize: vertical; }

.field.has-error .input,
.field.has-error .select { border-color: var(--danger); background: rgba(229, 72, 77, .06); }
.field.has-error .input:focus { box-shadow: 0 0 0 4px rgba(229, 72, 77, .14); }

.field__error {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: .78rem;
  color: var(--crimson-soft);
  animation: fade-up var(--t-base) var(--ease-out) both;
}
.field__error .icon { width: 14px; height: 14px; flex-shrink: 0; margin-top: .15em; }

.field__hint { font-size: .76rem; color: var(--text-faint); }

/* Password strength meter */
.strength { display: flex; gap: 4px; margin-top: .1rem; }
.strength__seg {
  flex: 1;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  transform-origin: left;
  transition: background-color var(--t-base) var(--ease-out);
}
.strength__seg.is-on { background: var(--warning); }
.strength[data-level="3"] .strength__seg.is-on { background: var(--accent); }
.strength[data-level="4"] .strength__seg.is-on { background: var(--success); }

/* Custom checkbox with an SVG tick that draws itself */
.check { display: inline-flex; align-items: flex-start; gap: .6rem; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  position: relative;
  flex-shrink: 0;
  width: 19px; height: 19px;
  margin-top: .12em;
  border: 1.5px solid var(--hairline-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  transition: background-color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.check:hover .check__box { border-color: var(--accent); }
.check input:focus-visible + .check__box { box-shadow: var(--focus-ring); }
.check__box svg {
  position: absolute;
  inset: 2px;
  width: 13px; height: 13px;
  stroke: var(--text-on-gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}
.check input:checked + .check__box {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}
.check input:checked + .check__box svg { animation: draw-check 320ms var(--ease-out) forwards; }
.check__text { font-size: .85rem; color: var(--text-soft); line-height: 1.5; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch__track {
  width: 42px; height: 24px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  transition: background-color var(--t-base) var(--ease-out);
}
.switch__dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--t-base) var(--ease-spring), background-color var(--t-base) var(--ease-out);
}
.switch input:checked + .switch__track { background: var(--accent-wash); border-color: var(--accent); }
.switch input:checked + .switch__track .switch__dot { transform: translateX(18px); background: var(--accent); }

/* Honeypot — off-screen, never `display:none` (bots read that) */
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   09  CARDS & SURFACES
   ═══════════════════════════════════════════════════════════════════════════ */

.card {
  position: relative;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
.card--pad   { padding: clamp(1.1rem, 2.2vw, 1.75rem); }
.card--tight { padding: 1rem; }

.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--hairline-strong); }

/* Frosted glass — used by the auth card and the navbar */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .022));
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}
html[data-theme="light"] .glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .66));
}

/* Animated gradient hairline around a surface */
.ring-gold {
  position: relative;
}
.ring-gold::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--accent), transparent 38%, transparent 62%, var(--accent-lo));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
  pointer-events: none;
}

/* Stat tile with a count-up number */
.stat {
  position: relative;
  /* An explicit column: the children are spans, which would otherwise flow
     inline and run the label, value and meta together on one line. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--t-slow) var(--ease-out);
}
.stat:hover { transform: translateY(-3px); border-color: var(--hairline-strong); box-shadow: var(--shadow-md); }
.stat:hover::before { transform: scaleY(1); }
.stat__label { font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); }
.stat__value { font-family: 'Bebas Neue', 'Outfit', sans-serif; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1; letter-spacing: .01em; }
.stat__meta  { font-size: .74rem; color: var(--text-faint); }
.stat--gold .stat__value  { color: var(--accent); }
.stat--danger .stat__value { color: var(--crimson-soft); }
.stat--danger::before { background: var(--crimson); }
.stat--success .stat__value { color: var(--success); }
.stat--success::before { background: var(--success); }

/* Pure-CSS sparkline: bars sized from an inline --h custom property */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; }
.spark__bar {
  flex: 1;
  min-height: 2px;
  height: calc(var(--h, 0) * 1%);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-lo));
  opacity: .75;
  transform-origin: bottom;
  animation: scale-in-y var(--t-slower) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 28ms);
  transition: opacity var(--t-fast) var(--ease-out);
}
.spark:hover .spark__bar { opacity: .45; }
.spark__bar:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   10  MOVIE CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.mcard {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  background: var(--bg-elev-2);
  /* JS writes --tx/--ty (degrees) from pointer position for the 3D tilt */
  transform: perspective(900px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease-out);
}
.mcard:hover { box-shadow: var(--shadow-lg); }
.mcard.is-tilting { transition: transform 90ms linear, box-shadow var(--t-slow) var(--ease-out); }

.mcard__poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-800) linear-gradient(135deg, var(--ink-800), var(--ink-700));
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.mcard__img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Blur-up reveal: JS adds .is-loaded once the bitmap decodes */
  opacity: 0;
  transform: scale(1.06);
  filter: blur(12px);
  transition: opacity var(--t-slower) var(--ease-out), transform var(--t-slower) var(--ease-out), filter var(--t-slower) var(--ease-out);
}
.mcard__img.is-loaded { opacity: 1; transform: scale(1); filter: blur(0); }
.mcard:hover .mcard__img.is-loaded { transform: scale(1.07); }

/* Gradient scrim that rises on hover */
.mcard__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 7, 11, .94) 0%, rgba(6, 7, 11, .62) 34%, transparent 72%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.mcard:hover .mcard__scrim, .mcard:focus-within .mcard__scrim { opacity: 1; }

.mcard__overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .85rem;
  transform: translateY(14px);
  opacity: 0;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out);
}
.mcard:hover .mcard__overlay, .mcard:focus-within .mcard__overlay { transform: translateY(0); opacity: 1; }

.mcard__actions { display: flex; gap: .4rem; }

.mcard__top {
  position: absolute;
  inset: .6rem .6rem auto .6rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .4rem;
  pointer-events: none;
}
.mcard__top > * { pointer-events: auto; }

.mcard__body { padding: .7rem .25rem .2rem; }
.mcard__title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color var(--t-base) var(--ease-out);
}
.mcard:hover .mcard__title { color: var(--accent); }
.mcard__meta { display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--text-faint); }
.mcard__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* Heart / bookmark toggle */
.fav {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(6, 7, 11, .55);
  border: 1px solid var(--hairline-strong);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--t-fast) var(--ease-spring), background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
.fav .icon { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease-spring); }
.fav:hover { transform: scale(1.12); border-color: var(--crimson); color: var(--crimson-soft); }
.fav.is-on { background: rgba(229, 72, 77, .18); border-color: var(--crimson); color: var(--crimson); }
.fav.is-on .icon { fill: currentColor; }
.fav.just-toggled .icon { animation: heart-pop 520ms var(--ease-spring); }

/* Expanding ring emitted on activation */
.fav::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  pointer-events: none;
}
.fav.just-toggled::after { animation: ring-burst 620ms var(--ease-out); }

.fav--watch.is-on { background: rgba(75, 163, 245, .18); border-color: var(--sky); color: var(--sky); }
.fav--watch:hover { border-color: var(--sky); color: var(--sky); }

/* ═══════════════════════════════════════════════════════════════════════════
   11  BADGES, CHIPS, PILLS
   ═══════════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .22rem .58rem;
  border-radius: var(--r-xs);
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}
.badge .icon { width: 11px; height: 11px; }

.badge--gold    { background: var(--accent-wash); border-color: rgba(247, 195, 36, .35); color: var(--accent); }
.badge--danger  { background: rgba(229, 72, 77, .12); border-color: rgba(229, 72, 77, .34); color: var(--crimson-soft); }
.badge--success { background: rgba(53, 208, 138, .12); border-color: rgba(53, 208, 138, .32); color: var(--success); }
.badge--info    { background: rgba(75, 163, 245, .12); border-color: rgba(75, 163, 245, .32); color: var(--sky); }
.badge--warning { background: rgba(245, 165, 36, .12); border-color: rgba(245, 165, 36, .32); color: var(--warning); }
.badge--violet  { background: rgba(155, 107, 242, .13); border-color: rgba(155, 107, 242, .32); color: var(--violet); }

.badge--dot::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.badge--live::before { animation: pulse-glow 2s var(--ease-in-out) infinite; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .38rem .8rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: .8rem;
  color: var(--text-soft);
  transition: transform var(--t-fast) var(--ease-spring), background-color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out);
}
a.chip:hover, button.chip:hover { transform: translateY(-2px); background: var(--accent-wash); border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--text-on-gold); font-weight: 600; }

/* Segmented control */
.segments {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.segments__item {
  padding: .42rem 1rem;
  border-radius: var(--r-pill);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out);
}
.segments__item:hover { color: var(--text); }
.segments__item.is-active { background: var(--accent); color: var(--text-on-gold); font-weight: 600; }

/* Avatar with a gold gradient fallback */
.avatar {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-300), var(--gold-600));
  color: var(--text-on-gold);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar--sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar--photo { display: block; object-fit: cover; padding: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   12  STARS & RATING
   ═══════════════════════════════════════════════════════════════════════════ */

.stars { display: inline-flex; align-items: center; gap: .2rem; }

.stars__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-xs);
  color: var(--ink-500);
  transition: transform var(--t-fast) var(--ease-spring), color var(--t-fast) var(--ease-out);
}
.stars__btn .icon { width: 24px; height: 24px; }
.stars__btn:hover { transform: scale(1.18) translateY(-1px); }

/* Hover/selection fills every star up to the pointer */
.stars__btn.is-lit { color: var(--accent); }
.stars__btn.is-lit .icon { fill: currentColor; filter: drop-shadow(0 2px 8px var(--accent-glow)); }

.stars__btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  opacity: 0;
  pointer-events: none;
}
.stars__btn.just-set::after { animation: star-burst 640ms var(--ease-out); }
.stars__btn.just-set .icon { animation: pop-in 460ms var(--ease-spring); }

.stars--readonly .stars__btn { pointer-events: none; width: auto; height: auto; }
.stars--sm .stars__btn { width: 22px; height: 22px; }
.stars--sm .stars__btn .icon { width: 15px; height: 15px; }

/* Circular score gauge (conic-gradient, no SVG) */
.gauge {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px; height: 66px;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), var(--surface-strong) 0),
    var(--bg-elev-2);
  transition: transform var(--t-base) var(--ease-spring);
}
.gauge::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-elev-2);
}
.gauge:hover { transform: scale(1.06); }
.gauge__value { position: relative; font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; line-height: 1; }
.gauge--sm { width: 50px; height: 50px; }
.gauge--sm .gauge__value { font-size: .95rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   13  NAVBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  transition: background-color var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease-out), border-color var(--t-slow) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--nav-h);
  transition: height var(--t-slow) var(--ease-out);
}
.nav.is-stuck .nav__inner { height: 58px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand__mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--hairline);
  transition: transform var(--t-base) var(--ease-spring), box-shadow var(--t-base) var(--ease-out);
}
.brand:hover .brand__mark { transform: rotate(-7deg) scale(1.08); box-shadow: var(--shadow-md), var(--shadow-gold); }
.brand__name {
  font-family: 'Bebas Neue', 'Outfit', sans-serif;
  font-size: 1.32rem;
  letter-spacing: .045em;
  line-height: 1;
}

.nav__links { display: flex; align-items: center; gap: .15rem; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .8rem;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out);
}
.nav__link .icon { width: 16px; height: 16px; }
.nav__link:hover { color: var(--text); background: var(--surface); }

/* Underline that grows from the centre */
.nav__link::after {
  content: '';
  position: absolute;
  left: .8rem; right: .8rem; bottom: .18rem;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--t-base) var(--ease-out);
}
.nav__link:hover::after { transform: scaleX(.55); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after { transform: scaleX(1); }

/* Keep light-theme navigation text unobstructed. The active state is conveyed
   by text + underline; no gold fill is painted behind the label. */
html[data-theme="light"] .brand__name,
html[data-theme="light"] .nav__link.is-active {
  background-color: transparent;
  color: var(--gold-700);
}

.nav__count {
  min-width: 18px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--surface-strong);
  font-size: .66rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: var(--text-soft);
  transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out);
}
.nav__link.is-active .nav__count { background: var(--accent); color: var(--text-on-gold); }

.nav__spacer { flex: 1 1 auto; }

/* Theme toggle — sun and moon cross-fade + rotate */
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle .icon {
  position: absolute;
  transition: transform var(--t-slow) var(--ease-spring), opacity var(--t-base) var(--ease-out);
}
.theme-toggle .icon--sun  { transform: translateY(0) rotate(0); opacity: 1; }
.theme-toggle .icon--moon { transform: translateY(140%) rotate(-90deg); opacity: 0; }
html[data-theme="light"] .theme-toggle .icon--sun  { transform: translateY(-140%) rotate(90deg); opacity: 0; }
html[data-theme="light"] .theme-toggle .icon--moon { transform: translateY(0) rotate(0); opacity: 1; }

/* Bell + unread badge */
.bell { position: relative; }
.bell:hover .icon { animation: bell-swing 700ms var(--ease-in-out); }
.bell__badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--crimson);
  border: 2px solid var(--bg);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  animation: pop-in 380ms var(--ease-spring) both;
}

/* Dropdown panel */
.pop {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 70;
  width: min(340px, calc(100vw - 2rem));
  padding: .45rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  transform-origin: top right;
  opacity: 0;
  transform: scale(.95) translateY(-6px);
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-base) var(--ease-spring);
}
.pop.is-open { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
.pop--sm { width: min(230px, calc(100vw - 2rem)); }

.pop__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .7rem; }
.pop__body { max-height: min(58vh, 420px); overflow-y: auto; }
.pop__foot { padding: .35rem; border-top: 1px solid var(--hairline); margin-top: .25rem; }

.pop__item {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .58rem .7rem;
  border-radius: var(--r-sm);
  font-size: .87rem;
  color: var(--text-soft);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.pop__item:hover { background: var(--surface); color: var(--text); transform: translateX(2px); }
.pop__item .icon { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-faint); }
.pop__item:hover .icon { color: var(--accent); }
.pop__item.is-active { color: var(--accent); background: var(--accent-wash); }
.pop__item--danger:hover { background: rgba(229, 72, 77, .1); color: var(--crimson-soft); }
.pop__item--danger:hover .icon { color: var(--crimson-soft); }

/* Mobile drawer */
.nav__burger { display: none; }
.drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 55;
  padding: 1.25rem var(--gutter) 2rem;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.drawer.is-open { opacity: 1; transform: none; pointer-events: auto; }
.drawer .nav__link { width: 100%; padding: .85rem 1rem; font-size: 1rem; border-radius: var(--r-md); }
.drawer .nav__link::after { display: none; }
.drawer .nav__link.is-active { background: var(--accent-wash); }

/* Reading-progress bar pinned to the top edge */
.progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 90;
  height: 2px;
  width: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300), var(--gold-100));
  box-shadow: 0 0 10px var(--accent-glow);
  pointer-events: none;
  transition: transform 90ms linear, opacity var(--t-base) var(--ease-out);
}
.progress.is-idle { opacity: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   14  TOASTS
   ═══════════════════════════════════════════════════════════════════════════ */

.toasts {
  position: fixed;
  top: calc(var(--nav-h) + .75rem);
  left: 50%;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  width: min(420px, calc(100vw - 2rem));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .85rem 2.4rem .85rem .95rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  pointer-events: auto;
  animation: toast-in 480ms var(--ease-spring) both;
}
.toast.is-leaving { animation: toast-out 260ms var(--ease-out) forwards; }

.toast__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-strong);
}
.toast__icon .icon { width: 15px; height: 15px; }
.toast__text { flex: 1; font-size: .875rem; line-height: 1.45; }
.toast__close {
  position: absolute;
  top: .55rem; right: .55rem;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: var(--r-xs);
  color: var(--text-faint);
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.toast__close:hover { color: var(--text); background: var(--surface); }
.toast__close .icon { width: 13px; height: 13px; }

/* Life-time indicator that drains left to right */
.toast__bar {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: bar-drain var(--life, 4500ms) linear forwards;
}

.toast--success { border-color: rgba(53, 208, 138, .4); }
.toast--success .toast__icon { background: rgba(53, 208, 138, .16); color: var(--success); }
.toast--success .toast__bar { background: var(--success); }

.toast--error { border-color: rgba(229, 72, 77, .42); }
.toast--error .toast__icon { background: rgba(229, 72, 77, .16); color: var(--crimson-soft); }
.toast--error .toast__bar { background: var(--crimson); }

.toast--warning { border-color: rgba(245, 165, 36, .42); }
.toast--warning .toast__icon { background: rgba(245, 165, 36, .16); color: var(--warning); }
.toast--warning .toast__bar { background: var(--warning); }

.toast--info .toast__icon { background: rgba(75, 163, 245, .16); color: var(--sky); }
.toast--info .toast__bar { background: var(--sky); }

/* ═══════════════════════════════════════════════════════════════════════════
   15  MODAL & DIALOG
   ═══════════════════════════════════════════════════════════════════════════ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out);
}
.modal.is-open { opacity: 1; pointer-events: auto; }

.modal__veil {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 7, .74);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - var(--gutter) * 2);
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--bg-elev-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  transform: scale(.93) translateY(18px);
  opacity: 0;
  transition: transform var(--t-slow) var(--ease-spring), opacity var(--t-base) var(--ease-out);
}
.modal.is-open .modal__panel { transform: none; opacity: 1; }

.modal__panel--wide  { width: min(900px, 100%); }
.modal__panel--flush { padding: 0; overflow: hidden; background: #000; }

.modal__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  animation: pop-in 480ms var(--ease-spring) both;
}
.modal__icon .icon { width: 25px; height: 25px; }
.modal__icon--danger { background: rgba(229, 72, 77, .14); color: var(--crimson-soft); }
.modal__icon--warning { background: rgba(245, 165, 36, .14); color: var(--warning); }

.modal__title { font-size: 1.2rem; font-weight: 600; }
.modal__body { color: var(--text-muted); font-size: .93rem; line-height: 1.6; }
.modal__foot { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.5rem; }

.modal__close {
  position: absolute;
  top: .75rem; right: .75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(6, 7, 11, .6);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: transform var(--t-fast) var(--ease-spring), background-color var(--t-base) var(--ease-out);
}
.modal__close:hover { transform: rotate(90deg) scale(1.08); background: var(--crimson); }
.modal__close .icon { width: 15px; height: 15px; }

/* Trailer player — opens like a curtain */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal.is-open .modal__panel--flush { animation: curtain-open 620ms var(--ease-glide) both; }

body.is-locked { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════════
   16  SKELETONS & LOADERS
   ═══════════════════════════════════════════════════════════════════════════ */

.skel {
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: var(--r-sm);
}
.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  animation: shimmer 1.5s var(--ease-in-out) infinite;
}
html[data-theme="light"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); }

.skel--poster { aspect-ratio: 2 / 3; border-radius: var(--r-md); }
.skel--line { height: .72rem; }
.skel--line-sm { height: .6rem; width: 55%; }

.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--surface-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.spinner--lg { width: 40px; height: 40px; border-width: 3px; }

.dots { display: inline-flex; gap: 5px; align-items: flex-end; }
.dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-bounce 1.25s var(--ease-in-out) infinite;
}
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }

.sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 76px;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   17  EMPTY STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .8rem;
  padding: clamp(2.5rem, 8vw, 5rem) 1.5rem;
  animation: fade-up var(--t-slow) var(--ease-out) both;
}
.empty__art { position: relative; width: 116px; height: 116px; margin-bottom: .5rem; animation: float-y 5.5s var(--ease-in-out) infinite; }
.empty__title { font-size: 1.2rem; font-weight: 600; }
.empty__body { max-width: 46ch; color: var(--text-muted); font-size: .92rem; }

/* CSS-drawn film reel that turns slowly */
.reel {
  position: absolute;
  inset: 0;
  border: 6px solid var(--hairline-strong);
  border-radius: 50%;
  animation: reel-spin 14s linear infinite;
}
.reel::before, .reel::after,
.reel > i {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--hairline-strong);
}
.reel::before { top: 10px; left: 50%; margin-left: -12px; }
.reel::after  { bottom: 10px; left: 50%; margin-left: -12px; }
.reel > i:nth-child(1) { left: 10px; top: 50%; margin-top: -12px; }
.reel > i:nth-child(2) { right: 10px; top: 50%; margin-top: -12px; }
.reel__hub {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   18  TABLES
   ═══════════════════════════════════════════════════════════════════════════ */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--bg-elev-2);
}

.table { width: 100%; border-collapse: collapse; font-size: .875rem; }

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .85rem 1rem;
  background: var(--bg-elev-3);
  border-bottom: 1px solid var(--hairline);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}

.table tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }

/* Rows fade in with a stagger driven by an inline --i */
.table tbody tr {
  animation: fade-up 460ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 34ms);
  transition: background-color var(--t-fast) var(--ease-out);
}
.table tbody tr:hover { background: var(--surface); }

.table__num { text-align: right; font-variant-numeric: tabular-nums; }
.table__actions { display: flex; gap: .3rem; justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════════════════════════
   19  PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  margin-top: 2rem;
}
.pagination li { display: inline-flex; }
.pagination a, .pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 36px; height: 36px;
  padding: 0 .6rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: .84rem;
  color: var(--text-soft);
  transition: transform var(--t-fast) var(--ease-spring), background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
.pagination a:hover { transform: translateY(-2px); background: var(--accent-wash); border-color: var(--accent); color: var(--accent); }
.pagination .active span { background: var(--accent); border-color: var(--accent); color: var(--text-on-gold); font-weight: 600; }
.pagination .disabled span { opacity: .35; }

/* ═══════════════════════════════════════════════════════════════════════════
   20  NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.notif {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .7rem;
  border-radius: var(--r-sm);
  transition: background-color var(--t-fast) var(--ease-out);
}
.notif:hover { background: var(--surface); }
.notif__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--text-muted);
}
.notif__icon .icon { width: 15px; height: 15px; }
.notif--danger .notif__icon { background: rgba(229, 72, 77, .14); color: var(--crimson-soft); }
.notif--gold .notif__icon   { background: var(--accent-wash); color: var(--accent); }
.notif--info .notif__icon   { background: rgba(75, 163, 245, .14); color: var(--sky); }
.notif__title { font-size: .86rem; font-weight: 500; line-height: 1.4; }
.notif__meta  { font-size: .73rem; color: var(--text-faint); }
.notif.is-unread .notif__title { font-weight: 600; }
.notif.is-unread::after {
  content: '';
  width: 7px; height: 7px;
  margin-top: .5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   21  UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }
.mx-auto { margin-inline: auto; }
.w-full  { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.pointer-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.capitalize { text-transform: capitalize; }
.uppercase { text-transform: uppercase; letter-spacing: .06em; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }

.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--filled { fill: currentColor; stroke: none; }
.icon--sm { width: 15px; height: 15px; }
.icon--lg { width: 26px; height: 26px; }

.hide-sm { display: initial; }
.only-sm { display: none; }

.shake { animation: shake-x 480ms var(--ease-in-out); }
.float { animation: float-y 5s var(--ease-in-out) infinite; }

/* Notice banners */
.notice {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  font-size: .86rem;
  line-height: 1.55;
  animation: fade-up var(--t-base) var(--ease-out) both;
}
.notice .icon { flex-shrink: 0; margin-top: .1em; }
.notice--gold    { background: var(--accent-wash); border-color: rgba(247, 195, 36, .34); color: var(--accent); }
.notice--info    { background: rgba(75, 163, 245, .1); border-color: rgba(75, 163, 245, .3); color: var(--sky); }
.notice--danger  { background: rgba(229, 72, 77, .1); border-color: rgba(229, 72, 77, .32); color: var(--crimson-soft); }
.notice--success { background: rgba(53, 208, 138, .1); border-color: rgba(53, 208, 138, .3); color: var(--success); }
.notice strong   { color: var(--text); }

/* Copy-to-clipboard chip for temporary passwords / codes */
.copybox {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .8rem;
  border-radius: var(--r-md);
  background: var(--ink-900);
  border: 1px dashed var(--hairline-strong);
}
html[data-theme="light"] .copybox { background: var(--ink-050); }
.copybox code { flex: 1; font-size: 1rem; letter-spacing: .1em; color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   22  SCROLL REVEAL
   ═══════════════════════════════════════════════════════════════════════════ */

/* JS toggles .is-in when the element crosses the viewport threshold, so no
   animation runs for content the visitor never scrolls to. */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity var(--t-slower) var(--ease-out),
    transform var(--t-slower) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal="left"]  { transform: translate3d(-26px, 0, 0); }
[data-reveal="right"] { transform: translate3d(26px, 0, 0); }
[data-reveal="scale"] { transform: scale(.95); }
[data-reveal="blur"]  { filter: blur(8px); transition-property: opacity, transform, filter; }

[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* Cards appended by infinite scroll animate in on their own */
.card-enter { animation: fade-up 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* ═══════════════════════════════════════════════════════════════════════════
   23  RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .nav__links.nav__links--main { display: none; }
  .nav__burger { display: inline-grid; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  body { font-size: 14.5px; }
  .hide-sm { display: none; }
  .only-sm { display: initial; }
  .grid--posters { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .8rem; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
  .toasts { top: auto; bottom: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   24  REDUCED MOTION & PRINT
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  /* Ambient motion is decorative — remove it entirely rather than shortening */
  .aurora__blob, .grain, .glint::after, .float, .empty__art, .reel { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .mcard { transform: none !important; }
}

@media print {
  .aurora, .grain, .vignette, .nav, .toasts, .modal, .progress { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .table-wrap { box-shadow: none; border-color: #ccc; }
}

/* Skeleton stand-in for a poster card while a page of results is in flight */
.skel-card { display: block; }
