/* =========================================================
   CINEMA — design tokens
   Palette:
     --bg        #0B0B0F  near-black, blue-tinted
     --surface   #16161C  card surface
     --surface-2 #1E1E26  raised surface
     --gold      #E8B54A  marquee / projector light
     --gold-2    #F7D68A  bright bulb highlight
     --red       #C1443C  velvet curtain accent
     --ink       #F2F0E8  warm off-white text
     --ink-dim   #9C9AA5  muted text
   Type:
     Display  — "Bebas Neue" (condensed marquee headline)
     Body     — "Inter"
     Utility  — "JetBrains Mono" (ticket-stub numerics)
   ========================================================= */

:root {
  --bg: #0b0b0f;
  --surface: #16161c;
  --surface-2: #1e1e26;
  --gold: #e8b54a;
  --gold-2: #f7d68a;
  --red: #c1443c;
  --ink: #f2f0e8;
  --ink-dim: #9c9aa5;
  --border: rgba(242, 240, 232, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle film-grain atmosphere over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

h1, h2, h3, .display {
  font-family: "Bebas Neue", "Inter", sans-serif;
  letter-spacing: 0.02em;
  font-weight: 400;
  line-height: 0.95;
  margin: 0;
}

.mono { font-family: "JetBrains Mono", monospace; letter-spacing: 0.02em; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--gold); color: #16161c; }

/* focus visibility (accessibility floor) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------------- layout shell ---------------- */

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ---------------- header ---------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  transition: background var(--ease) .3s, backdrop-filter var(--ease) .3s, padding var(--ease) .3s;
}

.site-header.scrolled {
  background: rgba(11, 11, 15, 0.85);
  backdrop-filter: blur(10px);
  padding: 14px 32px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 28px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo span { color: var(--gold); }

.admin-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-dim);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: all var(--ease) .25s;
}
.admin-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 181, 74, 0.08);
}

/* ---------------- hero slider ---------------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--surface);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s var(--ease), transform 6s var(--ease);
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide .backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11,11,15,0.15) 0%, rgba(11,11,15,0.55) 55%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11,11,15,0.9) 0%, rgba(11,11,15,0.15) 55%);
}

.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 12%;
  z-index: 2;
  padding: 0 32px;
  max-width: 720px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(14px);
  animation: rise .7s var(--ease) .15s forwards;
}
.hero-eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
}

.hero-title {
  font-size: clamp(42px, 7vw, 92px);
  color: var(--ink);
  text-shadow: 0 8px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(24px);
  animation: rise .8s var(--ease) .25s forwards;
}

.hero-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 16px 0;
  color: var(--ink-dim);
  font-size: 14px;
  opacity: 0;
  transform: translateY(14px);
  animation: rise .7s var(--ease) .35s forwards;
}
.hero-meta .rating { color: var(--gold-2); }

.hero-overview {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 26px;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: rise .7s var(--ease) .45s forwards;
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: #16161c;
  border: none;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(14px);
  animation: rise .7s var(--ease) .55s forwards;
  transition: transform var(--ease) .25s, box-shadow var(--ease) .25s, background var(--ease) .25s;
}
.btn-play:hover {
  transform: translateY(-2px);
  background: var(--gold-2);
  box-shadow: 0 10px 30px rgba(232, 181, 74, 0.35);
}
.btn-play svg { width: 16px; height: 16px; }

.hero-nav {
  position: absolute;
  right: 32px;
  bottom: 12%;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 34px; height: 3px;
  background: rgba(242,240,232,0.25);
  border: none;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  transition: background var(--ease) .2s;
}
.hero-dot.active { background: rgba(242,240,232,0.35); }
.hero-dot span {
  position: absolute; inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}
.hero-dot.active span { animation: fill-dot 6s linear forwards; }
@keyframes fill-dot { to { transform: scaleX(1); } }

.hero-arrows {
  position: absolute;
  bottom: 40px; left: 32px;
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(22,22,28,0.5);
  backdrop-filter: blur(6px);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--ease) .25s;
}
.hero-arrow:hover { border-color: var(--gold); color: var(--gold); transform: scale(1.06); }

/* ---------------- sprocket divider (signature element) ---------------- */

.sprocket {
  height: 34px;
  background: var(--bg);
  background-image:
    radial-gradient(circle, var(--surface-2) 5px, transparent 5.5px);
  background-size: 34px 34px;
  background-position: 17px center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 3;
}

/* ---------------- sections ---------------- */

