/* Direction: Midnight Cinema — graphite panels, electric-lime projector light, amber marquee details */
:root {
  color-scheme: dark;

  --canvas: #101014;
  --ink: #f3f1ec;
  --surface: #1b1b22;
  --surface-2: #23232c;
  --muted: #92929d;
  --border: #2f2f3a;

  --accent: #c6ff4d;
  --accent-text: #cbff63;
  --accent-strong: #dcff8c;
  --accent-soft: #212c10;

  --danger: #a52a3a;
  --warning: #e6a84a;
  --success: #8fd96a;

  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: 0.02em;

  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --card-pad: 1.25rem;
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.45);

  --x-on-photo: #ffffff;
  --x-font-serif: "Playfair Display", Georgia, serif;
  --x-crimson: #a52a3a;
  --x-amber: #e6a84a;
  --x-glow: rgba(198, 255, 77, 0.22);
  --gradient-shade: linear-gradient(90deg, rgba(16, 16, 20, 0.97) 0%, rgba(16, 16, 20, 0.82) 42%, rgba(16, 16, 20, 0.12) 100%);
  --gradient-shade-y: linear-gradient(180deg, rgba(16, 16, 20, 0.1) 0%, rgba(16, 16, 20, 0.72) 55%, rgba(16, 16, 20, 0.98) 100%);
  --gradient-poster: linear-gradient(180deg, rgba(16, 16, 20, 0) 38%, rgba(16, 16, 20, 0.94) 100%);
  --gradient-lime: linear-gradient(135deg, rgba(198, 255, 77, 0.16), rgba(165, 42, 58, 0.2));
\n  --border-strong: #454550;\n  --accent-hover: #d6ff78;\n  --accent-ink: #15180f;\n  --accent-border: #c6ff4d;\n  --success-ink: #10180c;\n  --success-soft: #21331a;\n  --success-strong: #b1ed83;\n  --warning-ink: #211606;\n  --warning-soft: #382914;\n  --warning-strong: #f3c477;\n  --danger-ink: #fff5f5;\n  --danger-soft: #40232b;\n  --danger-strong: #ff8e99;\n  --radius-lg: 10px;\n  --radius-xl: 16px;\n  --border-w: 1px;\n  --border-strong-w: 1px;\n  --btn-weight: 600;\n  --caps: none;\n  --caps-tracking: 0;\n  --shadow-btn: none;\n  --shadow-raised: 0 18px 40px rgba(0,0,0,0.35);\n  --shadow: 0 8px 24px rgba(0,0,0,0.22);\n  --ease: cubic-bezier(0.2,0.7,0.2,1);\n  --ease-out: cubic-bezier(0,0,0.2,1);\n  --ring: 0 0 0 3px rgba(198,255,77,0.24);\n  --ring-danger: 0 0 0 3px rgba(255,142,153,0.24);\n  --z-toast: 80;\n  --z-menu: 70;\n  --z-tooltip: 90;\n  --measure: 68ch;\n  --chart-1: #c6ff4d;\n  --chart-2: #e6a84a;\n  --chart-3: #a52a3a;\n  --chart-4: #9b8bd6;\n  --chart-5: #5dabc4;\n  --chart-6: #c88fbb;
}


