/* ==========================================================================
   NeonFilmyCab — main.css
   Design tokens, base, layout primitives, buttons, badges, panels.
   Shared 1:1 by the WordPress theme and the live Next.js preview.
   ========================================================================== */

:root {
  --fmc-bg: #05060d;
  --fmc-bg-2: #090b16;
  --fmc-surface: #0c0f1d;
  --fmc-surface-2: #12162b;
  --fmc-tile: #0e1224;
  --fmc-line: rgba(148, 163, 255, 0.14);
  --fmc-line-strong: rgba(148, 163, 255, 0.26);
  --fmc-text: #eef1ff;
  --fmc-muted: #98a0bf;
  --fmc-dim: #6b7390;

  --fmc-cyan: #00d9ff;
  --fmc-purple: #a855f7;
  --fmc-pink: #ff2e88;
  --fmc-yellow: #ffd60a;
  --fmc-green: #22c55e;
  --fmc-orange: #fb923c;
  --fmc-red: #ef4444;
  --fmc-blue: #3b82f6;

  --q480: #a855f7;
  --q720: #00d9ff;
  --q1080: #ff2e88;
  --q2160: #ffd60a;

  --font-display: "Sora", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", ui-sans-serif, system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --header-h: 64px;
  --movie-accent: var(--fmc-cyan);
  --shell: 1280px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Hard viewport containment: nothing may scroll the page sideways.
   `clip` (unlike `hidden`) never creates a scroll container, so
   position: sticky keeps working. */
html { overflow-x: clip; }
@supports not (overflow-x: clip) {
  html { overflow-x: hidden; }
}

body {
  margin: 0;
  background: var(--fmc-bg);
  color: var(--fmc-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  max-width: 100%;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
@supports not (overflow-x: clip) {
  body { overflow-x: hidden; }
}

img, svg, video, iframe { max-width: 100%; }

/* Ambient cinematic backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(168, 85, 247, 0.16), transparent 60%),
    radial-gradient(800px 420px at -10% 12%, rgba(0, 217, 255, 0.10), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 46, 136, 0.08), transparent 60%),
    var(--fmc-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

::selection { background: rgba(0, 217, 255, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--fmc-bg); }
::-webkit-scrollbar-thumb { background: #232a45; border-radius: 99px; border: 2px solid var(--fmc-bg); }
::-webkit-scrollbar-thumb:hover { background: #33406b; }

:focus-visible {
  outline: 2px solid var(--fmc-cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

.fmc-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: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--fmc-cyan); color: #041018; font-weight: 800;
  padding: 10px 16px; border-radius: 10px; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */

.fmc-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 16px;
  min-width: 0;
}

/* Grid/flex children must be allowed to shrink below content width,
   otherwise long titles or meta strings push the layout sideways. */
.fmc-grid > *, .fmc-info-grid > *, .fmc-meta-strip > *,
.fmc-single__hero > *, .fmc-hero__inner > *, .fmc-dl-row > * { min-width: 0; }

.fmc-main { min-height: 60vh; padding-bottom: 56px; }

.fmc-section { padding-block: 26px; }

.fmc-section__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 16px;
}

.fmc-section__title {
  font-size: clamp(22px, 4.6vw, 30px);
  font-weight: 800;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}

.fmc-section__title .t-accent-orange { color: var(--fmc-orange); }
.fmc-section__title .t-accent-grad {
  background: linear-gradient(92deg, var(--fmc-purple), var(--fmc-pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fmc-section__title .t-accent-cyan { color: var(--fmc-cyan); }

.fmc-section__link {
  font-weight: 700; font-size: 14px; color: var(--fmc-cyan);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: gap .2s ease, color .2s ease;
}
.fmc-section__link:hover { gap: 10px; color: #7ceaff; }

/* ---------- Buttons ---------- */

.fmc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
  will-change: transform;
}
.fmc-btn:active { transform: scale(.97); }

.fmc-btn--accent {
  color: var(--movie-accent);
  border-color: color-mix(in srgb, var(--movie-accent) 65%, transparent);
  background: color-mix(in srgb, var(--movie-accent) 10%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--movie-accent) 22%, transparent),
    inset 0 0 14px color-mix(in srgb, var(--movie-accent) 8%, transparent);
}
.fmc-btn--accent:hover {
  background: color-mix(in srgb, var(--movie-accent) 20%, transparent);
  box-shadow: 0 0 26px color-mix(in srgb, var(--movie-accent) 40%, transparent);
  transform: translateY(-2px);
}

.fmc-btn--solid {
  background: var(--movie-accent); color: #051018; font-weight: 800;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--movie-accent) 40%, transparent);
}
.fmc-btn--solid:hover { transform: translateY(-2px); filter: brightness(1.08); }

.fmc-cta {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(15px, 2.4vw, 18px);
  color: var(--movie-accent, var(--fmc-yellow));
  background: color-mix(in srgb, var(--movie-accent, var(--fmc-yellow)) 12%, rgba(8, 10, 20, .6));
  border: 2px solid color-mix(in srgb, var(--movie-accent, var(--fmc-yellow)) 80%, transparent);
  border-radius: 14px; padding: 15px 22px;
  box-shadow: 0 0 26px color-mix(in srgb, var(--movie-accent, var(--fmc-yellow)) 28%, transparent),
    inset 0 0 22px color-mix(in srgb, var(--movie-accent, var(--fmc-yellow)) 10%, transparent);
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease;
}
.fmc-cta:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--movie-accent, var(--fmc-yellow)) 22%, rgba(8, 10, 20, .5));
  box-shadow: 0 0 40px color-mix(in srgb, var(--movie-accent, var(--fmc-yellow)) 45%, transparent);
}
.fmc-cta .fmc-cta__chev { margin-left: auto; opacity: .9; }
.fmc-cta .fmc-cta__play { flex: 0 0 auto; }

