/* ============================================================
   FILMLISTE – styles.css · v8 "Liquid Glass"
   Mobile-first · dunkles Kino-Design · Apple-Liquid-Glass-Optik
   ============================================================ */
:root {
  --bg: #0a0a0e;
  --bg2: #121218;
  --panel: #18181f;
  --panel2: #20202a;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.17);
  --text: #f5f5f7;
  --muted: #a0a0ab;
  --faint: #6d6d78;
  --red: #e50914;
  --red-soft: rgba(229,9,20,0.16);
  --green: #46d369;
  --green-soft: rgba(70,211,105,0.14);
  --gold: #e8b425;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 26px;
  --shadow: 0 18px 48px rgba(0,0,0,0.65);
  --nav-h: 92px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
button, .chip, .qpill, .tab { touch-action: manipulation; }
html { scrollbar-color: #2a2a32 var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
a { color: var(--text); }
button { font-family: inherit; }
[data-ic] svg { display: inline-block; vertical-align: -4px; }
.ico-big { color: var(--faint); margin-bottom: 12px; }
.desktop-only { display: none !important; }
.serif { font-family: "Cormorant Garamond", Georgia, serif; }

/* ============ Liquid Glass ============ */
.liquid {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03) 45%, rgba(255,255,255,0.07));
  backdrop-filter: blur(16px) saturate(1.7) brightness(1.06);
  -webkit-backdrop-filter: blur(16px) saturate(1.7) brightness(1.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 1px rgba(255,255,255,0.05),
    inset 1px 0 0 rgba(255,255,255,0.07),
    0 12px 36px rgba(0,0,0,0.45);
  will-change: transform;
}
/* Chromium: echte Refraktion via SVG-Displacement (siehe #lg-dist in index.html) */
.lg-on .liquid {
  backdrop-filter: url(#lg-dist) blur(9px) saturate(1.7) brightness(1.07);
  -webkit-backdrop-filter: url(#lg-dist) blur(9px) saturate(1.7) brightness(1.07);
}
.liquid::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.28), transparent 28%, transparent 70%, rgba(255,255,255,0.10));
  opacity: 0.5;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}

