/* FAK Movies — dark cinematic theme */
:root {
  --bg: #0a0a0c;
  --bg2: #121215;
  --card: #16161a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f5f6;
  --muted: #9a9aa3;
  --red: #e30613;
  --red-dark: #a8040e;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  height: 64px;
}
.logo { font-weight: 800; font-size: 20px; letter-spacing: 0.04em; white-space: nowrap; }
.logo b { color: var(--red); font-weight: 800; }
.logo small {
  display: block; font-size: 9px; font-weight: 600; letter-spacing: 0.42em;
  color: var(--muted); margin-top: 1px;
}
.search-form { margin-left: auto; display: flex; gap: 8px; flex: 1; max-width: 420px; }
.search-form input {
  flex: 1; background: var(--bg2); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 10px 16px;
  font-size: 14px; outline: none; transition: border-color 0.2s;
}
.search-form input:focus { border-color: var(--red); }
.search-form input::placeholder { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 10px 22px; transition: transform 0.15s, background 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #f41b28; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--red); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
  filter: saturate(1.1);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,12,0.96) 8%, rgba(10,10,12,0.55) 45%, rgba(10,10,12,0.15) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 45%);
}
.hero-inner { position: relative; z-index: 1; padding: 72px 0 56px; max-width: 640px; }
.hero-kicker {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.28em;
  color: var(--red); margin-bottom: 14px; text-transform: uppercase;
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; line-height: 1.05; margin-bottom: 12px; }
.hero-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.hero-meta .star { color: #ffc531; font-weight: 700; }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--text);
  background: rgba(255,255,255,0.05);
}
.hero-desc {
  color: #cfcfd6; font-size: 15px; line-height: 1.65; margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn { padding: 13px 30px; font-size: 15px; }

/* ---------- sections / grid ---------- */
.section { padding: 34px 0 10px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; font-weight: 800; letter-spacing: 0.01em; }
.section-head .count { color: var(--muted); font-size: 13px; }
.section-head .spacer { flex: 1; }
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: rgba(227,6,19,0.55); box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
.card-poster { position: relative; aspect-ratio: 2/3; background: #1c1c21; overflow: hidden; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.card:hover .card-poster img { transform: scale(1.05); }
.card-quality {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(10,10,12,0.85); border: 1px solid var(--line);
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  padding: 3px 7px; border-radius: 6px; color: #ffd7da;
}
.card-play {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,0); transition: background 0.25s; opacity: 0;
}
.card:hover .card-play { opacity: 1; background: rgba(10,10,12,0.45); }
.card-play span {
  width: 52px; height: 52px; border-radius: 50%; background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; padding-left: 3px;
  box-shadow: 0 6px 24px rgba(227,6,19,0.5);
}
.card-body { padding: 10px 12px 12px; }
.card-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px;
}
.card-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.card-sub .star { color: #ffc531; font-weight: 700; }

/* skeletons */
.skel .card-poster, .skel .card-body { position: relative; overflow: hidden; background: #1c1c21; }
.skel .card-poster::after, .skel .line::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.06) 50%, transparent 80%);
  animation: shimmer 1.3s infinite;
}
.skel .card-body { height: 58px; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* status / empty / error */
.status { text-align: center; padding: 48px 16px; color: var(--muted); }
.status .big { font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.status p { font-size: 14px; margin-bottom: 18px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--red);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#sentinel { height: 4px; }

/* horizontal rail (continue watching) */
.rail { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.rail .card { flex: 0 0 150px; }
@media (min-width: 900px) { .rail .card { flex-basis: 168px; } }

/* ---------- watch page ---------- */
.watch-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.watch-hero .hero-bg { opacity: 0.5; }
.watch-inner { position: relative; z-index: 1; padding: 40px 0 30px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.back-link:hover { color: #fff; }
.player-shell {
  background: #000; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  position: relative; aspect-ratio: 16/9;
}
.player-shell video { width: 100%; height: 100%; background: #000; }
.player-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: rgba(5,5,8,0.72); text-align: center; padding: 24px; z-index: 3;
}
.player-overlay.hidden { display: none; }
.player-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px;
}
.player-bar .label { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.q-pill {
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 14px; cursor: pointer;
}
.q-pill:hover { border-color: var(--red); }
.q-pill.active { background: var(--red); border-color: var(--red); color: #fff; }
.sub-select {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; outline: none; cursor: pointer;
}
.watch-meta { display: flex; gap: 22px; margin-top: 26px; }
.watch-poster {
  flex: 0 0 180px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); align-self: flex-start;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
}
.watch-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.watch-info h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 800; margin-bottom: 10px; }
.watch-info .hero-meta { margin-bottom: 14px; }
.watch-info .desc { color: #cfcfd6; font-size: 15px; line-height: 1.7; max-width: 760px; }
@media (max-width: 640px) {
  .watch-meta { flex-direction: column; }
  .watch-poster { flex-basis: auto; width: 150px; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 30px 0 40px; color: var(--muted); }
.site-footer .wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer .logo { font-size: 16px; }
.site-footer p { font-size: 12.5px; line-height: 1.6; max-width: 640px; }
.site-footer .spacer { flex: 1; }
.ver-tag { font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