/* Quality pills — fixed palette per quality (reference design) */
.fmc-qrow { display: flex; flex-wrap: wrap; gap: 10px; }

.fmc-qbtn {
  --qc: var(--q720);
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
  color: var(--qc);
  border: 2px solid color-mix(in srgb, var(--qc) 85%, transparent);
  background: color-mix(in srgb, var(--qc) 9%, transparent);
  border-radius: 12px; padding: 9px 18px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--qc) 22%, transparent);
  transition: transform .16s ease, box-shadow .22s ease, background .2s ease;
}
.fmc-qbtn:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--qc) 20%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--qc) 45%, transparent); }
.fmc-qbtn--480 { --qc: var(--q480); }
.fmc-qbtn--720 { --qc: var(--q720); }
.fmc-qbtn--1080 { --qc: var(--q1080); }
.fmc-qbtn--2160 { --qc: var(--q2160); }
.fmc-qbtn--lg { font-size: 16px; padding: 12px 26px; border-radius: 13px; }

/* ---------- Badges ---------- */

.fmc-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px;
  letter-spacing: .04em; padding: 5px 11px; border-radius: 8px;
  background: rgba(10, 12, 24, .82); border: 1px solid var(--fmc-line-strong);
  color: var(--fmc-text); backdrop-filter: blur(6px);
}
.fmc-badge--new { background: var(--fmc-cyan); border-color: var(--fmc-cyan); color: #03131c; font-weight: 800; box-shadow: 0 0 16px rgba(0, 217, 255, .55); }
.fmc-badge--imdb { background: var(--fmc-yellow); border-color: var(--fmc-yellow); color: #191203; font-weight: 800; }
.fmc-badge--imdb .star { color: #191203; }
.fmc-badge--type { color: var(--movie-accent); border-color: color-mix(in srgb, var(--movie-accent) 60%, transparent); background: color-mix(in srgb, var(--movie-accent) 12%, rgba(8,10,20,.7)); }
.fmc-badge--year { color: var(--movie-accent); border-color: color-mix(in srgb, var(--movie-accent) 55%, transparent); background: color-mix(in srgb, var(--movie-accent) 12%, rgba(8,10,20,.75)); }

/* ---------- Panels ---------- */

.fmc-panel {
  background: linear-gradient(180deg, rgba(18, 22, 43, .72), rgba(10, 12, 26, .86));
  border: 1px solid var(--fmc-line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.fmc-panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.fmc-panel__icon {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(0, 217, 255, .18), rgba(168, 85, 247, .22));
  border: 1px solid var(--fmc-line-strong); color: var(--fmc-cyan);
}
.fmc-panel__title { font-size: 20px; font-weight: 800; position: relative; padding-bottom: 8px; }
.fmc-panel__title::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 118px;
  border-radius: 99px; background: linear-gradient(90deg, var(--fmc-purple), var(--fmc-pink));
}

/* Info tiles */
.fmc-info-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fmc-info-tile {
  display: flex; gap: 12px; align-items: center;
  background: var(--fmc-tile); border: 1px solid var(--fmc-line);
  border-radius: 12px; padding: 12px 14px;
  transition: border-color .2s ease, transform .2s ease;
}
.fmc-info-tile:hover { border-color: var(--fmc-line-strong); transform: translateY(-1px); }
.fmc-info-tile--wide { grid-column: 1 / -1; }
.fmc-info-tile__icon {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--tc, var(--fmc-cyan));
  background: color-mix(in srgb, var(--tc, var(--fmc-cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc, var(--fmc-cyan)) 32%, transparent);
}
.fmc-info-tile__label { display: block; font-size: 12px; color: var(--fmc-muted); font-weight: 600; }
.fmc-info-tile__value { display: block; font-size: 15px; font-weight: 700; color: var(--fmc-text); line-height: 1.4; }

/* Meta strip (single post quick facts) */
.fmc-meta-strip {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: rgba(10, 12, 24, .78); border: 1px solid var(--fmc-line);
  border-radius: var(--radius); padding: 6px 4px;
}
.fmc-meta-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; position: relative; }
/* Mobile 2x2: vertical divider on the right column, row separator below */
.fmc-meta-item:nth-child(even)::before {
  content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 1px;
  background: var(--fmc-line);
}
.fmc-meta-item:nth-child(n+3) { border-top: 1px solid var(--fmc-line); }
.fmc-meta-item__icon { color: var(--tc, var(--fmc-blue)); flex: 0 0 auto; }
.fmc-meta-item__value { display: block; font-weight: 800; font-size: 14.5px; font-family: var(--font-display); }
.fmc-meta-item__label { display: block; font-size: 12px; color: var(--fmc-muted); }

/* Trust strip */
.fmc-trust {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--fmc-purple) 40%, transparent);
  background: color-mix(in srgb, var(--fmc-purple) 8%, rgba(9, 11, 22, .7));
  border-radius: 999px; padding: 12px 22px; margin: 22px auto 0; max-width: 560px;
  font-weight: 700; font-size: 14px;
}
.fmc-trust .dot { color: var(--fmc-purple); }
.fmc-trust .shield { color: var(--fmc-green); }
.fmc-trust .crown { color: var(--fmc-yellow); }