section.content { padding: 64px 0 40px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title { font-size: 40px; color: var(--ink); }
.section-title .count { color: var(--gold); }
.section-sub { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }

/* ---------------- poster grid ---------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px;
}

.poster-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 2 / 3;
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  animation: card-in .6s var(--ease) forwards;
  transition: transform var(--ease) .35s, box-shadow var(--ease) .35s;
  border: 1px solid var(--border);
}
@keyframes card-in { to { opacity: 1; transform: translateY(0); } }

.poster-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow);
  z-index: 2;
}

.poster-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease) .5s, filter var(--ease) .5s;
}
.poster-card:hover img { transform: scale(1.08); filter: brightness(0.55); }

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(180deg, transparent 40%, rgba(11,11,15,0.95) 100%);
  opacity: 0;
  transition: opacity var(--ease) .3s;
}
.poster-card:hover .poster-overlay { opacity: 1; }

.poster-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: #16161c;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: all var(--ease) .3s;
}
.poster-card:hover .poster-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.poster-play svg { width: 18px; height: 18px; margin-left: 2px; }

.poster-title { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.poster-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--gold-2); }

.poster-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(11,11,15,0.75);
  backdrop-filter: blur(4px);
  color: var(--gold-2);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.admin-remove {
  position: absolute;
  top: 10px; left: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(193, 68, 60, 0.9);
  color: #fff;
  border: none;
  display: none;
  align-items: center; justify-content: center;
  font-size: 14px;
  z-index: 3;
}
body.admin-mode .admin-remove { display: flex; }

/* empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-dim);
}
.empty-state .display { font-size: 44px; color: var(--ink); margin-bottom: 10px; }
.empty-state p { max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* ---------------- pagination — "marquee lights" ---------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 56px 0 30px;
  flex-wrap: wrap;
}

.page-bulb {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-dim);
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--ease) .2s;
  position: relative;
}
.page-bulb:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.page-bulb.active {
  background: var(--gold);
  color: #16161c;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(232,181,74,0.15), 0 0 16px rgba(232,181,74,0.6);
  animation: bulb-glow 1.8s ease-in-out infinite;
}
@keyframes bulb-glow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(232,181,74,0.15), 0 0 16px rgba(232,181,74,0.6); }
  50% { box-shadow: 0 0 0 4px rgba(232,181,74,0.05), 0 0 8px rgba(232,181,74,0.35); }
}
.page-bulb:disabled { opacity: 0.3; cursor: default; }

/* ---------------- trailer modal ---------------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6,6,8,0.9);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--ease) .25s;
}
.modal-backdrop.open { display: flex; opacity: 1; }

.modal-player {
  width: min(1000px, 100%);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transform: scale(0.94);
  transition: transform var(--ease) .3s;
}
.modal-backdrop.open .modal-player { transform: scale(1); }
.modal-player iframe { width: 100%; height: 100%; border: 0; }

.modal-close {
  position: absolute;
  top: -46px; right: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--ease) .2s;
}
.modal-close:hover { color: var(--gold); border-color: var(--gold); }

/* ---------------- admin panel ---------------- */

.admin-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 150;
  transform: translateX(100%);
  transition: transform var(--ease) .35s;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.admin-panel.open { transform: translateX(0); }

.admin-panel-head {
  padding: 26px 24px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-panel-head h3 { font-size: 28px; }

.admin-panel-body { padding: 22px 24px; overflow-y: auto; flex: 1; }

.field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  margin-bottom: 8px;
  display: block;
}

.field-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  font-family: "JetBrains Mono", monospace;
}
.field-input:focus { border-color: var(--gold); outline: none; }

.btn-solid {
  width: 100%;
  background: var(--gold);
  color: #16161c;
  border: none;
  padding: 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background var(--ease) .2s;
}
.btn-solid:hover { background: var(--gold-2); }
.btn-solid:disabled { opacity: 0.5; cursor: default; }

.admin-note {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-top: -8px;
  margin-bottom: 20px;
}

.admin-status {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}
.admin-status.ok { display: block; background: rgba(232,181,74,0.1); color: var(--gold-2); border: 1px solid rgba(232,181,74,0.25); }
.admin-status.err { display: block; background: rgba(193,68,60,0.12); color: #ef8b85; border: 1px solid rgba(193,68,60,0.3); }

.admin-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(6,6,8,0.5);
  z-index: 140;
  display: none;
}
.admin-panel-overlay.open { display: block; }

/* ---------------- footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0 50px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
}
.site-footer a { color: var(--gold); }

/* ---------------- loaders ---------------- */

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  aspect-ratio: 2/3;
}
@keyframes shimmer { 0% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

/* ---------------- responsive ---------------- */

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero-content { padding: 0 18px; }
  .hero-nav { right: 18px; }
  .hero-arrows { left: 18px; bottom: 30px; }
  .section-title { font-size: 30px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
}