:root {
  --bg: #141414;
  --bg-2: #1c1c1c;
  --bg-3: #2a2a2a;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --red: #e50914;
  --red-dark: #b20710;
  --blue: #1f6feb;
  --green: #46d369;
  --card-w: clamp(180px, 17vw, 290px);
  --gutter: clamp(16px, 4vw, 60px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
body.dragging, body.dragging * { user-select: none; }
body.dragging iframe { pointer-events: none; }

/* ---------- Kopfleiste ---------- */
#topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--gutter);
  background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,0) 100%);
  transition: background .3s;
}
#topbar.solid { background: var(--bg); box-shadow: 0 2px 12px rgba(0,0,0,.5); }
.logo {
  color: var(--red); font-weight: 900; font-size: 28px; letter-spacing: 1px;
  font-family: "Bebas Neue", Impact, "Arial Black", sans-serif;
  transform: scaleY(1.15);
  white-space: nowrap;
}
.mainnav { display: flex; align-items: center; gap: 20px; font-size: 14px; white-space: nowrap; }
.mainnav > a, .mainnav button {
  background: none; border: 0; padding: 4px 0; color: #e5e5e5; opacity: .85;
}
.mainnav > a:hover, .mainnav button:hover, .mainnav .active { opacity: 1; font-weight: 600; }
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: -16px; padding: 14px 16px;
  background: rgba(0,0,0,.93); border: 1px solid #333; border-top: 2px solid #e5e5e5;
  min-width: 220px; z-index: 60;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu.genres { gap: 28px; max-height: calc(100vh - 80px); overflow-y: auto; }