/* ============ Header ============ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: transparent;
  transition: transform 0.32s ease, background 0.35s;
}
header.scrolled { background: rgba(10,10,14,0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
header.hide { transform: translateY(-100%); }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center; gap: 10px; }
.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.logo img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.logo .name {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600;
  font-size: 1.5rem; letter-spacing: 0.4px; line-height: 1; color: var(--text);
}
.spacer { flex: 1; }
.hbtn {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent;
  color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.12s;
}
.hbtn:active { transform: scale(0.9); }
.hbtn:hover { background: rgba(255,255,255,0.08); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--red);
  color: #fff; font-weight: 800; font-size: 0.95rem; overflow: hidden;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu {
  position: absolute; right: 0; top: 48px; border-radius: var(--r-md); padding: 6px;
  min-width: 220px; display: none; z-index: 70;
  background: rgba(20,20,26,0.92);
}
.menu.open { display: block; }
.menu .item {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 0.87rem; color: var(--text); background: none; border: none; width: 100%; text-align: left;
}
.menu .item:hover { background: rgba(255,255,255,0.07); }
.menu .who { padding: 9px 12px 4px; font-size: 0.75rem; color: var(--faint); word-break: break-all; }
.menu hr { border: none; border-top: 1px solid var(--line); margin: 5px 0; }

nav.tabs { display: flex; gap: 4px; margin-left: 18px; }
.tab {
  padding: 9px 13px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.88rem;
  white-space: nowrap; user-select: none; border-radius: var(--r-sm);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); font-weight: 800; }

main { padding: 0 0 calc(var(--nav-h) + var(--safe-b) + 16px); position: relative; z-index: 1; }
#bgCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#view-grid, #view-search, #view-library, #view-listdetail { padding: 78px 20px 0; max-width: 1400px; margin: 0 auto; }
.controls { margin-bottom: 18px; }
.grid { gap: 14px; }
.list-card.liquid { border: none; }

/* ============ Quick-Genres (Pills mit Icons) ============ */
.quick-genres {
  display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none;
  padding: 72px 20px 10px; position: relative; z-index: 6;
}
.quick-genres.inpage { padding: 4px 18px 12px; margin: 0 -18px; }
.quick-genres .seg.glassy {
  background: rgba(20,20,26,0.55); border-color: var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
button.qpill { font-family: inherit; cursor: pointer; }
.ctrl-bar { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 26px; padding: 4px; }
/* Weicher Rundum-Halo statt harter Schattenkante über dem Billboard */
.ctrl-bar.liquid {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 1px rgba(255,255,255,0.05),
    0 0 30px 8px rgba(0,0,0,0.32);
}
.ctrl-filter {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: none; cursor: pointer;
  color: var(--text); font-weight: 700; font-size: 0.85rem; padding: 8px 14px; border-radius: 20px;
  font-family: inherit;
}
.ctrl-filter:active { transform: scale(0.95); }
.ctrl-div { width: 1px; height: 22px; background: var(--line-strong); margin: 0 5px; flex-shrink: 0; }
.ctrl-seg { display: flex; gap: 2px; }
.ctrl-seg button {
  background: none; border: none; color: var(--muted); cursor: pointer; font-family: inherit;
  padding: 8px 15px; border-radius: 18px; font-weight: 700; font-size: 0.85rem;
  transition: background 0.2s, color 0.2s;
}
.ctrl-seg button.active { background: var(--text); color: #000; }
.quick-genres::-webkit-scrollbar { display: none; }
.qpill {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 9px 16px; border-radius: var(--r-pill); cursor: pointer;
  font-size: 0.84rem; font-weight: 600; color: var(--text);
  border-radius: var(--r-pill); user-select: none; transition: transform 0.12s;
}
.qpill:active { transform: scale(0.94); }
.qpill [data-ic] { color: var(--muted); }
.qpill.active { background: var(--text); color: #000; border-color: transparent; }
.qpill.active::after { display: none; }
.qpill.active [data-ic] { color: #b3000a; }
.qpill .seg-count { background: var(--panel2); border-radius: 9px; padding: 0 7px; font-size: 0.72rem; }
.qpill.active .seg-count { background: rgba(0,0,0,0.14); color: #000; }
.tabs-row {
  display: flex; gap: 8px; flex-wrap: nowrap; align-items: center;
  flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0;
}
.tabs-row::-webkit-scrollbar { display: none; }
.tabs-row .qpill { flex: 0 0 auto; }
.lib-tabs { align-items: center; flex-wrap: nowrap; gap: 10px; }

/* ============ Hero (Titel volle Breite, fixe Höhen, läuft oben aus) ============ */
.billboard { position: relative; padding: 0 0 16px; overflow: hidden; }
.bb-img-wrap { position: absolute; inset: -4%; z-index: 0; }
.bb-img-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,10,14,0.88), rgba(10,10,14,0.4) 110px, transparent 230px);
}
.bb-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; filter: blur(26px) brightness(0.42) saturate(1.25);
  transform: scale(1.15); will-change: opacity;
}
.bb-grain {
  position: absolute; inset: -8%; pointer-events: none; opacity: 0.08; mix-blend-mode: overlay; z-index: 1;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2"/></filter><rect width="180" height="180" filter="url(%23n)" opacity="0.7"/></svg>');
  animation: grain 0.85s steps(4) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0,0); }
  25% { transform: translate(-2%,2%); }
  50% { transform: translate(2%,-2%); }
  75% { transform: translate(-1%,-2%); }
}
.bb-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 1; background: linear-gradient(to bottom, transparent, var(--bg)); }
.bb-content { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding: 14px 20px 0; }
.bb-tag {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase;
  color: #ff4d55; margin-bottom: 14px; height: 1em;
}
.bb-title {
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600;
  font-size: clamp(1.9rem, 7.6vw, 3.3rem); line-height: 1.02; letter-spacing: 0.035em;
  text-transform: uppercase; margin-bottom: 14px; width: 100%;
  height: 2.1em; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 4px 26px rgba(0,0,0,0.55); overflow-wrap: anywhere;
}
.bb-title .ch { display: inline-block; will-change: transform; }
.bb-split { display: flex; gap: 16px; align-items: flex-start; }
.bb-left { flex: 1.15; min-width: 0; display: flex; flex-direction: column; }
.bb-meta {
  color: var(--muted); font-size: 0.8rem; margin-bottom: 12px; height: 1.3em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.bb-overview {
  font-size: 0.85rem; color: rgba(245,245,247,0.78); line-height: 1.62;
  height: 8.1em; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 16px;
}
.bb-rating { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 0.95rem; height: 1.4em; }
.bb-rating .star { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--text); }
.bb-rating .match { color: var(--muted); font-weight: 600; }
.bb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bb-actions .btn { padding: 10px 15px; font-size: 0.84rem; }
.bb-right { flex: 0.92; min-width: 0; display: flex; align-items: flex-start; }
.bb-poster {
  width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block;
  border-radius: 18px; border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 26px 60px rgba(0,0,0,0.65);
  will-change: transform, opacity; background: var(--panel);
}
.bb-dots { display: flex; gap: 7px; margin-top: 28px; margin-bottom: 10px; justify-content: center; align-items: center; }
.bb-dots span {
  width: 7px; height: 7px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.26); border: 1px solid rgba(255,255,255,0.14);
  position: relative; overflow: hidden;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}