html[data-theme="light"] {
  color-scheme: light;
  --canvas: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #e9e7e1;
  --border: #d8d5cc;
  --border-strong: #b7b4aa;
  --ink: #18181b;
  --muted: #6e6d70;
  --accent: #26351b;
  --accent-hover: #344a22;
  --accent-text: #526d2a;
  --accent-strong: #26351b;
  --accent-soft: #e4ebd7;
  --accent-ink: #ffffff;
  --accent-border: #26351b;
  --danger: #a52a3a;
  --danger-ink: #ffffff;
  --danger-soft: #f5e1e3;
  --danger-strong: #a52a3a;
  --warning: #926019;
  --warning-ink: #ffffff;
  --warning-soft: #f3e8d2;
  --warning-strong: #80510f;
  --success: #347b32;
  --success-ink: #ffffff;
  --success-soft: #e0edda;
  --success-strong: #276a2a;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: 0.02em;
  --radius-card: 14px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --card-pad: 1.25rem;
  --shadow-card: 0 14px 34px rgba(24,24,27,0.10);
  --shadow: 0 8px 24px rgba(24,24,27,0.08);
  --shadow-raised: 0 18px 40px rgba(24,24,27,0.12);
  --shadow-btn: none;
  --border-w: 1px;
  --border-strong-w: 1px;
  --btn-weight: 600;
  --caps: none;
  --caps-tracking: 0;
  --x-on-photo: #ffffff;
  --x-font-serif: "Playfair Display", Georgia, serif;
  --x-crimson: #a52a3a;
  --x-amber: #926019;
  --x-glow: rgba(82,109,42,0.16);
  --gradient-shade: linear-gradient(90deg, rgba(16,16,20,0.97) 0%, rgba(16,16,20,0.82) 42%, rgba(16,16,20,0.12) 100%);
  --gradient-shade-y: linear-gradient(180deg, rgba(16,16,20,0.1) 0%, rgba(16,16,20,0.72) 55%, rgba(16,16,20,0.98) 100%);
  --gradient-poster: linear-gradient(180deg, rgba(16,16,20,0) 38%, rgba(16,16,20,0.94) 100%);
  --gradient-lime: linear-gradient(135deg, rgba(82,109,42,0.12), rgba(165,42,58,0.10));
  --ease: cubic-bezier(0.2,0.7,0.2,1);
  --ease-out: cubic-bezier(0,0,0.2,1);
  --ring: 0 0 0 3px rgba(82,109,42,0.18);
  --ring-danger: 0 0 0 3px rgba(165,42,58,0.16);
  --z-toast: 80;
  --z-menu: 70;
  --z-tooltip: 90;
  --measure: 68ch;
  --chart-1: #526d2a;
  --chart-2: #926019;
  --chart-3: #a52a3a;
  --chart-4: #6557a0;
  --chart-5: #28718a;
  --chart-6: #9c4f87;
}

/* CineTrack — app shell, posters, rails, star widgets, diary calendar */

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100dvh;
}
@media (min-width: 1024px) {
  .app {
    grid-template-columns: 264px minmax(0, 1fr);
  }
  html.nav-collapsed .app {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}
html.nav-collapsed .nav-label,
html.nav-collapsed .nav-aside {
  display: none;
}
html.nav-collapsed .nav-link {
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.85rem;
  scrollbar-width: thin;
}
.rail > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.poster:hover,
.poster:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6), inset 0 0 0 1px var(--accent);
}
.poster img {
  transition: transform 0.45s ease;
}
.poster:hover img {
  transform: scale(1.07);
}
.poster-shade {
  position: absolute;
  inset: 0;
  background: var(--gradient-poster);
}

.title-serif {
  font-family: var(--x-font-serif);
}
.glow {
  box-shadow: 0 0 0 1px var(--border), 0 0 36px var(--x-glow);
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, rgba(255, 255, 255, 0) 1px 4px);
}

/* read-only rating */
.rstars {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
  color: var(--border);
  letter-spacing: 0.06em;
}
.rstars::before {
  content: "★★★★★";
}
.rstars > i {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  width: var(--v, 0%);
  color: var(--accent);
}
.rstars > i::before {
  content: "★★★★★";
}

/* interactive half-star picker */
.star-row {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  position: relative;
}
.star-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.star-row label {
  position: relative;
  width: 16px;
  height: 32px;
  overflow: hidden;
  cursor: pointer;
}
.star-row label::before {
  content: "★";
  position: absolute;
  top: 0;
  font-size: 32px;
  line-height: 32px;
  color: var(--border);
  transition: color 0.15s ease;
}
.star-row label.sr-l::before {
  left: 0;
}
.star-row label.sr-r::before {
  left: -16px;
}
.star-row input:checked ~ label::before {
  color: var(--accent);
}
.star-row:hover label::before {
  color: var(--border);
}
.star-row label:hover::before,
.star-row label:hover ~ label::before {
  color: var(--accent-strong);
}
.star-row input:focus-visible + label::before {
  color: var(--accent-strong);
}

/* diary calendar */
.cal-day {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 60px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  text-align: left;
}
.cal-day.has-film {
  border-color: var(--accent);
  color: var(--ink);
}
.cal-day.has-film:hover {
  box-shadow: 0 0 24px var(--x-glow);
}
.cal-day img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.cal-day span {
  position: relative;
}

.barfill {
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  border-radius: 6px 6px 3px 3px;
  min-height: 4px;
}
.goal-track {
  height: 14px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: hidden;
}
.goal-fill {
  height: 100%;
  width: var(--v, 0%);
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 20px var(--x-glow);
}


/* Text-led fallback for films without saved poster artwork. */
.poster-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 7rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}


/* Text-led fallback for catalogue entries without saved poster artwork. */
.poster-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 7rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}
