/* Prehraj – osobní nadstavba prehrajto.cz, vzhled ve stylu Apple TV, 2026-10-29 */
@font-face { font-family: Inter; src: url(inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #000; --bg2: #1c1c1e; --bg3: #2c2c2e; --line: rgba(255, 255, 255, .1); --fg: #fff;
  --mut: rgba(235, 235, 245, .6); --mut2: rgba(235, 235, 245, .35); --acc: #fff; --r: 14px;
  --pad: max(20px, env(safe-area-inset-left)); --padr: max(20px, env(safe-area-inset-right));
  --pw: 180px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.45 -apple-system, "SF Pro Text", Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
::-webkit-scrollbar { height: 0; width: 8px; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }

/* přihlášení */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(900px 500px at 50% -10%, #3a1d2a 0%, transparent 70%), var(--bg); }
.login__box { width: min(340px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login__logo { width: 64px; height: 64px; margin: 0 auto; }
.login h1 { margin: 0 0 8px; font-size: 24px; }
.pin { display: flex; justify-content: center; gap: 16px; margin: 6px 0 2px; }
.pin i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--mut); transition: .12s; }
.pin i.on { background: #fff; border-color: #fff; }
.pin.bad { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; margin-top: 6px; }
.pad button { height: 76px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); font-size: 28px;
  font-weight: 400; touch-action: manipulation; user-select: none; }
.pad button:active { background: rgba(255, 255, 255, .35); }
.pad .pad__del { background: none; font-size: 22px; color: var(--mut); }
.err { color: #ff6961; min-height: 1.4em; margin: 0; }

/* horní lišta */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 18px;
  padding: max(10px, env(safe-area-inset-top)) var(--padr) 10px var(--pad); transition: background .25s;
  background: linear-gradient(rgba(0, 0, 0, .7), transparent); }
.top.solid { background: rgba(22, 22, 24, .78); backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; flex: none; }
.brand img { width: 28px; height: 28px; }
.tabs { display: flex; gap: 4px; margin: 0 auto; background: rgba(120, 120, 128, .24); padding: 4px; border-radius: 999px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.tabs a { padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--mut); }
.tabs a:hover { color: var(--fg); }
.tabs a.on { background: rgba(255, 255, 255, .92); color: #000; }
.search { display: flex; align-items: center; gap: 6px; background: rgba(120, 120, 128, .24); border-radius: 10px;
  padding: 0 10px; width: 240px; flex: none; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.search svg { width: 17px; height: 17px; color: var(--mut); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--fg); height: 36px; font-size: 15px; }
.search input::placeholder { color: var(--mut); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.icon-btn { background: none; border: 0; padding: 8px; color: var(--mut); border-radius: 8px; flex: none; }
.icon-btn:hover { color: var(--fg); }
.tabbar { display: none; }

main { padding: 70px 0 60px; min-height: 100vh; }
main.flush { padding-top: 0; }
.wrap { padding: 0 var(--padr) 0 var(--pad); }
.empty { color: var(--mut); text-align: center; padding: 40px 20px; }
h1.page { font-size: 34px; font-weight: 800; margin: 18px var(--padr) 6px var(--pad); letter-spacing: -.02em; }

/* hero */
.hero { position: relative; height: min(78vh, 56.25vw + 120px); min-height: 460px; overflow: hidden; margin-bottom: 8px; }
.hero__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: flex-end; }
.slide__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__bg--blur { filter: blur(40px) saturate(1.4) brightness(.7); transform: scale(1.3); }
.slide__poster { position: absolute; right: 8%; top: 50%; transform: translateY(-46%); height: 72%; aspect-ratio: 2 / 3;
  border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 35%, transparent 65%),
    linear-gradient(to right, rgba(0, 0, 0, .65), transparent 60%); }
.slide__info { position: relative; z-index: 1; padding: 0 var(--padr) 64px var(--pad); max-width: 640px; }
.slide__kind { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.slide__title { font-size: clamp(30px, 5vw, 56px); font-weight: 800; line-height: 1.05; margin: 6px 0 10px; letter-spacing: -.02em; }
.slide__meta, .meta { color: var(--mut); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.slide__desc { color: rgba(255, 255, 255, .85); margin: 10px 0 18px; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.dots { position: absolute; z-index: 2; bottom: 26px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: .2s; cursor: pointer; }
.dots i.on { background: #fff; width: 20px; border-radius: 4px; }
.badge { border: 1px solid var(--mut2); border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 700; line-height: 17px; }
.star { color: #ffd60a; }

/* tlačítka */
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { height: 44px; padding: 0 22px; border-radius: 10px; border: 0; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: rgba(120, 120, 128, .32);
  color: #fff; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: transform .12s, background .12s; }
.btn:hover { background: rgba(120, 120, 128, .48); }
.btn:active { transform: scale(.97); }
.btn--play { background: #fff; color: #000; min-width: 150px; }
.btn--play:hover { background: rgba(255, 255, 255, .85); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn svg { width: 20px; height: 20px; }

/* řady (shelf) */
.shelf { margin: 22px 0 6px; position: relative; }
.shelf h2 { font-size: 20px; font-weight: 700; margin: 0 var(--padr) 10px var(--pad); display: flex; align-items: baseline; gap: 10px; }
.shelf h2 a { font-size: 14px; font-weight: 500; color: var(--mut); margin-left: auto; }
.row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--pad);
  padding: 4px var(--padr) 14px var(--pad); scrollbar-width: none; }
.row > * { scroll-snap-align: start; flex: none; }
.arrow { position: absolute; top: 40px; bottom: 34px; width: 44px; border: 0; z-index: 3; background: rgba(0, 0, 0, .5);
  color: #fff; opacity: 0; transition: opacity .2s; display: flex; align-items: center; justify-content: center; }
.shelf:hover .arrow { opacity: 1; }
.arrow--l { left: 0; border-radius: 0 10px 10px 0; } .arrow--r { right: 0; border-radius: 10px 0 0 10px; }
.arrow svg { width: 28px; height: 28px; }
.pcard { width: var(--pw); }
.pcard__img { width: 100%; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--bg2);
  transition: transform .2s, box-shadow .2s; position: relative; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px;
  text-align: center; font-weight: 700; color: var(--mut); }
.pcard:hover .pcard__img, .wcard:hover .wcard__img { transform: scale(1.04); box-shadow: 0 16px 40px rgba(0, 0, 0, .7); }
.pcard__t { font-size: 13px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__s { font-size: 12px; color: var(--mut); }
.wcard { width: calc(var(--pw) * 1.75); }
.wcard__img { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--bg2); position: relative;
  transition: transform .2s, box-shadow .2s; }
.wcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prog { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.prog i { display: block; height: 100%; background: #fff; }
.tag { position: absolute; bottom: 8px; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 700;
  background: rgba(0, 0, 0, .7); }
.tag--time { right: 8px; } .tag--fmt { left: 8px; }
.wcard__t { font-size: 13px; font-weight: 600; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.wcard__s { font-size: 12px; color: var(--mut); }

/* mřížka (soubory, výsledky) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--pw), 1fr)); gap: 22px 16px;
  padding: 0 var(--padr) 0 var(--pad); }
.grid--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid .pcard, .grid .wcard { width: auto; }
.more { display: block; margin: 26px auto 0; }

/* detail */
.detail { position: relative; min-height: 100vh; }
.detail__bg { position: absolute; top: 0; left: 0; right: 0; height: min(80vh, 760px); overflow: hidden; }
.detail__bg img { width: 100%; height: 100%; object-fit: cover; }
.detail__bg img.blur { filter: blur(50px) saturate(1.4) brightness(.6); transform: scale(1.3); }
.detail__bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .6) 40%, rgba(0, 0, 0, .2) 75%, rgba(0, 0, 0, .5) 100%),
    linear-gradient(to right, rgba(0, 0, 0, .7), transparent 70%); }
.detail__head { position: relative; z-index: 1; display: flex; gap: 32px; align-items: flex-end;
  padding: max(140px, 26vh) var(--padr) 10px var(--pad); }
.detail__poster { width: 230px; aspect-ratio: 2 / 3; border-radius: 16px; object-fit: cover; flex: none;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7); background: var(--bg2); }
.detail__info { max-width: 720px; }
.detail__title { font-size: clamp(30px, 4.5vw, 52px); font-weight: 800; line-height: 1.05; margin: 0 0 10px; letter-spacing: -.02em; }
.detail__desc { color: rgba(255, 255, 255, .85); margin: 12px 0 20px; }
.detail__desc.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.detail__body { position: relative; z-index: 1; }
.section { margin: 26px 0 0; }
.section > h2 { font-size: 20px; font-weight: 700; margin: 0 var(--padr) 12px var(--pad); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.refine { display: flex; gap: 8px; margin: 0 var(--padr) 14px var(--pad); max-width: 560px; }
.refine input { flex: 1; min-width: 0; height: 38px; border-radius: 10px; border: 0; padding: 0 12px; background: var(--bg2);
  color: var(--fg); font-size: 15px; outline: none; }
.refine button { height: 38px; border-radius: 10px; border: 0; padding: 0 14px; background: var(--bg3); font-weight: 600; }

/* seznam souborů */
.files { display: flex; flex-direction: column; gap: 2px; margin: 0 var(--padr) 0 var(--pad); }
.file { display: flex; gap: 14px; align-items: center; padding: 8px; border-radius: 12px; }
.file:hover { background: var(--bg2); }
.file__img { width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--bg2); flex: none; position: relative; }
.file__img img { width: 100%; height: 100%; object-fit: cover; }
.file__t { font-weight: 600; font-size: 14px; word-break: break-word; }
.file__m { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--mut); align-items: center; }
.chip-s { padding: 1px 7px; border-radius: 5px; background: var(--bg3); font-weight: 600; font-size: 11px; color: #fff; }
.chip-s.cz { background: #0a84ff; } .chip-s.best { background: #30d158; color: #000; }

/* řady a díly */
.seasons { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--padr) 12px var(--pad); scrollbar-width: none; }
.seasons button { flex: none; height: 34px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--bg2);
  font-weight: 600; font-size: 14px; color: var(--mut); }
.seasons button.on { background: #fff; color: #000; }
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px 16px; padding: 0 var(--padr) 0 var(--pad); }
.ep__img { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg2); position: relative; transition: transform .2s; }
.ep:hover .ep__img { transform: scale(1.03); }
.ep__img img { width: 100%; height: 100%; object-fit: cover; }
.ep__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0;
  background: rgba(0, 0, 0, .35); transition: opacity .2s; }
.ep:hover .ep__play { opacity: 1; }
.ep__play svg { width: 44px; height: 44px; }
.ep__n { font-size: 12px; color: var(--mut); margin-top: 8px; font-weight: 600; }
.ep__t { font-weight: 600; font-size: 14px; }
.ep__d { font-size: 13px; color: var(--mut); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* přehrávač */
.player { max-width: 1200px; margin: 0 auto; padding: 0 var(--padr) 0 var(--pad); }
.player__video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); display: block; }
.player h1 { font-size: 22px; margin: 16px 0 4px; word-break: break-word; }
.player .sub { color: var(--mut); margin-bottom: 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.controls select, .controls a.c { height: 38px; padding: 0 12px; border-radius: 10px; background: var(--bg2); border: 0;
  color: var(--fg); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.controls label { color: var(--mut); font-size: 13px; }
.controls svg { width: 18px; height: 18px; }
.resume { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bg2);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.resume button { padding: 6px 12px; border-radius: 8px; border: 0; background: var(--bg3); font-weight: 600; }

.spin { width: 34px; height: 34px; border: 3px solid var(--bg3); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite; margin: 60px auto; }
.spin--sm { width: 22px; height: 22px; border-width: 2px; margin: 12px var(--pad); }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(44, 44, 46, .95); padding: 10px 18px; border-radius: 12px; z-index: 50; max-width: 90vw; text-align: center; }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 60; text-align: center; font-size: 13px; padding: 4px;
  padding-top: max(4px, env(safe-area-inset-top)); background: #7a2a10; }

@media (max-width: 900px) {
  .tabs, .search { display: none; }
  .brand { margin-right: auto; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom)); background: rgba(22, 22, 24, .82);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; font-weight: 600; color: var(--mut2); }
  .tabbar a.on { color: #fff; }
  .tabbar svg { width: 24px; height: 24px; }
  main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .arrow { display: none; }
}
@media (max-width: 640px) {
  :root { --pw: 118px; --pad: max(16px, env(safe-area-inset-left)); --padr: max(16px, env(safe-area-inset-right)); }
  .row { gap: 10px; }
  .hero { height: 72vh; min-height: 480px; }
  .slide__poster { right: 50%; transform: translate(50%, 0); top: 12%; height: 46%; }
  .slide__info { padding-bottom: 50px; }
  .slide__desc { -webkit-line-clamp: 2; font-size: 14px; }
  .detail__head { flex-direction: column; align-items: center; text-align: center; padding-top: 90px; gap: 20px; }
  .detail__poster { width: 170px; }
  .detail__info .meta, .detail__info .btns { justify-content: center; }
  .btn--play { flex: 1; }
  .file__img { width: 110px; }
  .eps { grid-template-columns: 1fr; }
  .grid { gap: 16px 10px; }
  .grid--wide { grid-template-columns: repeat(2, 1fr); }
  .player { padding: 0; }
  .player__video { border-radius: 0; }
  .player h1, .player .sub, .controls, .resume, .player .section { margin-left: 16px; margin-right: 16px; }
  .player .section > h2, .player .files { margin-left: 0; margin-right: 0; }
  h1.page { font-size: 28px; }
}
.sep { color: var(--mut2); }
.orig { color: var(--mut); font-size: 15px; margin: -4px 0 8px; }
.src { color: var(--mut2); font-size: 11px; margin: -12px 0 18px; }
.btn.on { background: rgba(48, 209, 88, .28); }
