/* movieratings — late-night movie theater theme */
:root {
  --bg: #0a0506;
  --bg-2: #140a0c;
  --panel: #1b0e11;
  --panel-2: #241216;
  --line: #3a1c22;
  --red: #d7263d;
  --red-deep: #7d0f1d;
  --red-glow: rgba(215, 38, 61, 0.45);
  --gold: #f4c95d;
  --gold-dim: #a8873a;
  --text: #f6ece8;
  --muted: #b9a2a0;
  --good: #f4c95d;
  --radius: 14px;
  --font-marquee: "Limelight", Georgia, serif;
  --font-head: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(215, 38, 61, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ---------- Curtain + marquee header ---------- */
.curtain {
  position: relative;
  padding: 18px 16px 26px;
  background:
    repeating-linear-gradient(90deg,
      #5a0a14 0 14px, #8e1424 14px 22px, #b51c2f 22px 26px, #8e1424 26px 34px, #5a0a14 34px 48px);
  box-shadow: inset 0 -30px 40px rgba(0, 0, 0, 0.55), 0 8px 30px rgba(0, 0, 0, 0.6);
}
.curtain::after { /* scalloped valance edge */
  content: "";
  position: absolute; left: 0; right: 0; bottom: -12px; height: 14px;
  background: radial-gradient(circle at 12px 0, #5a0a14 11px, transparent 12px) repeat-x;
  background-size: 24px 14px;
}
.marquee {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 18px;
  text-align: center;
  background: #120607;
  border: 3px solid var(--gold-dim);
  border-radius: 10px;
  position: relative;
  box-shadow: 0 0 0 4px #120607, 0 0 28px var(--red-glow);
}
.marquee::before, .marquee::after { /* light bulbs */
  content: "";
  position: absolute; left: 10px; right: 10px; height: 8px;
  background: radial-gradient(circle, var(--gold) 2.6px, transparent 3.4px) repeat-x;
  background-size: 18px 8px;
  animation: chase 1.2s steps(2) infinite;
}
.marquee::before { top: 3px; }
.marquee::after { bottom: 3px; animation-delay: 0.6s; }
@keyframes chase { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .marquee::before, .marquee::after { animation: none; } }

.marquee h1 {
  margin: 6px 0 2px;
  font-family: var(--font-marquee);
  font-weight: 400;
  font-size: clamp(30px, 8vw, 46px);
  letter-spacing: 0.04em;
  color: #fff3e8;
  text-shadow: 0 0 6px var(--red), 0 0 18px var(--red-glow);
}
.marquee h1 a { color: inherit; text-decoration: none; }
.marquee .tagline {
  margin: 0 0 6px;
  font-family: var(--font-head);
  letter-spacing: 0.2em;
  font-size: 14px;
  color: var(--gold);
}

nav.top {
  display: flex; justify-content: center; gap: 10px;
  margin-top: 14px;
}
nav.top a {
  font-family: var(--font-head);
  letter-spacing: 0.12em;
  font-size: 17px;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(244, 201, 93, 0.35);
}
nav.top a.active, nav.top a:hover { background: var(--red); border-color: var(--red); text-decoration: none; }

/* ---------- Layout ---------- */
main { max-width: 900px; margin: 0 auto; padding: 28px 14px 60px; }
h2, h3 { font-family: var(--font-head); letter-spacing: 0.06em; font-weight: 400; margin: 0 0 10px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; color: var(--gold); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

/* ---------- Controls ---------- */
.filters { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
@media (min-width: 640px) { .filters { grid-template-columns: 2fr 1fr 1fr; } }

input[type="text"], input[type="search"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #0f0708;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  min-height: 46px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head);
  font-size: 20px;
  letter-spacing: 0.1em;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #e8384e, var(--red-deep));
  box-shadow: 0 4px 18px var(--red-glow);
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn.ghost { background: transparent; border: 1px solid var(--gold-dim); color: var(--gold); box-shadow: none; }
.btn.small { font-size: 16px; min-height: 38px; padding: 6px 14px; }
.btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red); box-shadow: none; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button {
  font: inherit; font-size: 15px; color: var(--muted);
  background: transparent; border: 0; padding: 10px 16px; min-height: 44px; cursor: pointer;
}
.seg button.on { background: var(--red); color: #fff; }

/* ---------- Leaderboard ---------- */
.board { display: grid; gap: 12px; }
.card {
  display: grid;
  grid-template-columns: 34px 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  background: linear-gradient(90deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform 0.12s, border-color 0.12s;
}
.card:hover { text-decoration: none; border-color: var(--red); transform: translateY(-1px); }
.rank { font-family: var(--font-head); font-size: 26px; color: var(--muted); text-align: center; }
.card:nth-child(1) .rank { color: var(--gold); }
.poster-sm, .poster-ph {
  width: 64px; height: 96px; border-radius: 8px; object-fit: cover;
  background: #2a1418;
}
.poster-ph {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 24px; color: var(--red);
  border: 1px dashed var(--line);
}
.card .title { font-weight: 650; font-size: 17px; line-height: 1.2; }
.card .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.card .liner { font-size: 13px; color: var(--text); opacity: 0.85; margin-top: 5px; font-style: italic;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge {
  display: inline-block; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--gold-dim); color: var(--gold); margin-left: 4px;
  vertical-align: 2px;
}

.score {
  font-family: var(--font-head);
  font-size: 34px;
  line-height: 1;
  min-width: 64px;
  text-align: center;
  padding: 10px 8px 8px;
  border-radius: 12px;
  background: #0f0708;
  border: 2px solid var(--red);
  color: #fff;
  box-shadow: 0 0 14px var(--red-glow);
}
.score small { display: block; font-size: 11px; letter-spacing: 0.15em; color: var(--muted); margin-top: 3px; }
.score.big { font-size: 64px; min-width: 120px; padding: 16px 14px 12px; }
.score.na { border-color: var(--line); box-shadow: none; color: var(--muted); }

.empty { text-align: center; padding: 50px 20px; }
.empty .popcorn { font-size: 54px; }

/* ---------- Movie detail ---------- */
.hero { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
@media (min-width: 640px) { .hero { grid-template-columns: 200px 1fr auto; } }
.poster-lg { width: 100%; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.6); background: #2a1418; aspect-ratio: 2/3; object-fit: cover; }
.hero h2 { font-size: 34px; margin-bottom: 4px; }
.hero .score-wrap { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; }
@media (min-width: 640px) { .hero .score-wrap { grid-column: auto; flex-direction: column; } }
.overview { color: var(--muted); font-size: 15px; }

.charts { display: grid; gap: 16px; }
@media (min-width: 720px) { .charts { grid-template-columns: 1fr 1fr; align-items: center; } }
.radar { width: 100%; max-width: 360px; margin: 0 auto; display: block; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 10px; font-size: 14px; }
.bar .track { height: 10px; background: #0f0708; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar .fill { height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red)); border-radius: 99px; }
.bar .val { text-align: right; font-weight: 650; }

.viewing { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.viewing:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.viewing .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.quote { font-size: 18px; font-style: italic; margin: 8px 0; }
.qlist { display: grid; gap: 4px; font-size: 14px; margin-top: 8px; }
.qlist div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.qlist b { color: var(--text); }
details summary { cursor: pointer; color: var(--gold); margin-top: 8px; }

/* ---------- Review form ---------- */
.sticky-score {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin: 0 -14px 16px;
  background: rgba(10, 5, 6, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.sticky-score .progress { font-size: 14px; color: var(--muted); }
.sticky-score .score { font-size: 28px; min-width: 70px; padding: 8px 6px 6px; }

.results { display: grid; gap: 6px; margin-top: 8px; }
.result {
  display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center;
  padding: 6px; border-radius: 10px; background: #0f0708; border: 1px solid var(--line);
  color: var(--text); text-align: left; font: inherit; cursor: pointer; width: 100%;
}
.result:hover { border-color: var(--red); }
.result img, .result .poster-ph { width: 40px; height: 60px; border-radius: 5px; font-size: 14px; }
.picked { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }

.cat { padding: 0; overflow: hidden; }
.cat > summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; cursor: pointer; margin: 0;
  font-family: var(--font-head); font-size: 22px; letter-spacing: 0.06em; color: var(--gold);
}
.cat > summary::-webkit-details-marker { display: none; }
.cat > summary .catscore { font-family: var(--font-body); font-size: 15px; color: var(--muted); }
.cat .qs { padding: 0 16px 8px; }

.q { padding: 12px 0 14px; border-top: 1px solid var(--line); }
.q .qtop { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.q .qtext { font-size: 15px; }
.q .qval {
  font-family: var(--font-head); font-size: 26px; min-width: 34px; text-align: right; color: var(--muted);
}
.q.set .qval { color: #fff; text-shadow: 0 0 8px var(--red-glow); }
.q .clear { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0; }
.q:not(.set) .clear { visibility: hidden; }
.q .ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* Range slider */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 36px; background: transparent; margin: 6px 0 0; cursor: pointer;
  --pct: 44%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px; border-radius: 99px; background: #2a1418; border: 1px solid var(--line);
}
.q.set input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--red-deep), var(--red) var(--pct), #2a1418 var(--pct));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: #5b4a4c; border: 3px solid #0a0506;
}
.q.set input[type="range"]::-webkit-slider-thumb { background: var(--gold); box-shadow: 0 0 12px var(--red-glow); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 99px; background: #2a1418; border: 1px solid var(--line); }
input[type="range"]::-moz-range-progress { height: 10px; border-radius: 99px; background: transparent; }
.q.set input[type="range"]::-moz-range-progress { background: linear-gradient(90deg, var(--red-deep), var(--red)); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #5b4a4c; border: 3px solid #0a0506; }
.q.set input[type="range"]::-moz-range-thumb { background: var(--gold); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 18px; }
.msg { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; }
.msg.err { background: rgba(215, 38, 61, 0.15); border: 1px solid var(--red); }
.msg.ok { background: rgba(244, 201, 93, 0.12); border: 1px solid var(--gold-dim); }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 14px 40px; }
footer img { display: inline-block; height: 12px; vertical-align: middle; margin-left: 4px; }
.poster-lg.poster-ph { width: 100%; height: auto; aspect-ratio: 2 / 3; font-size: 64px; }
.genre-pick select { min-height: 42px; padding: 8px 10px; margin-bottom: 4px; }
