/* ═══════════════════════════════════════════════════════════════════
   CYNEFLIX V32 — CENTRAL DESIGN TOKENS
   Strict dark + red identity. No purple, blue, green, cyan, orange,
   yellow, or pink in the application UI.
   Posters / external artwork keep their natural colors.
   Load this BEFORE any other stylesheet so tokens win.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── Backgrounds ─────────────────────────────────────────────── */
  --v32-bg:        #080808;   /* main background                */
  --v32-bg-2:      #111111;   /* secondary background           */
  --v32-surface:   #191919;   /* elevated surfaces             */
  --v32-surface-2: #1f1f1f;   /* raised surface                */

  /* ── Red identity ──────────────────────────────────────────── */
  --v32-red:       #E50914;   /* primary red                   */
  --v32-red-dark:  #B20710;   /* dark red                      */
  --v32-red-bright:#FF303A;   /* bright red accent             */

  /* ── Text ───────────────────────────────────────────────────── */
  --v32-text:      #FFFFFF;   /* primary text                  */
  --v32-text-2:    #B3B3B3;   /* secondary text                */
  --v32-text-muted:#777777;   /* muted text                    */

  /* ── Borders ───────────────────────────────────────────────── */
  --v32-border:   #292929;

  /* ── Alias the legacy token names onto the V32 palette so the
     existing stylesheet keeps working with the corrected values. ── */
  --bg:        var(--v32-bg);
  --bg2:       var(--v32-bg-2);
  --bg3:       var(--v32-surface);
  --bg4:       var(--v32-surface-2);
  --surface:   var(--v32-surface);
  --modal-bg:  var(--v32-bg-2);

  --text:        var(--v32-text);
  --text-muted:  var(--v32-text-2);
  --text-dim:    var(--v32-text-muted);
  --mt:          var(--v32-text-2);

  --accent:      var(--v32-red);
  --accent-h:    var(--v32-red-bright);
  --accent-dim:  rgba(229, 9, 20, .13);
  --acc:         var(--v32-red);
  --glow:        rgba(229, 9, 20, .42);

  /* ── Retired non-red accents. Reset to red so no component can
     accidentally render blue/green/purple. ── */
  --gold:    var(--v32-red);
  --green:   var(--v32-red-bright);
  --blue:    var(--v32-red-dark);

  /* ── Links (standardized across the app) ───────────────────── */
  /* Normal links: white / gray. Red reserved for interactive emphasis. */
  --v32-link:        var(--v32-text);
  --v32-link-hover:  var(--v32-red-bright);
  --v32-link-visited:var(--v32-text-2);
  --v32-link-active: var(--v32-red);
  --v32-link-focus:  var(--v32-red-bright);
  --v32-link-disabled: var(--v32-text-muted);
}

/* ── Standardize ALL links globally (remove browser-default blue/purple) ── */
a {
  color: var(--v32-link);
  text-decoration: none;
  transition: color var(--t, .25s cubic-bezier(.22,1,.36,1));
}
a:hover      { color: var(--v32-link-hover); }
a:active     { color: var(--v32-link-active); }
a:visited    { color: var(--v32-link-visited); }
a:focus-visible {
  outline: 2px solid var(--v32-link-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
a[disabled], a.disabled, a[aria-disabled="true"] {
  color: var(--v32-link-disabled);
  pointer-events: none;
  opacity: .6;
}

/* ── Badges: force red family (no blue TV badge, no purple anime badge) ── */
.badge-tv { background: var(--v32-red-dark) !important; color: #fff !important; }
.badge-a  { background: var(--v32-red) !important;    color: #fff !important; }
.badge-m  { background: var(--v32-red) !important;    color: #fff !important; }

/* ── Rating chips stay in the red family ── */
.rg, .ro, .rb {
  background: rgba(229, 9, 20, .15) !important;
  color: var(--v32-red-bright) !important;
}

/* ── Focus rings for buttons/interactive controls ── */
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--v32-red-bright);
  outline-offset: 2px;
}

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