.dropdown:hover .dropdown-menu.genres, .dropdown:focus-within .dropdown-menu.genres { display: flex; }
.dropdown-menu h4 { margin: 4px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--red); }
.menu-cols { display: grid; grid-template-columns: repeat(2, minmax(140px, auto)); gap: 0 22px; }
.menu-cols.one { grid-template-columns: minmax(150px, auto); }
.menu-years { display: grid; grid-template-columns: repeat(5, 56px); margin-bottom: 10px; }
.dropdown-menu a { display: block; padding: 5px 0; font-size: 14px; color: #ccc; white-space: nowrap; }
.dropdown-menu a:hover { color: #fff; text-decoration: underline; }

.tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort select, #searchInput {
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid #666; border-radius: 3px;
  padding: 7px 10px; font: inherit; font-size: 14px;
}
#searchInput { width: 240px; padding-left: 32px;
  background: rgba(0,0,0,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 10px center;
}
#searchInput:focus, .sort select:focus { outline: none; border-color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: min(80vh, 56.25vw); min-height: 420px;
  display: flex; align-items: flex-end;
  /* mindestens so viel wie der negative Abstand unten, sonst schieben sich die Reihen über die Knöpfe */
  padding: 0 var(--gutter) clamp(110px, 16vh, 170px);
  margin-bottom: -90px;
  overflow: hidden;
  isolation: isolate;
}
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  animation: heroZoom 30s ease-out forwards;
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(77deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,0) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(20,20,20,0) 35%);
}
.hero-info { max-width: 640px; }
.hero-genre { color: var(--muted); font-size: 14px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; }
.hero-genre b { color: var(--red); letter-spacing: 1px; font-size: 22px; vertical-align: -2px; margin-right: 6px; }
.hero h1 {
  font-size: clamp(26px, 3.6vw, 54px); line-height: 1.08; margin: 0 0 14px;
  text-shadow: 2px 2px 8px rgba(0,0,0,.6);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta { display: flex; gap: 12px; align-items: center; font-size: 15px; margin-bottom: 14px; flex-wrap: wrap; }
.hero p {
  font-size: clamp(14px, 1.15vw, 18px); line-height: 1.45; margin: 0 0 22px;
  text-shadow: 1px 1px 4px rgba(0,0,0,.8);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 4px; padding: 10px 26px; font-size: 17px; font-weight: 700;
}
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255,255,255,.75); }
.btn-info { background: rgba(109,109,110,.7); color: #fff; }
.btn-info:hover { background: rgba(109,109,110,.4); }
.btn svg { width: 22px; height: 22px; }

.match { color: var(--green); font-weight: 700; }

/* VLC-Knopf und -Feld */
.vlc-wrap { position: relative; display: inline-flex; }
.btn-vlc { background: #f08000; color: #fff; }
.btn-vlc:hover { background: #ff9a1f; }
.btn.small { padding: 8px 16px; font-size: 14px; }
.btn.small svg { width: 16px; height: 16px; }
.vlc-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: min(460px, calc(100vw - 32px));
  background: #1f1f1f; border: 1px solid #444; border-radius: 8px; padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.7); text-shadow: none; text-align: left;
}
.hero .vlc-panel { top: auto; bottom: calc(100% + 8px); }
.vlc-panel h4 { margin: 0 0 10px; font-size: 15px; color: #f08000; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vlc-q { font-size: 12px; color: var(--muted); font-weight: 400; display: inline-flex; align-items: center; gap: 4px; }
.vlc-link { margin-bottom: 10px; }
.vlc-label { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.vlc-label small { color: var(--muted); font-weight: 400; }
.vlc-url { display: flex; gap: 6px; }
.vlc-url input {
  flex: 1; min-width: 0; background: #111; color: #ddd; border: 1px solid #444; border-radius: 4px;
  padding: 6px 8px; font: 12px ui-monospace, Consolas, monospace;
}
.vlc-url .copy { border: 0; border-radius: 4px; background: #3a3a3a; color: #fff; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.vlc-url .copy:hover { background: #555; }
.vlc-panel details { margin: 4px 0 10px; font-size: 13px; }
.vlc-panel summary { cursor: pointer; color: #ccc; margin-bottom: 8px; }
.vlc-actions { margin: 4px 0 8px; }
.vlc-help { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.pill {
  border: 1px solid rgba(255,255,255,.4); padding: 0 6px; font-size: 12px; border-radius: 3px; line-height: 18px;
}

/* ---------- Seitenkopf (Genre/Jahr/Suche) ---------- */
.page-head { padding: 100px var(--gutter) 10px; }
.page-head h1 { font-size: clamp(28px, 3vw, 44px); margin: 0 0 6px; }
.page-head .sub { color: var(--muted); margin: 0 0 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: grid; gap: 8px; }
.filter-line { display: grid; grid-template-columns: 100px 1fr; align-items: start; gap: 10px; }
.filter-line > span { font-size: 13px; color: var(--muted); padding-top: 6px; }
.chip { font-variant-numeric: tabular-nums; }
.chip {
  border: 1px solid #555; background: transparent; border-radius: 999px; padding: 5px 14px; font-size: 13px; color: #ddd;
}
.chip:hover { border-color: #fff; color: #fff; }
.chip.on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }

/* ---------- Reihen ---------- */
.rows { position: relative; z-index: 2; padding-bottom: 80px; }
.row { margin: 0 0 34px; }
.row-title {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 var(--gutter) 10px; font-size: clamp(16px, 1.4vw, 22px); font-weight: 700;
}
.row-title a:hover { color: #fff; }
.row-title .more { font-size: 13px; color: #54b9c5; font-weight: 600; opacity: 0; transition: opacity .2s; }
.row:hover .row-title .more { opacity: 1; }
.row-title .count { font-size: 13px; color: var(--muted); font-weight: 400; }
.row-wrap { position: relative; }
.slider {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding: 0 var(--gutter); scroll-padding: 0 var(--gutter);
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.slider::-webkit-scrollbar { display: none; }
.arrow {
  position: absolute; top: 0; bottom: 0; width: var(--gutter); z-index: 5;
  border: 0; background: rgba(20,20,20,.55); color: #fff; font-size: 34px;
  opacity: 0; transition: opacity .2s, background .2s;
}
.row:hover .arrow { opacity: 1; }
.arrow:hover { background: rgba(20,20,20,.8); }
.arrow.left { left: 0; } .arrow.right { right: 0; }
.arrow[disabled] { visibility: hidden; }

/* ---------- Karten ---------- */
.card {
  position: relative; flex: 0 0 var(--card-w); aspect-ratio: 16/9;
  border-radius: 4px; overflow: hidden; background: var(--bg-3);
  scroll-snap-align: start; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .25s; }
/* Jahres-Labels: rot = auf YouTube seit, blau = Produktions-/Erscheinungsjahr – gleiche Größe */
.badge-year, .badge-prod, .card .badge-dur {
  display: inline-block; font-size: 11px; font-weight: 700; line-height: 15px; padding: 2px 6px; border-radius: 3px;
  color: #fff; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.75);
}
.badge-year { background: var(--red); }
.badge-prod { background: var(--blue); }
/* Auflösung – gleiche Größe wie die Jahres-Labels */
.badge-res { display: inline-block; font-size: 11px; font-weight: 700; line-height: 15px; padding: 2px 6px; border-radius: 3px; color: #fff; }
.badge-res.r4k { background: #9b30d9; }
.badge-res.r1440 { background: #d63384; }
.badge-res.r1080 { background: #1e9e4a; }
.badge-res.r720 { background: #e0b000; color: #1a1a1a; }
.badge-res.r480 { background: #e8650a; }
.badge-res.rlow { background: #6c757d; }
.badges { display: flex; gap: 4px; }
.card .badges { position: absolute; top: 6px; left: 6px; }
.card .badges.right { left: auto; right: 6px; }
/* Auflösung unten rechts in der Bildecke – über Titelleiste und Fortschrittsbalken */
.card .res-corner { position: absolute; right: 6px; bottom: 8px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.card:has(.res-corner) .cap { padding-right: 56px; }
.card:has(.progress) .res-corner { bottom: 10px; }
/* IMDb-Bewertung – gleiche Größe wie die anderen Labels */
.badge-rating { display: inline-block; font-size: 11px; font-weight: 700; line-height: 15px; padding: 2px 6px; border-radius: 3px; background: #f5c518; color: #000; white-space: nowrap; }
.year-big .badge-rating { font-size: 14px; line-height: 18px; padding: 2px 8px; }
.rating-text { color: #f5c518; }
.card:has(.badge-rating) .reset-btn { bottom: 52px; }
.badges.inline { display: inline-flex; vertical-align: middle; }
.year-big .badge-year, .year-big .badge-prod, .year-big .badge-res { font-size: 14px; line-height: 18px; padding: 2px 8px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 4px; }
.legend .badge-prod { margin-left: 10px; }
.legend-res { margin-left: 10px; display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.hero-legend { margin-top: 16px; }
.hero-legend .legend { color: #ddd; text-shadow: 1px 1px 3px rgba(0,0,0,.8); }
.card .reset-btn {
  position: absolute; right: 6px; bottom: 34px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5);
  background: rgba(0,0,0,.7); color: #fff; font-size: 16px; line-height: 1;
  display: grid; place-items: center; opacity: .85;
}
.card .reset-btn:hover { background: var(--red); border-color: var(--red); opacity: 1; }
@media (hover: hover) {
  .card .reset-btn { opacity: 0; transition: opacity .2s; }
  .card:hover .reset-btn { opacity: 1; }
}
.card .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); z-index: 2; }
.card .progress i { display: block; height: 100%; background: var(--red); }
.card .cap {
  position: absolute; inset: auto 0 0 0; padding: 26px 10px 8px;
  background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.7) 55%, rgba(0,0,0,0) 100%);
}
.card .cap h3 {
  margin: 0; font-size: 13px; line-height: 1.25; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .cap .extra { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.card .cap .metaline { font-size: 11px; color: #bbb; margin: 4px 0 3px; }
.card .cap .desc {
  font-size: 11px; color: #ddd; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .play-ico {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -36px 0 0 -22px;
  border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.5);
  display: grid; place-items: center; opacity: 0; transition: opacity .25s;
}
.card .play-ico svg { width: 18px; height: 18px; margin-left: 3px; }
@media (hover: hover) {
  .card:hover { transform: scale(1.06); z-index: 3; box-shadow: 0 10px 30px rgba(0,0,0,.7); }
  .card:hover .cap .extra { max-height: 90px; }
  .card:hover .play-ico { opacity: 1; }
}
.card.skeleton { background: linear-gradient(90deg, #222 0%, #2e2e2e 50%, #222 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; cursor: default; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Raster für Suche / Meine Liste */
.grid-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr));
  gap: 26px 8px; padding: 0 var(--gutter);
}
.grid-cards .card { width: 100%; }

.empty { padding: 40px var(--gutter); color: var(--muted); }
.loadmore { display: block; margin: 10px auto 0; }
.status { color: var(--muted); font-size: 14px; padding: 0 var(--gutter); }

/* ---------- Detail-Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.72); }
.modal-card {
  position: relative; width: min(900px, calc(100% - 32px)); margin: 32px auto;
  background: #181818; border-radius: 8px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-hero { position: relative; aspect-ratio: 16/9; }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #181818 0%, rgba(24,24,24,0) 55%); }
.modal-hero .over { position: absolute; left: 40px; right: 40px; bottom: 34px; z-index: 2; }
.modal-hero h2 { font-size: clamp(22px, 3vw, 36px); margin: 0 0 18px; text-shadow: 2px 2px 8px rgba(0,0,0,.7); }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: #181818; font-size: 22px;
}
.round {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6);
  background: rgba(42,42,42,.6); color: #fff; font-size: 22px; display: grid; place-items: center;
}
.round:hover { border-color: #fff; }
.round.on { background: #fff; color: #000; }
.modal-body { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding: 0 40px 30px; }
.modal-body .metaline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; color: #bbb; }
.modal-body .desc { white-space: pre-line; line-height: 1.5; font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.modal-body .desc.clamped { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.modal-body .desc a { color: #54b9c5; }
.linkbtn { background: none; border: 0; color: #fff; padding: 6px 0; font-weight: 600; text-decoration: underline; }
.facts { font-size: 14px; line-height: 1.6; color: #fff; }
.facts span { color: #777; }
.facts small { color: #888; }
.facts a { color: #fff; text-decoration: underline; text-decoration-color: #666; }
.facts a:hover { text-decoration-color: #fff; }
.year-big { font-weight: 700; color: #fff; font-size: 17px; }
.genre-line { color: #fff; }
.yt-title { font-size: 12px; color: #888; margin: -6px 0 12px; }
.pbar .ptitle small { color: #999; font-weight: 400; }
.modal-similar { padding: 0 40px 40px; }
.modal-similar h3 { font-size: 22px; margin: 10px 0 14px; }
.modal-similar .grid-cards { padding: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }

/* ---------- Schwebende Player-Fenster ---------- */
#windows { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.pwin {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column;
  background: #000; border-radius: 8px; overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.12);
  min-width: 280px; min-height: 190px;
}
.pwin.focused { box-shadow: 0 16px 50px rgba(0,0,0,.8), 0 0 0 1px var(--red); }
.pwin.max { border-radius: 0; }
.pwin.hidden { display: none; }
.pbar {
  display: flex; align-items: center; gap: 6px; height: 34px; flex: 0 0 34px;
  padding: 0 4px 0 12px; background: #1f1f1f; cursor: grab; touch-action: none;
}
body.dragging .pbar { cursor: grabbing; }
.pbar .ptitle { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .ptitle b { color: var(--red); margin-right: 6px; }
.pbar .pquality { flex: 0 0 auto; display: flex; margin-right: 4px; }
.pbar button, .pbar a {
  flex: 0 0 auto; width: 30px; height: 26px; border: 0; border-radius: 4px; background: transparent;
  display: grid; place-items: center; color: #ccc; font-size: 14px;
}
.pbar button:hover, .pbar a:hover { background: #3a3a3a; color: #fff; }
.pbar button.x:hover { background: var(--red); }
.pbody { position: relative; flex: 1; background: #000; }
.pbody iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pbody .popped {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; font-size: 14px;
}
.rz { position: absolute; z-index: 2; touch-action: none; }
.rz.n, .rz.s { left: 10px; right: 10px; height: 8px; cursor: ns-resize; }
.rz.e, .rz.w { top: 10px; bottom: 10px; width: 8px; cursor: ew-resize; }
.rz.n { top: -3px; } .rz.s { bottom: -3px; } .rz.e { right: -3px; } .rz.w { left: -3px; }
.rz.ne, .rz.nw, .rz.se, .rz.sw { width: 16px; height: 16px; }
.rz.ne { top: -3px; right: -3px; cursor: nesw-resize; }
.rz.sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.rz.nw { top: -3px; left: -3px; cursor: nwse-resize; }
.rz.se { bottom: -3px; right: -3px; cursor: nwse-resize; }
.rz.se::after {
  content: ""; position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px;
  border-right: 2px solid rgba(255,255,255,.45); border-bottom: 2px solid rgba(255,255,255,.45);
}
.pwin.max .rz { display: none; }

/* Hinweis unten (z. B. "Rückgängig") */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  background: #2b2b2b; border: 1px solid #555; border-radius: 6px; padding: 10px 10px 10px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.6); font-size: 14px; animation: toastIn .2s ease;
}
@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { border: 0; border-radius: 4px; background: #fff; color: #000; font-weight: 700; padding: 6px 12px; white-space: nowrap; }
.toast button:hover { background: #ddd; }
.toast .toast-x { background: transparent; color: #aaa; padding: 6px 8px; }
.toast .toast-x:hover { background: #444; color: #fff; }

/* Leiste minimierter Fenster */
#dock { position: fixed; left: 16px; bottom: 16px; z-index: 210; display: flex; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 32px); }
.dock-item {
  display: flex; align-items: center; gap: 8px; max-width: 260px;
  background: #1f1f1f; border: 1px solid #444; border-radius: 6px; padding: 4px 10px 4px 4px; font-size: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.6);
}
.dock-item img { width: 64px; height: 36px; object-fit: cover; border-radius: 3px; }
.dock-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Seite "App installieren" ---------- */
.app-version {
  display: grid; gap: 8px; justify-items: start; margin-top: 14px; padding: 14px 18px;
  background: #1f1f1f; border: 1px solid #3a3a3a; border-left: 4px solid var(--red); border-radius: 8px; max-width: 720px;
}
.app-version-line { font-size: 15px; }
.app-version-line.warn b, .app-version-line.warn { color: #ffb020; }
.app-version-line.ok { color: var(--green); }
.app-version .hint { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.5; }
.app-version code { background: #000; border: 1px solid #444; border-radius: 4px; padding: 1px 6px; color: #fff; }
.app-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; padding-bottom: 60px; }
.app-card { background: var(--bg-2); border: 1px solid #2f2f2f; border-radius: 8px; padding: 16px 18px; }
.app-card h3 { margin: 0 0 10px; font-size: 18px; }
.app-card ol { margin: 0; padding-left: 20px; line-height: 1.6; font-size: 14px; }
.app-card code { background: #000; border: 1px solid #444; border-radius: 4px; padding: 1px 6px; color: #fff; }
.app-card .hint { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 10px 0 0; }

/* ---------- Fernseh-Modus (Steuerkreuz) ---------- */
.tv :focus { outline: none; }
.tv :focus-visible, .tv a:focus, .tv button:focus, .tv input:focus, .tv select:focus {
  outline: 4px solid #fff; outline-offset: 3px; border-radius: 4px;
}
.tv .card:focus { transform: scale(1.08); z-index: 4; box-shadow: 0 0 0 4px #fff, 0 12px 34px rgba(0,0,0,.8); outline: none; }
.tv .card:focus .cap .extra { max-height: 90px; }
.tv .card:focus .play-ico, .tv .card:focus .reset-btn { opacity: 1; }
.tv .slider { padding-top: 10px; padding-bottom: 14px; scroll-behavior: smooth; }
.tv .arrow, .tv .rz { display: none; }
.tv .pwin.max .pbar { height: 0; flex-basis: 0; overflow: hidden; }
.tv .dock-item { display: none; }
.tv .chip:focus { background: #fff; color: #000; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  #topbar { flex-wrap: wrap; gap: 10px 18px; padding-top: 10px; padding-bottom: 10px; background: var(--bg); }
  .tools { width: 100%; margin-left: 0; }
  #searchInput { width: 100%; }
  #searchForm { flex: 1; }
  .sort span { display: none; }
  .hero { margin-bottom: -40px; min-height: 520px; padding-top: 140px; }
  .page-head { padding-top: 150px; }
  .modal-body { grid-template-columns: 1fr; padding: 0 18px 24px; }
  .modal-hero .over { left: 18px; right: 18px; }
  .modal-similar { padding: 0 18px 30px; }
  .mainnav { gap: 14px; }
  .arrow { display: none; }
  .filter-line { grid-template-columns: 1fr; gap: 4px; }
  .filter-line > span { padding-top: 0; }
  .dropdown-menu.genres { flex-direction: column; gap: 10px; }
}
@media (max-width: 520px) {
  .logo { font-size: 22px; }
  .mainnav { font-size: 13px; }
  .dropdown-menu { left: auto; right: -80px; }
}
