:root {
  --bg: #0b0d12;
  --surface: #151823;
  --border: #262b3a;
  --text: #e8eaf0;
  --muted: #9aa3b5;
  --accent: #e62429;
  --done: #22c55e;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

/* Smooth-Scroll zu Anker-Zielen — nur für Nutzer, die Bewegung erlauben */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(230, 36, 41, 0.4); color: #fff; }

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 18, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}
.brand::first-line { color: inherit; }

.site-header nav a { color: var(--muted); text-decoration: none; margin-left: 1rem; }
.site-header nav a:hover { color: var(--text); }

.page { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

.flashes { max-width: 860px; margin: 1rem auto 0; padding: 0 1.25rem; list-style: none; }
.flashes li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  color: var(--text);
}

.hero { margin-bottom: 2.5rem; }
.hero h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

.stats { display: flex; gap: 2rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-family: "Bebas Neue", sans-serif; font-size: 2.6rem; line-height: 1; color: var(--accent); }
.stat-number small { color: var(--muted); font-size: 1.4rem; }
.stat-label { color: var(--muted); font-size: 0.85rem; }

.progress-bar {
  height: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff5054);
  transition: width 0.4s ease;
}
.progress-text { color: var(--muted); margin: 0.5rem 0 0; }

.next-up { color: var(--muted); }
.next-up strong { color: var(--text); }
.next-up a {
  color: inherit;
  text-decoration: underline dotted rgba(230, 36, 41, 0.8);
  text-underline-offset: 4px;
}
.next-up a:hover { text-decoration-style: solid; }
.next-up a:hover strong { color: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Anker-Ziele nicht hinter dem sticky Header verschwinden lassen */
.timeline-item { position: relative; padding-left: 54px; margin-bottom: 1.5rem; scroll-margin-top: 4.5rem; }

.node {
  position: absolute;
  left: 0;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--muted);
}

.timeline-item.is-watched .node { background: var(--done); border-color: var(--done); color: #06220f; }
.timeline-item.is-next .node { background: var(--accent); border-color: var(--accent); color: #fff; }

.card {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.poster {
  width: 92px;
  height: 138px;
  align-self: flex-start;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1c2130;
}
.poster.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.4rem;
  color: var(--muted);
  background: linear-gradient(160deg, #1c2130, #12151f);
}

.card-title { margin: 0 0 0.25rem; font-size: 1.15rem; text-wrap: pretty; }
.card-title .year { color: var(--muted); font-weight: 400; font-size: 0.95rem; }

.meta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0 0 0.5rem; color: var(--muted); font-size: 0.9rem; }
.watched-date { color: var(--done); }

.badge {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-soon { background: rgba(230, 36, 41, 0.15); color: #ff6b6e; border: 1px solid rgba(230, 36, 41, 0.4); }

.overview {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recap summary {
  cursor: pointer;
  color: #ff6b6e;
  font-weight: 600;
  padding: 0.4rem 0;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.recap summary::-webkit-details-marker { display: none; }
.recap summary::before {
  content: "\25B8";
  font-size: 0.8em;
  color: var(--accent);
  transition: transform 0.15s ease;
}
.recap[open] summary { border-bottom: 1px dashed var(--border); margin-bottom: 0.5rem; }
.recap[open] summary::before { transform: rotate(90deg); }
.recap p { margin: 0.5rem 0 0; color: var(--text); }

.timeline-item.is-locked .card { opacity: 0.75; }
.timeline-item.is-next .card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 28px rgba(230, 36, 41, 0.16);
}
.timeline-item.is-soon .card { border-style: dashed; }

/* Signature: das "ihr seid hier"-Leuchtfeuer auf dem nächsten Film */
.timeline-item.is-next .node { animation: beacon 2.4s ease-out infinite; }

@keyframes beacon {
  0% { box-shadow: 0 0 0 0 rgba(230, 36, 41, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(230, 36, 41, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 36, 41, 0); }
}

/* Sanfter Einstieg für Hero und Timeline (ein Moment, kein Staccato) */
.hero, .timeline {
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero, .timeline, .timeline-item.is-next .node { animation: none; }
  .progress-fill, .recap summary::before { transition: none; }
  .timeline-item.is-next .node { box-shadow: 0 0 0 4px rgba(230, 36, 41, 0.25); }
}

@media (max-width: 560px) {
  .timeline-item { padding-left: 44px; }
  .node { width: 30px; height: 30px; left: 0; }
  .timeline::before { left: 14px; }
  .poster { width: 68px; height: 102px; }
}

.auth-box { max-width: 420px; margin: 3rem auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 2rem; }
.auth-box h1 { font-family: "Bebas Neue", sans-serif; margin-top: 0; }
.auth-box label { display: block; color: var(--muted); margin-bottom: 0.4rem; font-size: 0.9rem; }
.auth-box input[type="password"] {
  width: 100%; padding: 0.6rem 0.8rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.auth-box button {
  margin-top: 1rem; width: 100%; padding: 0.65rem 1rem; border: none; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; font-size: 1rem;
}
.auth-box button:hover { background: #ff3d43; }

.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.admin-head h1 { font-family: "Bebas Neue", sans-serif; margin: 0; }
.admin-actions { display: flex; gap: 0.6rem; }

.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.admin-row {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.7rem 1rem;
}
.admin-row.is-watched { border-left: 3px solid var(--done); }
.admin-number { font-family: "Bebas Neue", sans-serif; color: var(--muted); width: 1.8rem; text-align: right; }
.admin-title { flex: 1 1 240px; }
.admin-title small { color: var(--muted); }
.admin-form { display: flex; align-items: center; gap: 0.7rem; margin-left: auto; }
.check-label { display: flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.9rem; }
.check-label input { accent-color: var(--done); width: 1.1rem; height: 1.1rem; }
.date-input { padding: 0.4rem; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }

.btn-primary, .btn-secondary { border-radius: 6px; cursor: pointer; font-size: 0.9rem; padding: 0.45rem 0.9rem; }
.btn-primary { background: var(--accent); color: #fff; border: none; font-weight: 600; }
.btn-primary:hover { background: #ff3d43; }
.btn-secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--text); border-color: var(--muted); }

.admin-save {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  padding: 0.9rem 0;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.btn-save { padding: 0.65rem 1.5rem; font-size: 1rem; }

@media (max-width: 560px) {
  .admin-form { margin-left: 0; width: 100%; justify-content: space-between; }
}