.bb-dots span.on {
  width: 40px; border-radius: 5px;
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.bb-dots span.on::after {
  content: ""; position: absolute; inset: 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ff4d55);
  box-shadow: 0 0 10px rgba(229,9,20,0.55);
  animation: dotfill 8s linear forwards;
}
@keyframes dotfill { to { width: 100%; } }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: rgba(255,255,255,0.1); color: var(--text);
  border: none; padding: 11px 18px; border-radius: var(--r-md); cursor: pointer;
  font-size: 0.88rem; font-weight: 700; white-space: nowrap;
  transition: transform 0.12s, background 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 10px 28px rgba(229,9,20,0.35); }
.btn.primary:active { background: #c00712; }
.btn.glass { border-radius: var(--r-md); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.big { padding: 13px 22px; font-size: 0.94rem; border-radius: 16px; }
.btn.danger { color: #ff6b70; }
.btn:disabled { opacity: 0.5; }
.btn.google { width: 100%; background: #fff; color: #1a1a1a; font-weight: 700; padding: 12px; border-radius: var(--r-md); }

/* ============ Rows ============ */
.rows { position: relative; z-index: 5; margin-top: 6px; display: flex; flex-direction: column; gap: 26px; padding-bottom: 10px; }
.row { max-width: 1400px; margin: 0 auto; width: 100%; }
.row-head { display: flex; align-items: center; justify-content: space-between; padding: 0 22px; margin-bottom: 10px; }
.row-head h2 { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.2px; display: flex; align-items: center; gap: 6px; }
.row-head .more { background: none; border: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; padding: 4px; }
.row-scroller {
  display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 4px 22px 12px;
  scroll-snap-type: x proximity; scrollbar-width: none; scroll-padding-left: 22px;
  overscroll-behavior-x: contain; touch-action: pan-x pan-y;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 42px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 42px), transparent 100%);
}
.row-scroller::-webkit-scrollbar { display: none; }
.tile {
  flex: 0 0 auto; width: 29vw; max-width: 150px; border-radius: var(--r-sm); overflow: hidden;
  position: relative; cursor: pointer; scroll-snap-align: start;
  background: var(--panel); transition: transform 0.18s ease;
  opacity: 0; transform: translateY(20px);
}
.tile.shown { opacity: 1; transform: none; }
.tile img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--bg2); }
.tile .tile-seen {
  position: absolute; top: 6px; right: 6px; background: var(--green); color: #04280f;
  border-radius: 6px; padding: 3px 5px; display: none; line-height: 1;
}
.tile.is-seen .tile-seen { display: block; }

/* Top 10: Nummern VOR den Postern */
.tile-num { flex: 0 0 auto; width: 40vw; max-width: 195px; display: flex; align-items: flex-end; position: relative; }
.tile-num .num {
  font-family: "Bebas Neue", sans-serif; font-size: clamp(4.6rem, 15vw, 8rem); line-height: 0.76;
  color: rgba(10,10,14,0.55); -webkit-text-stroke: 2.5px #c9c9d2; letter-spacing: -4px;
  margin-right: -22px; z-index: 4; flex-shrink: 0; user-select: none; pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.8));
}
.tile-num .tile { width: 62%; z-index: 2; }
.tile-num + .tile-num { margin-left: -16px; }

