@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-void: #08080c;
  --bg-surface: #131319;
  --bg-raised: #1b1b24;
  --line: #26262f;
  --text-hi: #f4f4f7;
  --text-mid: #a6a6b3;
  --text-low: #6b6b78;
  --accent-violet: #7c3aed;
  --accent-blue: #2563eb;
  --accent-rose: #e11d48;
  --glow: linear-gradient(120deg, var(--accent-violet), var(--accent-blue));
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-void);
  color: var(--text-hi);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.display {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  line-height: 0.95;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ---------- Sprocket divider: signature element ----------
   A film-reel strip used between homepage sections instead
   of a plain <hr>. Encodes the cinema theme structurally. */
.sprocket-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 max(4vw, 24px);
  margin: 56px 0 32px;
  opacity: 0.55;
}
.sprocket-divider span {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--line);
  flex-shrink: 0;
}
.sprocket-divider::before,
.sprocket-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Top bars: cinema letterbox feel on hero ---------- */
.letterbox-top, .letterbox-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 28px;
  background: var(--bg-void);
  z-index: 3;
}
.letterbox-top { top: 0; }
.letterbox-bottom { bottom: 0; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px max(4vw, 24px);
  background: linear-gradient(180deg, rgba(8,8,12,0.92), rgba(8,8,12,0.4));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-left { display: flex; align-items: center; gap: 36px; }
.brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.06em;
  background: var(--glow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 14px;
  color: var(--text-mid);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-hi); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--glow);
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.search-box {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text-hi);
  font-size: 13px;
  width: 200px;
}
.btn {
  padding: 9px 18px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 600;
}
.btn-glow {
  background: var(--glow);
  color: white;
}
.btn-ghost {
  background: transparent;
  color: var(--text-hi);
  border: 1px solid var(--line);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--glow);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg-void) 6%, rgba(8,8,12,0.35) 55%, rgba(8,8,12,0.75) 100%),
              linear-gradient(90deg, rgba(8,8,12,0.9) 0%, rgba(8,8,12,0.1) 55%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 max(4vw, 24px) 64px;
  max-width: 640px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-rose);
  box-shadow: 0 0 12px var(--accent-rose);
}
.hero-title {
  font-size: clamp(42px, 7vw, 84px);
  margin: 0 0 14px;
}
.hero-desc {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 520px;
}
.hero-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-actions { display: flex; gap: 12px; }
.btn-lg { padding: 13px 28px; font-size: 14px; border-radius: 12px; }

/* ---------- Rails ---------- */
.rail { padding: 0 max(4vw, 24px); }
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.rail-title { font-size: 22px; font-weight: 700; }
.rail-sub { font-size: 12px; color: var(--text-low); }
.rail-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
}
.rail-track::-webkit-scrollbar { height: 6px; }
.rail-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.card {
  flex: 0 0 200px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,58,237,0.4);
}
.card-poster {
  width: 100%; aspect-ratio: 2/3;
  background: var(--bg-raised);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-low);
  font-size: 12px;
  position: relative;
}
.card-poster img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; padding: 3px 8px;
  border-radius: 6px;
  background: rgba(8,8,12,0.75);
  backdrop-filter: blur(6px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.card-body { padding: 12px; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.card-tags { font-size: 11px; color: var(--text-low); }

/* ---------- Grid (browse) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  padding: 0 max(4vw, 24px) 60px;
}

/* ---------- Forms / Auth ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,58,237,0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(37,99,235,0.18), transparent 40%),
    var(--bg-void);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-mid); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-hi);
  font-size: 14px;
  font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent-violet);
  outline-offset: 1px;
}
.error-box {
  background: rgba(225,29,72,0.1);
  border: 1px solid rgba(225,29,72,0.35);
  color: #fca5b1;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.form-foot { text-align: center; font-size: 13px; color: var(--text-mid); margin-top: 18px; }

/* ---------- Movie detail ---------- */
.detail-hero { position: relative; min-height: 60vh; display: flex; align-items: flex-end; }
.detail-grid { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 0 max(4vw,24px) 60px; }
.detail-poster { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.chip {
  display: inline-block;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-mid);
  margin: 0 8px 8px 0;
}

/* ---------- Watch page / player ---------- */
.player-wrap { background: black; }
video { width: 100%; max-height: 82vh; display: block; background: black; }
.player-info { padding: 24px max(4vw,24px) 60px; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--bg-surface);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
}
.admin-side a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 4px;
}
.admin-side a:hover, .admin-side a.active { background: var(--bg-raised); color: var(--text-hi); }
.admin-main { padding: 32px max(3vw,24px); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.table th { color: var(--text-low); font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-num { font-family: 'Bebas Neue'; font-size: 40px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 32px; }

/* ---------- Footer ---------- */
.footer {
  padding: 48px max(4vw,24px) 32px;
  border-top: 1px solid var(--line);
  color: var(--text-low);
  font-size: 13px;
  margin-top: 60px;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-mid);
}
.empty .display { font-size: 40px; color: var(--text-hi); margin-bottom: 8px; }

@media (max-width: 720px) {
  .nav-links, .search-box { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
}
