:root {
  --bg: #14151a;
  --panel: #1e2028;
  --panel-2: #262935;
  --text: #e8e9ee;
  --muted: #9a9eae;
  --line: #34384a;
  --green: #3a9d5d;
  --yellow: #e0b514;
  --red: #d5453c;
  --grey: #565b6e;
  --accent: #5b8def;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

kbd {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 12px;
}

/* Für Autofill lesbar, für Menschen unsichtbar. Kein display:none —
   das würden Safari & Co. beim Speichern ignorieren. */
.autofill-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------- Login */

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gate-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
}

.gate-box h1 { margin: 0 0 8px; font-size: 22px; }
.gate-box p { margin: 0 0 16px; color: var(--muted); }

.gate-error {
  color: #ff8a80 !important;
  background: rgba(213, 69, 60, 0.12);
  border: 1px solid rgba(213, 69, 60, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
}

.gate-box input[type="password"] {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
  margin-bottom: 12px;
}

.gate-remember {
  display: block;
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 14px;
}

.gate-box button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* ---------------------------------------------------------- Review */

.review {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 40px;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.topbar h1 { font-size: 18px; margin: 6px 0; }

.progress { color: var(--muted); font-size: 14px; }
.progress .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin: 0 4px 0 12px;
}
.progress .dot.green { background: var(--green); }
.progress .dot.yellow { background: var(--yellow); }
.progress .dot.red { background: var(--red); }

.player-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding-bottom: 6px;
}

video {
  width: 100%;
  max-height: 56vh;
  background: #000;
  border-radius: 8px;
  display: block;
}

/* ---------------------------------------------------------- Timeline */

.timeline {
  position: relative;
  display: flex;
  height: 34px;
  margin-top: 8px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel-2);
}

.segment {
  position: relative;
  height: 100%;
  background: var(--grey);
  border-right: 1px solid rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: filter 0.1s;
  min-width: 2px;
}
.segment:hover { filter: brightness(1.25); }
.segment.green { background: var(--green); }
.segment.yellow { background: var(--yellow); }
.segment.red { background: var(--red); }
.segment.active { outline: 2px solid #fff; outline-offset: -2px; z-index: 2; }

.needle {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 3;
  left: 0;
}

/* ---------------------------------------------------------- Szenenliste */

.scene-list { margin-top: 14px; }

.scene {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 8px 14px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.scene.active { border-color: var(--accent); }

.scene .num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.scene .name { cursor: pointer; }
.scene .name strong { display: block; }
.scene .name .tc {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.flags { display: flex; gap: 6px; }

.flag-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
}
.flag-btn:hover { border-color: var(--muted); }
.flag-btn.green.on { background: var(--green); border-color: var(--green); }
.flag-btn.yellow.on { background: var(--yellow); border-color: var(--yellow); }
.flag-btn.red.on { background: var(--red); border-color: var(--red); }
.flag-btn.green:not(.on)::after,
.flag-btn.yellow:not(.on)::after,
.flag-btn.red:not(.on)::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  opacity: 0.6;
}
.flag-btn.green::after { background: var(--green); }
.flag-btn.yellow::after { background: var(--yellow); }
.flag-btn.red::after { background: var(--red); }

.scene .status {
  grid-column: 4;
  font-size: 12px;
  color: var(--muted);
  min-width: 90px;
  text-align: right;
}
.scene .status.err { color: #ff8a80; }

.scene textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 34px;
  resize: vertical;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
}
.scene textarea::placeholder { color: var(--grey); }

.hints {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .scene { grid-template-columns: 32px 1fr auto; }
  .scene .status { grid-column: 3; }
  .hints { display: none; }
}