/* Listen-Row (Dashboard) */
.list-tile {
  flex: 0 0 auto; width: 200px; border-radius: var(--r-md); padding: 14px 16px;
  cursor: pointer; scroll-snap-align: start; user-select: none;
  display: flex; flex-direction: column; gap: 6px; transition: transform 0.15s;
}
.list-tile:active { transform: scale(0.96); }
.list-tile .lt-ico { color: var(--red); }
.list-tile h3 { font-size: 0.92rem; font-weight: 800; line-height: 1.25; }
.list-tile .sub { color: var(--faint); font-size: 0.76rem; }

.skeleton { background: linear-gradient(100deg, var(--panel) 40%, var(--panel2) 50%, var(--panel) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-tile { flex: 0 0 auto; width: 31vw; max-width: 150px; aspect-ratio: 2/3; border-radius: var(--r-sm); }

/* ============ Grids & Cards (clean, ohne Button-Reihe) ============ */
.grid-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.grid-head h2 { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.3px; }
.grid-head .hbtn { border-radius: 50%; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: flex; background: rgba(255,255,255,0.06); border-radius: var(--r-md); padding: 3px; border: 1px solid var(--line); }
.seg button {
  background: none; border: none; color: var(--muted); padding: 8px 15px; cursor: pointer;
  border-radius: 11px; font-size: 0.84rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
}
.seg button.active { background: var(--text); color: #000; }
.seg.small button { padding: 6px 12px; font-size: 0.8rem; }
.seg-count { background: rgba(0,0,0,0.15); border-radius: 7px; padding: 0 7px; font-size: 0.72rem; }
.seg button:not(.active) .seg-count { background: var(--panel2); }

select, input[type="text"], input[type="email"], input[type="password"] {
  background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--line-strong);
  padding: 11px 13px; border-radius: var(--r-md); font-size: 0.92rem; outline: none; font-family: inherit;
}
select:focus, input:focus { border-color: rgba(255,255,255,0.4); }
::placeholder { color: var(--faint); }
.search-wrap { position: relative; flex: 1; min-width: 160px; }
.search-wrap input { width: 100%; padding-right: 42px; }
.s-clear {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.1); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.s-clear:active { transform: translateY(-50%) scale(0.88); }

.check { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; cursor: pointer; user-select: none; }
.check input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 44px; height: 26px; border-radius: 13px; position: relative; cursor: pointer;
  background: rgba(255,255,255,0.1); border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  transition: background 0.25s, border-color 0.25s;
}
.check input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.check input:checked { background: var(--red); border-color: var(--red); }
.check input:checked::after { transform: translateX(18px); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; margin: 0 -18px 14px; padding-left: 18px; padding-right: 18px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line-strong); color: var(--muted);
  padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; font-size: 0.83rem; font-weight: 600;
  white-space: nowrap; transition: all 0.15s; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:active { transform: scale(0.95); }
.chip.active { background: var(--text); color: #000; border-color: var(--text); font-weight: 800; }
.chip.fav { background: var(--red); border-color: var(--red); color: #fff; font-weight: 800; }
.chip.hide { opacity: 0.45; text-decoration: line-through; }
.chip img { width: 20px; height: 20px; border-radius: 5px; }
.chip.sub-on { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 800; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.card { border-radius: var(--r-md); overflow: hidden; cursor: pointer; position: relative; background: var(--panel); }
.card.reveal-init { opacity: 0; transform: translateY(24px); }
.poster-wrap { position: relative; }
.card img.poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; background: var(--bg2); }
.card .noposter { width: 100%; aspect-ratio: 2/3; display: flex; align-items: center; justify-content: center; color: var(--faint); background: var(--bg2); }
.card .info { padding: 10px 11px 11px; }
.card .title {
  font-size: 0.85rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta { color: var(--faint); font-size: 0.73rem; margin-top: 3px; display: flex; gap: 7px; }
.badge {
  position: absolute; top: 8px; font-weight: 800; font-size: 0.7rem;
  padding: 4px 7px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge.rating { left: 8px; background: rgba(8,8,11,0.7); color: var(--gold); }
.badge.seen { right: 8px; background: rgba(70,211,105,0.92); color: #04280f; display: none; padding: 4px 5px; }
.badge.watch { right: 8px; background: rgba(229,9,20,0.92); color: #fff; display: none; padding: 4px 5px; }
.card.is-seen .badge.seen { display: inline-flex; }
.card.is-watch:not(.is-seen) .badge.watch { display: inline-flex; }
.card-remove {
  position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--line-strong); cursor: pointer;
  background: rgba(10,10,14,0.75); color: #ff8589;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.12s;
}
.card-remove:active { transform: scale(0.85); }
.hbtn.danger { color: #ff8589; }
.card.no-seen-badge .badge.seen, .card.no-watch-badge .badge.watch { display: none !important; }
.card.no-seen-badge.is-seen img.poster { opacity: 1; filter: none; }

.load-more { display: flex; margin: 26px auto; padding: 12px 36px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; line-height: 1.8; font-size: 0.95rem; }
.spinner { text-align: center; padding: 44px; color: var(--faint); font-size: 0.9rem; }

/* ============ Swipe ============ */
#view-swipe {
  position: relative; display: flex; flex-direction: column;
  height: calc(100vh - var(--nav-h) - var(--safe-b)); /* Fallback ältere iOS-Safari */
  height: calc(100dvh - var(--nav-h) - var(--safe-b)); min-height: 500px;
  padding-top: 64px; overflow: hidden;
}
#swipeCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.deck-wrap, .swipe-actions { position: relative; z-index: 2; }
.swipe-gear { position: absolute; top: 8px; right: 14px; z-index: 8; }
.swipe-gear .hbtn { border-radius: 50%; }
.swipe-pop {
  position: absolute; top: 48px; right: 0; border-radius: var(--r-md); padding: 14px;
  display: none; flex-direction: column; gap: 12px; min-width: 244px; z-index: 9;
  background: rgba(18,18,24,0.9);
}
.swipe-pop.open { display: flex; }
.swipe-pop .seg { width: 100%; }
.swipe-pop .seg button { flex: 1; }
.swipe-pop select { width: 100%; }
.swipe-pop .check { font-size: 0.85rem; }
.deck-wrap { flex: 1; min-height: 340px; }
.deck { position: absolute; inset: 0; }
.deck-card {
  position: absolute; inset: 0; margin: auto;
  width: min(90vw, calc((100vh - 200px) * 0.62), 400px);
  width: min(90vw, calc((100dvh - 200px) * 0.62), 400px);
  aspect-ratio: 2/3; height: auto;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-strong);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  touch-action: none; user-select: none; will-change: transform;
}
.deck-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.deck-card .dc-grad { position: absolute; left: 0; right: 0; bottom: 0; height: 58%; background: linear-gradient(to top, rgba(5,5,8,0.96) 10%, transparent); pointer-events: none; }
.deck-card .dc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; pointer-events: none; }
.deck-card .dc-title { font-size: 1.35rem; font-weight: 900; letter-spacing: -0.3px; line-height: 1.1; margin-bottom: 7px; }
.deck-card .dc-meta { color: rgba(255,255,255,0.8); font-size: 0.82rem; display: flex; gap: 10px; align-items: center; }
.deck-card .dc-meta .match { color: var(--green); font-weight: 800; }
.deck-card .dc-overview {
  margin-top: 8px; color: rgba(255,255,255,0.65); font-size: 0.8rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.stamp {
  position: absolute; top: 24px; padding: 7px 15px; border-radius: 8px;
  font-weight: 900; font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase;
  border: 3px solid; opacity: 0; pointer-events: none;
}
.stamp.save { right: 16px; color: #fff; border-color: #fff; background: var(--red); transform: rotate(10deg); }
.stamp.nope { left: 16px; color: #c8c8cf; border-color: #c8c8cf; background: rgba(40,40,46,0.85); transform: rotate(-10deg); }
.stamp.seen { left: 50%; top: 38%; translate: -50% -50%; color: #04280f; border-color: var(--green); background: var(--green); }
.deck-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; line-height: 1.8; }
.edge-label {
  position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text); opacity: 0; pointer-events: none; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase;
}
.edge-label b { font-weight: 800; }
.edge-label.left { left: 10px; top: 50%; transform: translateY(-50%); color: #c8c8cf; }
.edge-label.right { right: 10px; top: 50%; transform: translateY(-50%); color: #ff4d55; }
.edge-label.top { top: 6px; left: 50%; transform: translateX(-50%); color: var(--green); }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 12px 0 14px; }
.fab {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: rgba(28,28,34,0.9); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
  transition: transform 0.12s, box-shadow 0.2s, border-color 0.2s;
}
.fab:active { transform: scale(0.86); }
.fab.nope { color: #c8c8cf; }
.fab.save { color: #fff; background: var(--red); border-color: var(--red); width: 62px; height: 62px; box-shadow: 0 12px 32px rgba(229,9,20,0.4); }
.fab.info { color: var(--muted); width: 44px; height: 44px; }
.fab.lit { transform: scale(1.18); }
.fab.nope.lit { border-color: #ff8589; }
.fab.save.lit { box-shadow: 0 0 34px rgba(229,9,20,0.75); }

/* Tutorial */
.tut-overlay {
  position: absolute; inset: 0; z-index: 20; background: rgba(8,8,11,0.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  padding: 24px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tut-card-zone { position: relative; width: 150px; height: 215px; }
.tut-ghost {
  position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(160deg, #2a2a32, #17171c);
  border: 1px solid var(--line-strong); will-change: transform;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.tut-stamp {
  position: absolute; top: 14px; padding: 4px 9px; border-radius: 6px;
  font-weight: 900; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;
  border: 2px solid; opacity: 0;
}
.tut-stamp.save { right: 10px; color: #fff; border-color: #fff; background: var(--red); transform: rotate(10deg); }
.tut-stamp.nope { left: 10px; color: #c8c8cf; border-color: #c8c8cf; background: rgba(40,40,46,0.9); transform: rotate(-10deg); }
.tut-stamp.seen { left: 50%; top: 42%; translate: -50% -50%; color: #04280f; border-color: var(--green); background: var(--green); }
.tut-text { font-size: 1rem; color: var(--text); text-align: center; line-height: 1.6; min-height: 3.2em; max-width: 320px; }
.tut-text .c-save { color: #ff4d55; }
.tut-text .c-nope { color: #c8c8cf; }
.tut-text .c-seen { color: var(--green); }

/* ============ Listen ============ */
.list-head {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
  border-radius: var(--r-lg); padding: 18px 20px; background: rgba(255,255,255,0.04);
}
.list-head h2 { font-size: 1.3rem; font-weight: 900; letter-spacing: -0.3px; }
.list-head .by { color: var(--faint); font-size: 0.82rem; margin-top: 4px; }
.list-head .head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list-head .head-actions .hbtn { background: rgba(255,255,255,0.07); }
.lists-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.list-card {
  border-radius: var(--r-lg); padding: 18px 20px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  transition: border-color 0.15s, transform 0.12s;
}
.list-card:active { transform: scale(0.98); }
.list-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 5px; }
.list-card .sub { color: var(--faint); font-size: 0.8rem; }

/* ============ Sheet (Detail) ============ */
.sheet-overlay { position: fixed; inset: 0; background: rgba(4,4,7,0.72); z-index: 100; display: none; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-overlay.open { display: block; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: 6vh; top: 6dvh;
  background: var(--bg2); border-radius: 22px 22px 0 0;
  border: 1px solid var(--line-strong); border-bottom: none;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.65);
  will-change: transform; transform: translateY(100%);
}
.sheet-grip { padding: 10px 0 6px; display: flex; justify-content: center; cursor: grab; touch-action: none; flex-shrink: 0; }
.sheet-grip span { width: 42px; height: 5px; border-radius: 3px; background: var(--line-strong); display: block; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet .bd-wrap { position: relative; }
.sheet .backdrop { width: 100%; aspect-ratio: 16/8.6; object-fit: cover; display: block; }
.sheet .bd-fade { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg2) 2%, transparent 55%); }
.sheet .close, .sheet .share {
  position: absolute; top: 12px; background: rgba(8,8,11,0.7); border: 1px solid var(--line);
  color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sheet .close { right: 14px; }
.sheet .share { right: 60px; }
.sheet .body { padding: 16px 20px 44px; }
.sheet h2 { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.4px; margin-bottom: 8px; }
.sheet .sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet .sub .match { color: var(--green); font-weight: 800; }
.sheet .sub .star { color: var(--gold); display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.sheet .genre-tags { display: flex; gap: 7px; flex-wrap: wrap; margin: -4px 0 14px; }
.sheet .gtag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 14px; padding: 4px 11px;
}
.sheet .gtag [data-ic] { color: var(--faint); }
.sheet .overview { line-height: 1.7; font-size: 0.92rem; color: #cdcdd4; margin-bottom: 18px; }
.sheet .big-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.abo-hint {
  display: inline-flex; align-items: center; gap: 7px; margin: 4px 0 10px;
  background: var(--green-soft); color: var(--green); border: 1px solid rgba(70,211,105,0.4);
  border-radius: var(--r-md); padding: 8px 14px; font-size: 0.84rem; font-weight: 700;
}
.add-to-list { display: flex; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.add-to-list select { flex: 1; min-width: 150px; }
.providers h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.7px; color: var(--faint); margin: 16px 0 9px; font-weight: 800; }
.prov-row { display: flex; gap: 9px; flex-wrap: wrap; }
.prov {
  display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  padding: 6px 13px 6px 6px; border-radius: var(--r-md); font-size: 0.84rem; font-weight: 500;
}
.prov img { width: 30px; height: 30px; border-radius: 7px; }
.prov.mine { border-color: var(--green); background: var(--green-soft); }
.prov.mine .pm { color: var(--green); display: inline-flex; }
.attribution { font-size: 0.7rem; color: var(--faint); margin-top: 16px; }

/* ============ Dialoge / Setup ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(4,4,7,0.85); z-index: 120; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-overlay.open { display: flex; }
.dialog {
  background: rgba(18,18,24,0.96); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  max-width: 400px; width: 100%; padding: 26px; box-shadow: var(--shadow); position: relative;
}
.dialog h2 { font-size: 1.2rem; font-weight: 900; margin-bottom: 8px; }
.dialog p { color: var(--muted); font-size: 0.86rem; line-height: 1.65; margin-bottom: 14px; }
.dialog input:not([type="checkbox"]) { width: 100%; margin-bottom: 10px; }
.dialog input[type="checkbox"] { width: 44px; margin-bottom: 0; flex-shrink: 0; }
.dialog .close { position: absolute; top: 12px; right: 12px; background: none; border: none; color: var(--muted); cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.dialog .ok { color: var(--green); font-size: 0.86rem; display: none; margin-top: 10px; }
.dialog .error { color: #ff8589; font-size: 0.85rem; display: none; margin-top: 10px; }
.section-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.8px; color: var(--faint); margin: 4px 0 8px; font-weight: 800; }
.dialog .section-label { margin: 18px 0 10px; }
.dialog.wide { max-width: 500px; max-height: 84vh; overflow-y: auto; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 0.75rem; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ============ Einstellungen-Seite ============ */
#view-settings { padding: 76px 18px 0; max-width: 760px; margin: 0 auto; }
.set-card { border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; }
.set-hint { color: var(--muted); font-size: 0.82rem; line-height: 1.6; margin: 2px 0 12px; }
.set-hint a { color: var(--text); }
.set-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* ============ Filter-Sheet ============ */
.modal-overlay.bottomish { align-items: flex-end; padding: 0; }
.modal-overlay.bottomish .dialog {
  max-width: none; border-radius: 24px 24px 0 0; padding: 12px 22px calc(26px + var(--safe-b));
  max-height: 92vh; max-height: 92dvh; overflow-y: auto;
}
.modal-overlay.bottomish .dialog.liquid {
  background: linear-gradient(150deg, rgba(22,22,30,0.62), rgba(14,14,20,0.58));
}
.drag-dash { width: 42px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 16px; }
.chips.scroll-y { }
.star-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.star-btn {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: rgba(255,255,255,0.22); transition: color 0.15s, transform 0.1s;
}
.star-btn:active { transform: scale(0.85); }
.star-btn.on { color: var(--red); filter: drop-shadow(0 0 10px rgba(229,9,20,0.5)); }
.star-row .score-val { margin-left: 8px; }
.f-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 18px 0 2px; color: var(--text); font-size: 0.9rem; font-weight: 600;
}
.score-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.score-row input[type="range"] { flex: 1; accent-color: var(--red); }
.score-val { min-width: 52px; text-align: right; color: var(--text); font-weight: 800; font-size: 0.92rem; }

/* ============ Trailer-Popup ============ */
.trailer-box {
  position: relative; width: min(94vw, 860px); aspect-ratio: 16/9;
  background: #000; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.trailer-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.trailer-box .close {
  position: absolute; top: 8px; right: 8px; background: rgba(8,8,11,0.75); border: none;
  color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}

#setup { max-width: 520px; margin: 80px auto; background: var(--bg2); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 34px; display: none; }
#setup p { color: var(--muted); line-height: 1.75; font-size: 0.92rem; margin-bottom: 14px; }
#setup ol { color: var(--muted); font-size: 0.92rem; line-height: 2; margin: 0 0 18px 20px; }
#setup input { width: 100%; margin-bottom: 12px; }
#setup .error { color: #ff8589; font-size: 0.85rem; margin-top: 12px; display: none; }

/* ============ Bottom-Nav (Liquid Glass) ============ */
.bottom-nav {
  position: fixed; left: 16px; right: 16px; bottom: calc(12px + var(--safe-b)); z-index: 90;
  height: 66px; max-width: 430px; margin: 0 auto;
  border-radius: 33px;
  display: none; justify-content: space-around; align-items: stretch;
}
body.app-on .bottom-nav { display: flex; }
.bottom-nav { overflow: hidden; }
.bottom-nav button {
  flex: 1; background: none; border: none; color: rgba(255,255,255,0.88); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.2px;
  transition: color 0.18s, transform 0.1s; position: relative;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.95)) drop-shadow(0 0 7px rgba(0,0,0,0.55));
}
.bottom-nav button:active { transform: scale(0.9); }
.bottom-nav button.active { color: var(--text); }
.bottom-nav button.active [data-ic] {
  color: var(--red);
  filter: drop-shadow(0 0 8px rgba(229,9,20,0.9)) drop-shadow(0 0 18px rgba(229,9,20,0.5));
}

/* ============ Sonstiges ============ */
footer { text-align: center; color: var(--faint); font-size: 0.73rem; padding: 30px 20px calc(40px + var(--nav-h) + var(--safe-b)); line-height: 1.9; }
footer a { color: var(--muted); }
.toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: rgba(24,24,30,0.96); border: 1px solid var(--line-strong); color: var(--text);
  padding: 12px 24px; border-radius: var(--r-md); font-size: 0.87rem; z-index: 300; font-weight: 600;
  opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none;
  max-width: calc(100vw - 40px); text-align: center; box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .tile { opacity: 1; transform: none; }
}

/* ============ Desktop ============ */
@media (min-width: 768px) {
  .desktop-only { display: flex !important; }
  .bottom-nav { display: none !important; }
  :root { --nav-h: 0px; }
  main { padding-bottom: 40px; }
  .quick-genres { padding: 86px 56px 8px; }
  .billboard { padding: 0 56px 14px; }
  .bb-split { gap: 48px; }
  .bb-right { flex: 0 0 300px; }
  .bb-title { font-size: clamp(3rem, 5vw, 4.6rem); }
  .rows { gap: 34px; }
  .row-head { padding: 0 56px; }
  .row-scroller { padding: 6px 56px 10px; gap: 10px; }
  .tile { width: 158px; max-width: none; }
  .tile:hover { transform: scale(1.07); z-index: 3; box-shadow: 0 14px 36px rgba(0,0,0,0.55); }
  .tile::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,0.16) 50%, transparent 58%);
    transform: translateX(-130%);
  }
  .tile:hover::after { transition: transform 0.65s ease; transform: translateX(130%); }
  .tile-num { width: 225px; }
  .sk-tile { width: 158px; }
  #view-grid, #view-search, #view-library, #view-listdetail { padding: 86px 56px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .lists-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%) !important; width: min(780px, 92vw); max-height: 88vh; border-radius: var(--r-lg); border-bottom: 1px solid var(--line-strong); }
  .sheet-grip { display: none; }
  .sheet .body { padding: 20px 28px 32px; }
  #view-swipe { height: auto; min-height: 100vh; padding-top: 80px; }
  .deck-card { width: 360px; }
  .swipe-gear { right: calc(50% - 240px); }
  .toast { bottom: 26px; }
  .chips.scroll-x { flex-wrap: wrap; overflow: visible; margin: 0 0 14px; padding: 0; }
  .edge-label.left { left: calc(50% - 320px); }
  .edge-label.right { right: calc(50% - 320px); }
}

/* iOS-Safari zoomt bei Inputs < 16px automatisch hinein – mobil deshalb mind. 16px */
@media (max-width: 767px) {
  select, input[type="text"], input[type="email"], input[type="password"] { font-size: 16px; }
}
