/* Schauen im Browser – Aufbau wie die SyncXStream-App auf dem Apple TV */
body.tv { background: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif; }
body.tv html, body.tv { overscroll-behavior: none; }
:root { --tv-pad: clamp(20px, 3.8vw, 72px); --tv-radius: 14px; --tv-accent: #3d8bff; }

/* Leiste */
.dock { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 92px; display: flex; align-items: center; justify-content: center; padding: 0 var(--tv-pad);
  background: linear-gradient(rgba(0,0,0,.82), rgba(0,0,0,.45) 60%, transparent); transition: background .3s; }
.dock.solid { background: rgba(0,0,0,.92); }
.dock-avatar { position: absolute; left: var(--tv-pad); width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; }
.dock-avatar img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 24px rgba(160, 120, 255, .55); }
.dock-site { position: absolute; right: var(--tv-pad); color: rgba(255,255,255,.6); text-decoration: none; font-weight: 600; font-size: 15px; }
.dock-site:hover { color: #fff; }
.dock-tabs { display: flex; align-items: center; gap: 6px; }
.dock-tabs button { display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; color: rgba(255,255,255,.62); font: inherit; font-size: 19px; font-weight: 600; padding: 10px 20px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.dock-tabs button svg { width: 22px; height: 22px; }
.dock-tabs button:hover, .dock-tabs button:focus-visible { background: #fff; color: #000; transform: scale(1.05); outline: none; }
.dock-tabs button.on { color: var(--tv-accent); background: rgba(255,255,255,.12); }
.dock-tabs button.on:hover, .dock-tabs button.on:focus-visible { background: #fff; color: #000; }
.dock-tabs .dock-search { padding: 10px 14px; }

main#app { min-height: 100vh; }
.msg { padding: 180px var(--tv-pad); text-align: center; color: rgba(255,255,255,.6); font-size: 19px; }
.msg a { color: var(--tv-accent); }
.msg .btn { color: #fff; cursor: pointer; font: inherit; }

/* Profilwahl */
.who { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.who h1 { font-size: clamp(30px, 4vw, 52px); margin: 0 0 54px; }
.who .people { display: flex; flex-wrap: wrap; justify-content: center; gap: 46px; }
.who button { background: none; border: 0; color: #fff; cursor: pointer; font: inherit; font-weight: 600; font-size: 20px; }
.who img { width: 170px; height: 170px; border-radius: 50%; margin-bottom: 16px; transition: transform .2s, box-shadow .2s; }
.who button:hover img, .who button:focus-visible img { transform: scale(1.08); box-shadow: 0 0 0 5px #fff, 0 20px 60px rgba(0,0,0,.6); }
.who button:focus-visible { outline: none; }

/* Titelbild oben (abgerundete Karte wie am Apple TV) */
.hero { position: relative; margin: 102px var(--tv-pad) 0; height: min(64vh, 720px); min-height: 420px; border-radius: 26px; overflow: hidden; background: #111; }
.hero .slide { position: absolute; inset: 0; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .7s; }
.hero .slide.enter-r { transform: translateX(100%); } .hero .slide.enter-l { transform: translateX(-100%); }
.hero .slide.leave-l { transform: translateX(-100%); } .hero .slide.leave-r { transform: translateX(100%); }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.hero .bg.poster { background-size: cover; filter: blur(28px) brightness(.55); transform: scale(1.2); }
.hero .poster-big { position: absolute; right: 8%; top: 8%; bottom: 8%; aspect-ratio: 2/3; border-radius: 18px; background-size: cover; background-position: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.35) 45%, transparent 70%), linear-gradient(transparent 55%, rgba(0,0,0,.7)); }
.hero .info { position: absolute; left: 70px; right: 40%; bottom: 56px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 72px); line-height: 1; margin: 0 0 16px; font-weight: 900; letter-spacing: -1px; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.hero .meta { font-weight: 700; font-size: 19px; margin-bottom: 12px; }
.hero .plot { font-size: 18px; line-height: 1.45; color: rgba(255,255,255,.9); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 820px; margin: 0 0 22px; }
.hero .rating { position: absolute; right: 40px; bottom: 56px; display: flex; align-items: center; gap: 18px; }
.hero .stars { background: rgba(0,0,0,.6); border-radius: 10px; padding: 8px 14px; font-weight: 800; font-size: 20px; color: #ffd60a; }
.dots { display: flex; gap: 7px; } .dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.4); transition: width .3s, background .3s; } .dots i.on { width: 26px; background: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 14px; }
.pill { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; padding: 14px 28px; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(10px); transition: transform .15s, background .15s, color .15s; }
.pill.primary { background: #fff; color: #000; }
.pill:hover, .pill:focus-visible { background: #fff; color: #000; transform: scale(1.06); outline: none; }

/* Genre-Leiste */
.genres { display: flex; gap: 10px; overflow-x: auto; padding: 30px var(--tv-pad) 4px; scrollbar-width: none; }
.genres::-webkit-scrollbar { display: none; }
.genres button { flex: none; border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-size: 17px; font-weight: 600; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: transform .15s; }
.genres button.on { background: var(--tv-accent); }
.genres button:hover, .genres button:focus-visible { background: #fff; color: #000; transform: scale(1.06); outline: none; }

/* Reihen */
.row { margin: 34px 0 6px; }
.row h2 { font-size: 26px; font-weight: 800; margin: 0 var(--tv-pad) 14px; }
.strip { display: flex; gap: 26px; overflow-x: auto; padding: 18px var(--tv-pad) 26px; scroll-padding: 0 var(--tv-pad); scroll-behavior: smooth; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.card { flex: none; width: 190px; background: none; border: 0; padding: 0; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.card .img { width: 100%; aspect-ratio: 2/3; border-radius: var(--tv-radius); overflow: hidden; background: linear-gradient(135deg, #2a2340, #0b0a12); position: relative; transition: transform .2s, box-shadow .2s; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .t { font-size: 15px; color: rgba(255,255,255,.62); margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s { font-size: 14px; color: rgba(255,255,255,.5); }
.card:hover .img, .card:focus-visible .img { transform: scale(1.08); box-shadow: 0 0 0 4px #fff, 0 22px 50px rgba(0,0,0,.6); }
.card:focus-visible { outline: none; }
.card.wide { width: 360px; } .card.wide .img { aspect-ratio: 16/9; }
.card.wide .t { color: #fff; font-weight: 700; font-size: 17px; }
.bar { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }
.bar i { display: block; height: 100%; border-radius: 3px; background: #fff; }
.card.rank { width: 300px; display: flex; align-items: flex-end; }
.card.rank .n { font-size: 190px; font-weight: 900; line-height: .78; color: #000; -webkit-text-stroke: 3px rgba(255,255,255,.55); margin-right: -26px; letter-spacing: -14px; flex: none; }
.card.rank .img { width: 190px; flex: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 34px 26px; padding: 26px var(--tv-pad) 80px; }
.grid .card { width: auto; }
.page-title { margin: 112px var(--tv-pad) 0; font-size: 40px; font-weight: 900; }

/* Inhaltsseite wie am Apple TV */
.detail { position: relative; min-height: 100vh; }
.detail .bg { position: absolute; inset: 0 0 auto 0; height: 92vh; background-size: cover; background-position: center top; }
.detail .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.4) 55%, transparent 80%), linear-gradient(transparent 40%, #000); }
.detail .top { position: relative; padding: 150px var(--tv-pad) 40px; max-width: 1300px; }
.detail h1 { font-size: clamp(36px, 4.4vw, 68px); font-weight: 900; margin: 0 0 14px; letter-spacing: -1px; }
.detail .meta { color: rgba(255,255,255,.68); font-size: 19px; margin-bottom: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.badges span { background: rgba(255,255,255,.18); border-radius: 6px; padding: 4px 9px; font-weight: 800; font-size: 15px; }
.prov { color: rgba(255,255,255,.55); font-size: 14.5px; margin-bottom: 14px; }
.detail .plot { font-size: 19px; line-height: 1.45; max-width: 1050px; color: rgba(255,255,255,.92); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 26px; }
.detail .lower { position: relative; padding: 0 var(--tv-pad) 80px; }
.seasons { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 22px; }
.seasons button { border: 0; border-radius: 999px; padding: 11px 22px; font: inherit; font-size: 17px; font-weight: 700; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.seasons button.on { background: var(--tv-accent); }
.seasons button:hover, .seasons button:focus-visible { background: #fff; color: #000; outline: none; }
.eps { display: flex; gap: 26px; overflow-x: auto; padding: 14px 4px 30px; scrollbar-width: none; }
.ep { flex: none; width: 380px; background: none; border: 0; padding: 0; color: #fff; text-align: left; font: inherit; cursor: pointer; }
.ep .img { aspect-ratio: 16/9; border-radius: var(--tv-radius); overflow: hidden; background: #1a1726; position: relative; transition: transform .2s, box-shadow .2s; }
.ep img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep:hover .img, .ep:focus-visible .img { transform: scale(1.06); box-shadow: 0 0 0 4px #fff; }
.ep:focus-visible { outline: none; }
.ep small { display: block; color: rgba(255,255,255,.55); margin-top: 12px; font-size: 14.5px; }
.ep b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 17px; }
.two { display: grid; grid-template-columns: 1fr 520px; gap: 70px; margin-top: 20px; }
.two h3 { font-size: 24px; margin: 0 0 14px; }
.stream { width: 100%; border-collapse: collapse; }
.stream td { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 17px; }
.stream td:first-child { color: rgba(255,255,255,.55); } .stream td:last-child { text-align: right; }

/* Live-TV */
.live { display: grid; grid-template-columns: 300px 1fr; gap: 30px; padding: 112px var(--tv-pad) 60px; }
.live .cats { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 150px); overflow-y: auto; position: sticky; top: 112px; }
.live .cats button { text-align: left; background: none; border: 0; color: rgba(255,255,255,.62); padding: 12px 16px; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.live .cats button.on { background: rgba(255,255,255,.12); color: #fff; }
.live .cats button:hover, .live .cats button:focus-visible { background: #fff; color: #000; outline: none; }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-content: start; }
.ch { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.07); border: 0; border-radius: 14px; padding: 14px 16px; cursor: pointer; color: #fff; font: inherit; font-size: 16px; font-weight: 600; text-align: left; transition: transform .15s, background .15s; }
.ch img { width: 64px; height: 40px; object-fit: contain; flex: none; }
.ch:hover, .ch:focus-visible { background: #fff; color: #000; transform: scale(1.04); outline: none; }

/* Suche */
.searchbox { margin: 120px var(--tv-pad) 0; }
.searchbox input { width: min(760px, 100%); background: rgba(255,255,255,.1); border: 0; border-radius: 16px; color: #fff; font: inherit; font-size: 24px; padding: 18px 24px; outline: none; }
.searchbox input:focus { box-shadow: 0 0 0 3px #fff; }

/* Player */
.player { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; align-items: center; justify-content: center; }
.player video { width: 100%; height: 100%; background: #000; }
.player-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 20px 26px; background: linear-gradient(#000c, transparent); font-weight: 700; font-size: 18px; }
.player-top button { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.player-error { position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%); background: rgba(20,18,30,.95); border: 1px solid rgba(255,255,255,.1); padding: 18px 24px; border-radius: 14px; max-width: 600px; text-align: center; color: #ffd98a; font-size: 16px; }

@media (max-width: 1000px) {
  .dock { height: auto; flex-wrap: wrap; padding: 12px var(--tv-pad); gap: 8px; }
  .dock-avatar, .dock-site { position: static; } .dock-avatar { width: 42px; height: 42px; }
  .dock-tabs { order: 3; width: 100%; justify-content: space-between; }
  .dock-tabs button { font-size: 15px; padding: 8px 12px; } .dock-tabs button svg { display: none; } .dock-tabs .dock-search svg { display: block; }
  .dock { justify-content: space-between; }
  .hero { margin-top: 128px; height: 62vh; } .hero .info { left: 24px; right: 24px; bottom: 30px; } .hero .rating { display: none; } .hero .poster-big { display: none; }
  .hero .plot { font-size: 15px; } .pill { font-size: 16px; padding: 11px 20px; }
  .card { width: 130px; } .card.wide { width: 250px; } .card.rank { width: 210px; } .card.rank .img { width: 130px; } .card.rank .n { font-size: 130px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .two { grid-template-columns: 1fr; } .ep { width: 260px; }
  .live { grid-template-columns: 1fr; padding-top: 140px; } .live .cats { flex-direction: row; overflow-x: auto; position: static; max-height: none; }
  .detail .top { padding-top: 150px; } .page-title, .searchbox { margin-top: 140px; }
}

/* Seiten-Kopfzeile auf „Schauen“: versteckt, gleitet nach unten ein */
header.top.peek { position: fixed; left: 0; right: 0; top: 0; z-index: 60; transform: translateY(-105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
header.top.peek.open { transform: none; }
.peek-tab { position: fixed; top: 0; left: 50%; z-index: 59; width: 44px; height: 16px; margin-left: -22px; border: 0; padding: 0; cursor: pointer;
  background: none; opacity: .55; transition: opacity .25s; }
.peek-tab::before { content: ""; position: absolute; left: 50%; top: 4px; margin-left: -8px; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 8px solid #fff; }
.peek-tab:hover { opacity: 1; }
body.head-open .peek-tab { opacity: 0; pointer-events: none; }
