/* Reelbox - one stylesheet, no framework, no external fonts. */

:root {
  --bg: #0d0d0f;
  --panel: #16161a;
  --card: #1f1f24;
  --card-hover: #2a2a31;
  --line: #303038;
  --text: #ececf0;
  --muted: #9a9aa5;
  --accent: #f5c518;
  --accent-ink: #14140f;
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand { text-decoration: none; }
.brand:hover { text-decoration: none; }

.mark {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.topbar nav { display: flex; gap: 18px; }

.topbar nav a {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.topbar nav a:hover { color: var(--accent); text-decoration: none; }
.topbar nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding: 36px 0 22px; }

.hero h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.6px;
}

.lede {
  margin: 0 0 8px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #000;
  border: 1px solid var(--line);
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

/* ---------- poster grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: var(--accent);
  text-decoration: none;
}

.posterwrap { position: relative; background: #000; }

.poster {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.noposter {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: repeating-linear-gradient(45deg, #1a1a1f, #1a1a1f 10px, #222229 10px, #222229 20px);
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cardbody { padding: 10px 12px 14px; }

.rating { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text); }
.star { color: var(--accent); }

.cardtitle {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.year { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- film page ---------- */

.film { position: relative; }

.backdrop {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: 340px;
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
  background-color: #000;
}

.nobackdrop { background: linear-gradient(160deg, #26262e, #0d0d0f); }

.backdropfade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13, 13, 15, 0.35) 0%, rgba(13, 13, 15, 0.82) 55%, var(--bg) 100%);
}

.filmhead {
  position: relative;
  display: flex;
  gap: 28px;
  margin-top: -150px;
  flex-wrap: wrap;
}

.bigposter {
  width: 220px;
  flex: 0 0 220px;
  align-self: flex-start;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #000;
}

.filmmeta { flex: 1 1 320px; min-width: 280px; padding-top: 118px; }

.filmmeta h1 {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.8px;
}

.metaline { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.ratingbig { font-weight: 800; }
.dot { color: var(--muted); margin: 0 6px; }
.genres { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

.tagline {
  margin: 0 0 16px;
  font-size: 17px;
  font-style: italic;
  color: var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 14px;
  margin: 0 0 18px;
  font-size: 15px;
}

.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }

.button {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 15px;
}

.button:hover { background: #ffd633; text-decoration: none; }

.overview { margin-top: 34px; max-width: 72ch; }
.overview h2, .trailer h2, .trailerblock h2 { font-size: 20px; margin: 0 0 8px; }
.overview p { margin: 0; color: #d5d5dd; }

/* ---------- video ---------- */

.trailer, .trailerblock {
  margin-top: 36px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 900px;
  margin: 12px 0;
  background: #000;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.note { margin: 0 0 6px; font-size: 14px; color: var(--muted); max-width: 70ch; }
.credit { margin: 0; font-size: 13px; color: var(--muted); }

.back { margin-top: 36px; font-size: 15px; }

/* ---------- footer ---------- */

.sitefoot {
  border-top: 1px solid var(--line);
  padding: 24px 20px 48px;
  background: var(--panel);
}

.sitefoot p {
  max-width: 1140px;
  margin: 0 auto 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.sitefoot .stamp { color: #77777f; }

/* ---------- narrow screens ---------- */

@media (max-width: 700px) {
  .backdrop { height: 220px; }
  .filmhead { margin-top: -110px; gap: 18px; }
  .bigposter { width: 130px; flex: 0 0 130px; }
  .filmmeta { padding-top: 0; }
  .filmmeta h1 { font-size: 26px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
}

.missing {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px dashed #555;
  border-radius: 8px;
  color: #ddd;
  font-size: 16px;
  line-height: 1.5;
}
.missing p { margin: 0; max-width: 520px; }
.missing code { color: #f5c518; }