/* ---------- Rich content (WP the_content) ---------- */

.fmc-content { color: #ccd3ec; font-size: 16px; line-height: 1.85; }
.fmc-content p { margin: 0 0 1.1em; }
.fmc-content h2, .fmc-content h3, .fmc-content h4 { color: #fff; margin: 1.4em 0 .6em; }
.fmc-content h2 { font-size: 22px; }
.fmc-content h3 { font-size: 19px; }
.fmc-content ul, .fmc-content ol { margin: 0 0 1.1em; padding-left: 22px; }
.fmc-content li { margin-bottom: .45em; }
.fmc-content li::marker { color: var(--movie-accent, var(--fmc-cyan)); }
.fmc-content a { color: var(--movie-accent, var(--fmc-cyan)); text-decoration: underline; text-underline-offset: 3px; }
.fmc-content blockquote {
  margin: 1.2em 0; padding: 14px 18px; border-left: 3px solid var(--movie-accent, var(--fmc-cyan));
  background: rgba(255, 255, 255, .03); border-radius: 0 12px 12px 0; font-style: italic; color: #b9c1de;
}
.fmc-content img { border-radius: 12px; }
.fmc-content strong { color: #fff; }

/* ---------- Pagination / load more ---------- */

.fmc-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 30px; }
.fmc-pagination a, .fmc-pagination span {
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  border: 1px solid var(--fmc-line); background: var(--fmc-surface);
  color: var(--fmc-muted); transition: all .2s ease;
}
.fmc-pagination a:hover { color: var(--fmc-cyan); border-color: color-mix(in srgb, var(--fmc-cyan) 55%, transparent); }
.fmc-pagination .current {
  background: color-mix(in srgb, var(--fmc-cyan) 16%, var(--fmc-surface));
  border-color: var(--fmc-cyan); color: var(--fmc-cyan);
  box-shadow: 0 0 16px rgba(0, 217, 255, .28);
}

.fmc-loadmore {
  margin: 28px auto 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 34px; border-radius: 999px; width: min(100%, 320px);
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  color: var(--fmc-cyan); border: 2px solid color-mix(in srgb, var(--fmc-cyan) 60%, transparent);
  background: color-mix(in srgb, var(--fmc-cyan) 8%, transparent);
  box-shadow: 0 0 20px rgba(0, 217, 255, .18);
  transition: all .22s ease;
}
.fmc-loadmore:hover { background: color-mix(in srgb, var(--fmc-cyan) 18%, transparent); box-shadow: 0 0 30px rgba(0, 217, 255, .35); }
.fmc-loadmore[disabled] { opacity: .55; cursor: progress; }
.fmc-loadmore .spin { animation: fmc-spin 0.9s linear infinite; }
@keyframes fmc-spin { to { transform: rotate(360deg); } }

/* Scroll reveal */
.fmc-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.fmc-reveal.is-in { opacity: 1; transform: none; }

/* Empty state */
.fmc-empty {
  text-align: center; padding: 60px 20px; border: 1px dashed var(--fmc-line-strong);
  border-radius: var(--radius-lg); color: var(--fmc-muted);
}
.fmc-empty svg { margin: 0 auto 14px; color: var(--fmc-purple); }
.fmc-empty h3 { color: #fff; font-size: 20px; margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fmc-reveal { opacity: 1; transform: none; }
}
