/* Optik 1:1 aus der ursprünglichen MCU-Watchlist.html, erweitert um
   Sterne, Sehdatum, Menü, Login und Import (Abschnitte "NEU"). */
:root {
  --bg: #09090f;
  --red: #E23636;
  --red-dark: #B01010;
  --gold: #F5B800;
  --blue: #5ba3e8;
  --border: #1c1c2e;
  --filter-bg: #0f0f1e;
  --text: #dde;
  --muted: #666;
  --dim: #444;
  --green: #3daa73;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ── HEADER ─────────────────────────────────── */
.header {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  padding: 20px 16px 18px;
  padding-top: max(20px, env(safe-area-inset-top, 20px));
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.header-eyebrow {
  display: block;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.header-title { font-size: 26px; font-weight: 900; color: #fff; line-height: 1.1; }
.header-sub   { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 3px; }

.save-chip {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,.25);
  padding: 5px 11px;
  border-radius: 16px;
  opacity: 0;
  transition: opacity .25s;
  white-space: nowrap;
  align-self: flex-start;
}
.save-chip.visible { opacity: 1; }
.save-chip.err     { background: rgba(255,50,50,.35); }

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 6px;
}
.progress-track {
  height: 7px;
  background: rgba(255,255,255,.25);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 4px;
  width: 0%;
  transition: width .4s ease;
}

/* ── FILTER BAR ─────────────────────────────── */
.filter-bar {
  background: var(--filter-bg);
  border-bottom: 1px solid #1a1a2e;
  position: sticky;
  top: 0;
  z-index: 100;
}
.filter-scroll {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.pill {
  background: #1a1a2e;
  color: #888;
  border: none;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.pill.active { background: var(--red); color: #fff; font-weight: 700; }

/* ── PHASE SECTION ──────────────────────────── */
.phase-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 8px;
  background: var(--bg);
}
.phase-bar        { width: 4px; height: 32px; border-radius: 2px; background: var(--red); flex-shrink: 0; }
.phase-bar.blue   { background: var(--blue); }
.phase-titles     { flex: 1; }
.phase-label      { font-size: 15px; font-weight: 800; color: #fff; }
.phase-label.blue { color: var(--blue); }
.phase-sub        { font-size: 11px; color: var(--muted); margin-top: 1px; }
.phase-stat       { font-size: 12px; font-weight: 700; color: var(--dim); text-align: right; }
.phase-stat.done  { color: var(--green); }
.phase-count      { font-size: 11px; color: #3a4a6a; font-weight: 600; }

/* ── ITEM ROW ───────────────────────────────── */
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity .2s;
}
.item:active { opacity: .6; }
/* Vorlage: ganze Zeile .4 — jetzt nur Haken/Titel/Typ, damit Sterne lesbar bleiben */
.item.checked .cb,
.item.checked .title-row,
.item.checked .meta-row { opacity: .4; }

.cb {
  width: 26px; min-width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid #3a3a55;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  transition: background .15s, border .15s, box-shadow .15s;
}
.item.checked    .cb { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px rgba(226,54,54,.35); }
.item.upcoming:not(.checked) .cb { border-style: dashed; }

.item-body   { flex: 1; min-width: 0; }
.title-row   { display: flex; align-items: flex-start; gap: 6px; }
.item-title  { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; flex: 1; overflow-wrap: anywhere; }
.item.checked .item-title { text-decoration: line-through; color: #555; }
.item.upcoming:not(.checked) .item-title { color: #888; }
.item-num    { color: var(--dim); }

.new-badge {
  background: var(--gold);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .8px;
  flex-shrink: 0;
  margin-top: 3px;
}

.meta-row  { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.type-tag  { font-size: 11px; font-weight: 600; color: #5ba3e8; }
.type-tag.t-serie     { color: #a07be0; }
.type-tag.t-netflix   { color: #e87722; }
.type-tag.t-animation { color: #3daa73; }
.type-tag.t-special   { color: #7ec8a0; }
.date-text { font-size: 11px; color: var(--dim); }
.item.upcoming .date-text { color: #3a5a7a; }
.hint-text { font-size: 11px; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }

/* ── NEU: Sterne und Sehdatum ───────────────── */
.status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  cursor: default;
}
.stars { display: flex; }
.star {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  color: #2e2e48;
  padding: 3px 3px;
  min-width: 30px;
  min-height: 30px;
  cursor: pointer;
  transition: color .12s, transform .12s;
}
.star:first-child { padding-left: 0; min-width: 26px; text-align: left; }
.star.on { color: var(--gold); }
.star:active { transform: scale(1.25); }
.watch-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.watch-date input {
  background: #141426;
  color: var(--text);
  border: 1px solid #2a2a44;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
  min-height: 30px;
}

/* ── NEU: Menü im Header ────────────────────── */
.header-right { display: flex; align-items: center; gap: 8px; position: relative; }
.menu-btn {
  background: rgba(0,0,0,.2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.menu {
  position: absolute;
  top: 40px;
  right: 0;
  z-index: 200;
  background: #14142a;
  border: 1px solid #262640;
  border-radius: 12px;
  padding: 6px;
  min-width: 190px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.menu a, .menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}
.menu a:hover, .menu button:hover { background: #1f1f38; }

/* ── EMPTY STATE ────────────────────────────── */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 2.2;
}
.empty-icon { font-size: 48px; display: block; margin-bottom: 8px; }
.empty small { color: #444; }

/* ── NEU: Formulare (Login, Import) ─────────── */
.page { max-width: 760px; margin: 0 auto; padding: 18px 16px; }
.card {
  background: #0f0f1e;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.card h2 { font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.card p, .card li { font-size: 13px; line-height: 1.55; color: #aab; }
.card ul { padding-left: 18px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.input, .textarea {
  width: 100%;
  background: #141426;
  color: var(--text);
  border: 1px solid #2a2a44;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
}
.textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 180px; resize: vertical; }
.input:focus, .textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: #1a1a2e; color: #aab; font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.msg.err { color: #ff7b7b; }
.msg.ok  { color: var(--green); }
.back-link { color: rgba(255,255,255,.85); font-size: 13px; text-decoration: none; font-weight: 600; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre.sample {
  background: #09090f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #aab;
  overflow-x: auto;
  margin-top: 8px;
}

/* ── NEU: Import-Vorschau ───────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chip { background: #1a1a2e; color: #ccd; border-radius: 14px; padding: 5px 11px; font-size: 12px; font-weight: 700; }
.chip.c-new    { background: rgba(61,170,115,.18); color: #6fd3a0; }
.chip.c-upd    { background: rgba(91,163,232,.18); color: #8cc4f5; }
.chip.c-review { background: rgba(245,184,0,.18);  color: var(--gold); }
.chip.c-skip   { background: rgba(226,54,54,.18);  color: #ff8c8c; }
.group h3 { font-size: 13px; font-weight: 800; color: #fff; margin: 14px 0 6px; }
.rows { list-style: none; padding: 0 !important; }
.rows li {
  border-top: 1px solid var(--border);
  padding: 9px 0;
  font-size: 13px;
  color: var(--text);
}
.rows .line  { color: var(--dim); font-size: 11px; margin-right: 6px; }
.rows .sub   { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.rows .warn  { display: block; color: var(--gold); font-size: 12px; margin-top: 3px; }
.rows .reason { display: block; color: #ff8c8c; font-size: 12px; margin-top: 3px; }
.choice { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; font-size: 13px; color: #ccd; cursor: pointer; }
.choice input { margin-top: 3px; accent-color: var(--red); }
details summary { cursor: pointer; font-size: 13px; color: #aab; margin-top: 12px; }
