diff --git a/.gitignore b/.gitignore index 00b1b8a..3e86c14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ -result/ +result* +config.json diff --git a/config.example.json b/config.example.json new file mode 100644 index 0000000..415846a --- /dev/null +++ b/config.example.json @@ -0,0 +1,12 @@ +{ + "tmdbKey": "YOUR_TMDB_API_KEY", + "enabledProviders": [], + "disabledProviders": ["torrentio"], + "timeoutMs": 20000, + "filters": { + "minQuality": "any", + "audioCodec": "any", + "subtitles": "any", + "subtitleLang": "" + } +} diff --git a/config.json b/config.json deleted file mode 100644 index 0ad6ebd..0000000 --- a/config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tmdbKey": "ac014b130a8e6344c91dff4e68b18d47", - "enabledProviders": [ - "cineby", - "videasy", - "vidfast" - ], - "timeoutMs": 30000, - "filters": { - "minQuality": "any", - "audioCodec": "any", - "subtitles": "any", - "subtitleLang": "" - } -} diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000..4269aca --- /dev/null +++ b/docs/api.md @@ -0,0 +1,223 @@ +# bug tv v5 — API & module contract + +This is the single source of truth every workstream codes against. If you need to +deviate, keep the deviation backwards compatible and note it at the bottom of this file. + +## Runtime +- Node 22+, CommonJS in `src/` (providers are CommonJS). No TypeScript, no bundler. +- npm deps allowed: `cheerio-without-node-native`, `crypto-js` (providers), `undici` + (keep-alive agent), `webtorrent` (torrents). `ffmpeg`/`ffprobe` come from PATH + (`cfg.remux.ffmpeg` / `cfg.remux.ffprobe`). +- Static site in `web/` is vanilla ES modules (` + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + diff --git a/web/css/base.css b/web/css/base.css index 05b0b39..b4bdef0 100644 --- a/web/css/base.css +++ b/web/css/base.css @@ -1,196 +1,207 @@ /* - BASE — reset, typography, page frame (header/footer/container). - Layout-level stuff only; reusable widgets live in components.css. + base.css — reset, typography, layout shell (header, footer, tab bar), utilities. */ - -*, -*::before, -*::after { - box-sizing: border-box; -} - -[hidden] { - display: none !important; -} +*, *::before, *::after { box-sizing: border-box; } html { -webkit-text-size-adjust: 100%; + text-size-adjust: 100%; + scrollbar-color: var(--surface-3) var(--bg); + background: var(--bg); } +html.has-modal { overflow: hidden; } + body { margin: 0; - font-family: var(--font-sans); - font-size: var(--text-md); - line-height: var(--leading-normal); - background: var(--color-bg); - color: var(--color-text); min-height: 100vh; + background: var(--bg); + color: var(--text); + font-family: var(--font); + font-size: var(--fs-base); + line-height: var(--lh); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow-x: hidden; + padding-bottom: var(--tabbar-h); } -img { - max-width: 100%; - display: block; -} +img, svg, video, iframe { display: block; max-width: 100%; } +img { color: transparent; } +h1, h2, h3, h4, p { margin: 0; } +h1, h2, h3 { line-height: var(--lh-tight); letter-spacing: -0.01em; } +a { color: inherit; text-decoration: none; } +button, input, select, textarea { font: inherit; color: inherit; } +button { cursor: pointer; background: none; border: 0; padding: 0; } +[hidden] { display: none !important; } +::selection { background: var(--accent); color: var(--accent-ink); } -a { - color: inherit; - text-decoration: none; -} +:focus { outline: none; } +:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-sm); } -button { - font: inherit; +.sr-only { + position: absolute !important; + width: 1px; height: 1px; + padding: 0; margin: -1px; + overflow: hidden; clip: rect(0 0 0 0); + white-space: nowrap; border: 0; } -h1, -h2, -h3 { - margin: 0; - line-height: var(--leading-tight); -} - -p { - margin: 0; -} - -code { - padding: 1px var(--space-1); - border-radius: var(--radius-sm); - background: var(--color-surface-2); - border: 1px solid var(--color-border); - font-size: 0.9em; -} - -/* ---- page frame ---------------------------------------------------------- */ - .container { - max-width: var(--container-max); - margin: 0 auto; - padding-left: var(--container-pad); - padding-right: var(--container-pad); + width: 100%; + padding-inline: var(--gutter); } -.page { - padding-top: var(--space-5); - padding-bottom: var(--space-8); +.muted { color: var(--text-3); } +.center { text-align: center; } + +.skip-link { + position: fixed; top: 8px; left: 8px; z-index: 200; + padding: 10px 16px; border-radius: var(--r-md); + background: var(--accent); color: var(--accent-ink); font-weight: var(--fw-bold); + transform: translateY(-150%); + transition: transform var(--dur) var(--ease); } +.skip-link:focus { transform: none; } -/* ---- header ---------------------------------------------------------------- */ +.app { min-height: calc(100vh - 120px); } +.app:focus { outline: none; } +/* ---- header ------------------------------------------------------------------- */ .site-header { - position: sticky; - top: 0; - z-index: 50; - border-bottom: 1px solid var(--color-border); - background: var(--color-bg); - background: color-mix(in srgb, var(--color-bg) 85%, transparent); - backdrop-filter: blur(12px); + position: fixed; inset: 0 0 auto 0; z-index: var(--z-header); + height: var(--header-h); + background: var(--overlay); + background-origin: border-box; + -webkit-backdrop-filter: saturate(160%) blur(18px); + backdrop-filter: saturate(160%) blur(18px); + border-bottom: 1px solid var(--border); + transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease); +} +.site-header.is-over-hero:not(.is-solid) { + background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%); + -webkit-backdrop-filter: none; + backdrop-filter: none; + border-bottom-color: transparent; + box-shadow: none; } - .site-header__inner { - display: grid; - grid-template-columns: 1fr auto 1fr; - align-items: center; - gap: var(--space-4); - height: var(--header-height); + height: 100%; + display: flex; align-items: center; gap: var(--sp-7); } .brand { - font-size: var(--text-xl); - font-weight: var(--font-weight-bold); - letter-spacing: -0.02em; + display: inline-flex; align-items: center; gap: 10px; + font-weight: var(--fw-heavy); font-size: 1.3rem; letter-spacing: -0.03em; + flex-shrink: 0; +} +.brand__mark { + display: block; width: 32px; height: 32px; + filter: drop-shadow(0 2px 10px var(--accent-glow)); +} +.brand__word span { color: var(--accent); } +.brand--sm { font-size: 1rem; } +.brand--sm .brand__mark { width: 24px; height: 24px; filter: none; } + +.site-nav { display: flex; gap: var(--sp-2); } +.site-nav__link { + position: relative; + padding: 8px 12px; border-radius: var(--r-md); + color: var(--text-2); font-weight: var(--fw-semi); font-size: 0.95rem; + transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); +} +.site-nav__link:hover { color: var(--text); } +.site-nav__link.is-active { color: var(--text); } +.site-nav__link.is-active::after { + content: ""; position: absolute; left: 50%; bottom: 0; + width: 18px; height: 3px; border-radius: 3px; background: var(--accent); + transform: translateX(-50%); } -.brand span { - color: var(--color-accent); -} +.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); } -.site-header__nav { - display: flex; - gap: var(--space-1); +.header-search { + display: flex; align-items: center; gap: 8px; + width: 260px; height: 42px; padding: 0 10px 0 12px; + border-radius: var(--r-pill); + background: rgba(255, 255, 255, 0.08); + border: 1px solid var(--glass-border); + transition: width var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease); } - -.site-header__nav a { - padding: var(--space-2) var(--space-4); - border-radius: var(--radius-full); - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); - color: var(--color-text-dim); - transition: background 120ms ease, color 120ms ease; +.header-search:focus-within { width: 320px; background: rgba(0, 0, 0, 0.55); border-color: rgba(255, 255, 255, 0.4); } +.header-search__icon { color: var(--text-2); display: grid; place-items: center; } +.header-search input { + flex: 1; min-width: 0; height: 100%; + background: none; border: 0; outline: none; + font-size: var(--fs-sm); font-weight: var(--fw-medium); } - -.site-header__nav a:hover { - color: var(--color-text); - background: var(--color-surface); +.header-search input::placeholder { color: var(--text-3); } +.header-search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); } +.header-search__kbd { + font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-3); + border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px; } - -.site-header__nav a.is-active { - color: var(--color-accent-text); - background: var(--color-accent); -} - -.site-header__actions { - display: flex; - justify-content: flex-end; - gap: var(--space-1); -} - -/* ---- icon buttons ----------------------------------------------------------- */ +.header-search:focus-within .header-search__kbd { display: none; } +.header-search-link { display: none !important; } .icon-btn { - display: inline-flex; - align-items: center; - justify-content: center; - width: 38px; - height: 38px; - border: none; - border-radius: var(--radius-full); - background: transparent; - color: var(--color-text-dim); - cursor: pointer; - transition: background 120ms ease, color 120ms ease; + display: inline-grid; place-items: center; + width: 42px; height: 42px; border-radius: var(--r-pill); + color: var(--text-2); + transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); } +.icon-btn:hover, .icon-btn.is-active { color: var(--text); background: var(--glass); } -.icon-btn:hover { - background: var(--color-surface); - color: var(--color-text); -} - -.icon-btn.is-active { - color: var(--color-accent); -} - -.icon-btn svg { - width: 20px; - height: 20px; -} - -/* ---- footer ------------------------------------------------------------------ */ - +/* ---- footer ------------------------------------------------------------------- */ .site-footer { - border-top: 1px solid var(--color-border); - padding: var(--space-4) 0 var(--space-5); - color: var(--color-text-faint); - font-size: var(--text-xs); + margin-top: var(--sp-10); + border-top: 1px solid var(--border); + color: var(--text-3); font-size: var(--fs-xs); } - -.site-footer .container { - display: flex; - gap: var(--space-3); - flex-wrap: wrap; +.site-footer__inner { + display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-7); + padding-block: var(--sp-7); } +.site-footer__note { flex: 1; min-width: 220px; } +.site-footer a { color: var(--text-2); } +.site-footer a:hover { color: var(--accent); } -.site-footer a { - color: var(--color-text-dim); +/* ---- mobile tab bar ------------------------------------------------------------- */ +.tabbar { display: none; } + +@media (max-width: 1080px) { + .site-header__inner { gap: var(--sp-5); } + .site-nav__link { padding-inline: 8px; } + .header-search, .header-search:focus-within { width: 200px; } } -.site-footer a:hover { - color: var(--color-text); -} - -/* ---- responsive ---------------------------------------------------------------- */ - @media (max-width: 720px) { - .site-header__nav a { - padding: var(--space-2) var(--space-3); + .site-nav, .header-search { display: none; } + .header-search-link { display: inline-grid !important; } + .site-header__actions { gap: 0; } + .brand { font-size: 1.15rem; } + .brand__mark { width: 28px; height: 28px; } + .tabbar { + position: fixed; inset: auto 0 0 0; z-index: var(--z-tabbar); + display: grid; grid-template-columns: repeat(5, 1fr); + height: var(--tabbar-h); + padding-bottom: env(safe-area-inset-bottom, 0px); + background: rgba(12, 12, 15, 0.92); + -webkit-backdrop-filter: blur(18px); + backdrop-filter: blur(18px); + border-top: 1px solid var(--border); } + .tabbar__link { + display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; + color: var(--text-3); font-size: var(--fs-2xs); font-weight: var(--fw-semi); + } + .tabbar__link.is-active { color: var(--text); } + .tabbar__link.is-active .icon { color: var(--accent); } + .site-footer { margin-top: var(--sp-8); } } + +/* the player takes over the screen; it renders its own chrome */ +body[data-route="watch"] .site-header, +body[data-route="watch"] .site-footer, +body[data-route="watch"] .tabbar { display: none; } +body[data-route="watch"] { padding-bottom: 0; } diff --git a/web/css/components.css b/web/css/components.css index 277d9d0..0261d0b 100644 --- a/web/css/components.css +++ b/web/css/components.css @@ -1,769 +1,473 @@ /* - COMPONENTS — reusable widgets. Each block is self-contained and named - after the thing it styles (BEM-ish: block, block__element, block--modifier). - Theme values come from tokens.css; never hardcode colors/sizes here if a - token exists. - */ - -/* ---- buttons ------------------------------------------------------------- */ + components.css — reusable UI: buttons, chips, rating, progress, cards, rows, hero, + skeletons, tabs, inputs, switches, toasts, modal, empty states, grid. +*/ +/* ---- buttons -------------------------------------------------------------------- */ .btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: var(--space-2); - padding: var(--space-2) var(--space-5); - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-full); - background: var(--color-surface-2); - color: var(--color-text); - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); - line-height: 1.3; - cursor: pointer; - user-select: none; - transition: background 120ms ease, border-color 120ms ease, color 120ms ease; + position: relative; overflow: hidden; + display: inline-flex; align-items: center; justify-content: center; gap: 10px; + height: 44px; padding: 0 20px; + border-radius: var(--r-md); + border: 1px solid transparent; + font-size: 0.95rem; font-weight: var(--fw-bold); letter-spacing: -0.005em; + white-space: nowrap; user-select: none; + transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), + border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease); } - -.btn:hover { - background: var(--color-surface-hover); - border-color: var(--color-border-strong); -} - -.btn:active { - transform: translateY(1px); -} - -.btn:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: 2px; -} - -.btn--primary { - background: var(--color-accent); - border-color: var(--color-accent); - color: var(--color-accent-text); -} - -.btn--primary:hover { - background: var(--color-accent-hover); - border-color: var(--color-accent-hover); -} - -.btn--ghost { - background: transparent; - border-color: transparent; - color: var(--color-text-dim); -} - -.btn--ghost:hover { - background: var(--color-surface); - color: var(--color-text); -} - -.btn--sm { - padding: var(--space-1) var(--space-3); - font-size: var(--text-xs); -} - -.btn:disabled { - opacity: 0.5; - cursor: default; - pointer-events: none; -} - -/* ---- form fields --------------------------------------------------------- */ - -.field { - width: 100%; - padding: var(--space-2) var(--space-3); - border: 1px solid var(--color-border); - border-radius: var(--radius-sm); - background: var(--color-surface-2); - color: var(--color-text); - font: inherit; - font-size: var(--text-sm); -} - -.field::placeholder { - color: var(--color-text-faint); -} - -.field:focus { - outline: none; - border-color: var(--color-accent); - box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 25%, transparent); -} - -select.field { - appearance: none; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a9a9a' stroke-width='2'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: right 12px center; - padding-right: 32px; -} - -.field-label { - display: block; - margin-bottom: var(--space-1); - font-size: var(--text-xs); - font-weight: var(--font-weight-medium); - color: var(--color-text-dim); -} - -/* ---- badges & tags -------------------------------------------------------- */ - -.badge { - display: inline-flex; - align-items: center; - padding: 1px var(--space-2); - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-full); - font-size: var(--text-xs); - font-weight: var(--font-weight-semibold); - letter-spacing: 0.04em; - text-transform: uppercase; - color: var(--color-text-dim); - white-space: nowrap; -} - -.badge--accent { - border-color: var(--color-accent); - color: var(--color-accent); -} - -.tag { - display: inline-block; - padding: 2px var(--space-2); - border-radius: var(--radius-full); - background: var(--color-surface-2); - border: 1px solid var(--color-border); - font-size: var(--text-xs); - color: var(--color-text-dim); -} - -/* ---- chips (filters) ------------------------------------------------------- */ - -.chips { - display: flex; - flex-wrap: wrap; - gap: var(--space-2); +.btn:active { transform: scale(0.97); } +.btn:focus-visible { outline: none; box-shadow: var(--ring); } +.btn .icon { flex-shrink: 0; } +.btn--lg { height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 12px; } +.btn--sm { height: 34px; padding: 0 14px; font-size: var(--fs-sm); border-radius: var(--r-sm); gap: 6px; } +.btn--icon { padding: 0; width: 44px; } +.btn--lg.btn--icon { width: 52px; } +.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 22px -6px var(--accent-glow); } +.btn--primary:hover { background: var(--accent-hover); } +.btn--glass { + background: var(--glass); color: var(--text); border-color: var(--glass-border); + -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); } +.btn--glass:hover { background: var(--glass-hover); } +.btn--glass.is-on { border-color: var(--accent); color: var(--accent-hover); background: var(--accent-soft); } +.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); } +.btn--ghost:hover { background: var(--glass); } +.btn--white { background: #fff; color: #000; } +.btn--white:hover { background: #e6e6e6; } +.btn[disabled] { opacity: 0.5; pointer-events: none; } +.btn__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, 0.2); } +.btn__progress i { display: block; height: 100%; background: var(--accent-ink); opacity: 0.6; } +/* ---- chips, badges, rating, progress --------------------------------------------- */ .chip { - padding: var(--space-1) var(--space-4); - border: 1px solid var(--color-border); - border-radius: var(--radius-full); - background: transparent; - color: var(--color-text-dim); - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); - cursor: pointer; - transition: background 120ms ease, color 120ms ease, border-color 120ms ease; + display: inline-flex; align-items: center; height: 24px; padding: 0 9px; + border-radius: var(--r-sm); background: var(--glass); + font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: 0.02em; color: var(--text); } - -.chip:hover { - border-color: var(--color-border-strong); - color: var(--color-text); +.chip--outline { background: transparent; border: 1px solid rgba(255, 255, 255, 0.45); } +.badge { + display: inline-flex; align-items: center; gap: 6px; + height: 28px; padding: 0 12px; border-radius: var(--r-sm); + background: rgba(0, 0, 0, 0.5); border: 1px solid var(--glass-border); + -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); + font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text); } +.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--star); font-weight: var(--fw-bold); } +.rating .icon { color: var(--star); } +.rating--lg { font-size: 1rem; } +.progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; } +.progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); } -.chip--active { - background: var(--color-accent); - border-color: var(--color-accent); - color: var(--color-accent-text); +/* ---- skeleton ------------------------------------------------------------------- */ +.skeleton { + position: relative; overflow: hidden; + background: var(--surface-2); + border-radius: var(--r-md); } - -/* ---- media cards (poster) --------------------------------------------------- */ - -.card { - display: block; - flex: 0 0 var(--card-width); - width: var(--card-width); - cursor: pointer; +.skeleton::after { + content: ""; position: absolute; inset: 0; + background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%); + transform: translateX(-100%); + animation: shimmer 1.4s infinite; } +.skeleton--line { height: 12px; margin-top: 10px; border-radius: 6px; width: 80%; } +.skeleton--short { width: 45%; } +.skeleton--block { border-radius: var(--r-md); margin-bottom: 14px; } +@keyframes shimmer { to { transform: translateX(100%); } } -.card__poster { - position: relative; - display: block; - aspect-ratio: var(--poster-aspect); - border-radius: var(--radius-md); - overflow: hidden; - background: var(--color-surface); - border: 1px solid var(--color-border); - transition: border-color 120ms ease, box-shadow 120ms ease; +/* ---- cards ---------------------------------------------------------------------- */ +.card { position: relative; min-width: 0; scroll-snap-align: start; } +.card__link { display: block; border-radius: var(--r-md); outline: none; } +.card__media { + position: relative; overflow: hidden; + border-radius: var(--r-md); + background: var(--surface-2); + transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); + isolation: isolate; } - -.card:hover .card__poster { - border-color: var(--color-accent); - box-shadow: 0 0 0 1px var(--color-accent); +.card__img { + position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; + opacity: 0; transition: opacity var(--dur-slow) var(--ease); } - -.card__poster img { - width: 100%; - height: 100%; - object-fit: cover; - transition: transform 220ms ease; +.card__img.is-loaded { opacity: 1; } +.card__img.is-fallback { filter: saturate(0.6) brightness(0.7); } +.card__fallback { + position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; + text-align: center; color: var(--text-3); font-weight: var(--fw-bold); font-size: var(--fs-sm); + background: linear-gradient(160deg, var(--surface-3), var(--surface)); } - -.card:hover .card__poster img { - transform: scale(1.04); +.card__shade { + position: absolute; inset: 0; + background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 75%); } - -.card__poster--empty { - display: flex; - align-items: center; - justify-content: center; - color: var(--color-text-faint); - font-size: var(--text-2xl); +.card__play { + display: grid; place-items: center; + width: 40px; height: 40px; border-radius: 50%; + background: var(--accent); color: var(--accent-ink); + box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); } +.card__play .icon { margin-left: 2px; } +.card__play { cursor: pointer; pointer-events: auto; transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); } +.card__play:hover { background: var(--accent-hover); transform: scale(1.08); } +.card__play--center:hover { transform: translate(-50%, -50%) scale(1.08); } +.card__play--center { + position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; + transform: translate(-50%, -50%) scale(0.8); opacity: 0; + transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); +} +.card__progress { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; } +.card__link:hover .card__media, +.card__link:focus-visible .card__media { + transform: translateY(-4px) scale(1.035); + box-shadow: var(--shadow-lg); +} +.card__link:focus-visible .card__media { box-shadow: var(--ring), var(--shadow-lg); } +.card__link:hover .card__play--center, +.card__link:focus-visible .card__play--center { opacity: 1; transform: translate(-50%, -50%) scale(1); } + +/* poster */ +.card--poster .card__media { aspect-ratio: 2 / 3; } +.card__hover { + position: absolute; inset: 0; z-index: 1; + display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; + padding: 12px; + background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 70%); + opacity: 0; transition: opacity var(--dur) var(--ease); +} +.card__hover-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-2); } +.card__link:hover .card__hover, .card__link:focus-visible .card__hover { opacity: 1; } +.card__body { padding: 10px 2px 0; } .card__title { - margin-top: var(--space-2); - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); - line-height: 1.3; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; + font-size: var(--fs-sm); font-weight: var(--fw-bold); line-height: 1.3; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } - .card__meta { - margin-top: 2px; - display: flex; - align-items: center; - gap: 6px; - min-width: 0; - font-size: var(--text-xs); - color: var(--color-text-faint); + display: flex; align-items: center; gap: 8px; + margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-medium); + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } - -.card__meta__text { - min-width: 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; +.card__rank { + position: absolute; top: 8px; left: 8px; z-index: 2; + min-width: 28px; height: 24px; padding: 0 7px; border-radius: var(--r-sm); + display: inline-flex; align-items: center; justify-content: center; + background: rgba(0, 0, 0, 0.62); border: 1px solid var(--glass-border); + -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); + font-size: var(--fs-xs); font-weight: var(--fw-heavy); } +.card__rank::before { content: "#"; color: var(--accent); margin-right: 1px; } -.card__ep { - color: var(--color-text-dim); - font-weight: var(--font-weight-semibold); - letter-spacing: 0.03em; - white-space: nowrap; +/* wide (backdrop) */ +.card--wide .card__media { aspect-ratio: 16 / 9; } +.card__overlay { + position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; + padding: 14px 16px; + display: flex; flex-direction: column; gap: 2px; } - -.card__ep-dot { - margin: 0 2px; - color: var(--color-text-faint); +.card--wide .card__title { font-size: 1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); } +.card--wide .card__meta { color: var(--text-2); } +.card--wide .card__overlay .progress { margin-top: 8px; } +.card__kicker { + font-size: var(--fs-2xs); font-weight: var(--fw-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } - -.card__dot { - color: var(--color-text-faint); +.card__remove { + position: absolute; top: 8px; right: 8px; z-index: 3; + display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; + background: rgba(0, 0, 0, 0.6); color: var(--text); border: 1px solid var(--glass-border); + opacity: 0; transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast); } +.card:hover .card__remove, .card__remove:focus-visible { opacity: 1; } +.card__remove:hover { background: var(--danger); } +@media (hover: none) { .card__remove { opacity: 0.85; } } -.card__progress { - position: absolute; - left: 0; - right: 0; - bottom: 0; - height: 4px; - background: rgba(0, 0, 0, 0.6); +/* logo (networks) */ +.card--logo .card__media { + aspect-ratio: 2 / 1; + display: grid; place-items: center; + background: linear-gradient(160deg, var(--surface-2), var(--surface)); + border: 1px solid var(--border); } +.card__logo { max-width: 62%; max-height: 42%; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.88; transition: opacity var(--dur); } +.card__logo-text { font-weight: var(--fw-heavy); font-size: 1.15rem; letter-spacing: -0.02em; color: var(--text); } +.card--logo .card__link:hover .card__media { border-color: var(--border-strong); background: var(--surface-3); } +.card--logo .card__link:hover .card__logo { opacity: 1; } -.card__progress i { - display: block; - height: 100%; - background: var(--color-accent); +/* skeleton cards */ +.card--skeleton.card--poster .card__media { aspect-ratio: 2 / 3; } +.card--skeleton.card--wide .card__media, .card--skeleton.card--episode .card__media { aspect-ratio: 16 / 9; } +.card--skeleton.card--logo .card__media { aspect-ratio: 2 / 1; } +.card--skeleton.card--cast .card__media { height: 64px; border-radius: var(--r-pill); } + +/* ---- rows (carousels) -------------------------------------------------------------- */ +.row { position: relative; margin-top: clamp(20px, 2.6vw, 40px); } +.row__head { + display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); + padding-inline: var(--gutter); + margin-bottom: 2px; } - -/* ---- rows (horizontal carousels) ------------------------------------------ */ - -.row { - margin-bottom: var(--space-6); +.row__title { font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.45rem); font-weight: var(--fw-heavy); letter-spacing: -0.02em; } +.row__more { + display: inline-flex; align-items: center; gap: 2px; + font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-3); + transition: color var(--dur-fast); } - -.row__header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: var(--space-3); - margin-bottom: var(--space-3); +.row__more:hover { color: var(--accent); } +.row__viewport { position: relative; } +.row__track { + display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-poster-w); + gap: var(--row-gap); + overflow-x: auto; overflow-y: hidden; + overscroll-behavior-x: contain; + scroll-snap-type: x mandatory; + scroll-padding-inline: var(--gutter); + padding: 14px var(--gutter) 18px; + scrollbar-width: none; } +.row__track::-webkit-scrollbar { display: none; } +.row--wide .row__track { grid-auto-columns: var(--card-wide-w); } +.row--logo .row__track { grid-auto-columns: var(--card-logo-w); } +.row--cast .row__track { grid-auto-columns: minmax(200px, 230px); gap: var(--sp-3); } -.row__title { - font-size: var(--text-lg); - font-weight: var(--font-weight-semibold); +.row__arrow { + position: absolute; top: 14px; bottom: 18px; z-index: 5; + width: calc(var(--gutter) - 4px); min-width: 40px; max-width: 64px; + display: grid; place-items: center; + color: var(--text); + opacity: 0; transition: opacity var(--dur) var(--ease), background var(--dur); } - -.row__link { - font-size: var(--text-sm); - color: var(--color-text-dim); +.row--poster .row__arrow { bottom: 62px; } +.row__arrow--prev { left: 0; background: linear-gradient(90deg, rgba(9, 9, 11, 0.92), transparent); } +.row__arrow--next { right: 0; background: linear-gradient(-90deg, rgba(9, 9, 11, 0.92), transparent); } +.row__arrow .icon { + width: 38px; height: 38px; padding: 8px; border-radius: 50%; + background: rgba(30, 30, 36, 0.9); border: 1px solid var(--glass-border); + box-shadow: var(--shadow-md); + transition: transform var(--dur-fast) var(--ease), background var(--dur-fast); } +.row__arrow:hover .icon { transform: scale(1.1); background: var(--surface-3); } +.row__viewport:hover .row__arrow:not(.is-hidden) { opacity: 1; } +.row__arrow.is-hidden { pointer-events: none; } +@media (hover: none), (max-width: 720px) { .row__arrow { display: none; } } -.row__link:hover { - color: var(--color-text); -} - -.row__scroll { - display: flex; - gap: var(--space-3); - overflow-x: auto; - scroll-snap-type: x proximity; - padding-bottom: var(--space-2); - scrollbar-width: thin; - scrollbar-color: var(--color-border-strong) transparent; -} - -.row__scroll .card { - scroll-snap-align: start; -} - -/* ---- results grid ---------------------------------------------------------- */ - +/* ---- grid ------------------------------------------------------------------------- */ .grid { display: grid; - grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr)); - gap: var(--space-4); + grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 14vw, 190px), 1fr)); + gap: clamp(18px, 2vw, 28px) clamp(10px, 1.2vw, 18px); } +@media (max-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; } } +@media (max-width: 360px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } -.grid .card { - flex: none; - width: auto; -} - -/* ---- toast ----------------------------------------------------------------- */ - -.toast { - position: fixed; - left: 50%; - bottom: var(--space-6); - z-index: 110; - transform: translateX(-50%); - max-width: min(90vw, 480px); - padding: var(--space-2) var(--space-5); - border: 1px solid var(--color-border-strong); - border-radius: var(--radius-full); - background: var(--color-surface); - box-shadow: var(--shadow-2); - font-size: var(--text-sm); - opacity: 0; - pointer-events: none; - transition: opacity 150ms ease, transform 150ms ease; -} - -.toast--show { - opacity: 1; -} - -.toast--error { - border-color: var(--color-danger); - color: var(--color-danger); -} - -/* ---- loading & empty states ------------------------------------------------- */ - -.spinner { - width: 28px; - height: 28px; - border: 3px solid var(--color-border); - border-top-color: var(--color-accent); - border-radius: 50%; - animation: spin 0.8s linear infinite; -} - -@keyframes spin { - to { - transform: rotate(360deg); - } -} - -.spinner--center { - padding: var(--space-8) 0; - text-align: center; -} - -.empty { - padding: var(--space-7) 0; - text-align: center; - color: var(--color-text-faint); -} - -.empty h3 { - font-size: var(--text-lg); - color: var(--color-text-dim); - margin-bottom: var(--space-2); -} - -/* ---- player controls --------------------------------------------------------- */ - -.player-wrap { - --pc-progress: 0%; +/* ---- hero billboard ---------------------------------------------------------------- */ +.hero { position: relative; - aspect-ratio: var(--player-aspect); - border-radius: var(--radius-md); + height: clamp(560px, 88vh, 920px); overflow: hidden; - background: #000; - border: 1px solid var(--color-border); - cursor: default; + background: var(--bg); } - -.player-wrap video { - width: 100%; - height: 100%; +.hero--loading .hero__skeleton { position: absolute; inset: 0; border-radius: 0; } +.hero__slides { position: absolute; inset: 0; } +.hero__slide { + position: absolute; inset: 0; + opacity: 0; visibility: hidden; + transition: opacity var(--dur-fade) var(--ease-in-out), visibility 0s linear var(--dur-fade); +} +.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity var(--dur-fade) var(--ease-in-out), visibility 0s; } +.hero__media { position: absolute; inset: 0; overflow: hidden; } +.hero__img { + width: 100%; height: 100%; object-fit: cover; object-position: center 20%; + opacity: 0; transform: scale(1.06); + transition: opacity 1s var(--ease), transform 9s linear; +} +.hero__img.is-loaded { opacity: 1; } +.hero__slide.is-active .hero__img.is-loaded, .title-hero .hero__img { transform: scale(1); } +.hero__scrim { + position: absolute; inset: 0; + background: + linear-gradient(90deg, rgba(9, 9, 11, 0.94) 0%, rgba(9, 9, 11, 0.72) 28%, rgba(9, 9, 11, 0.15) 60%, transparent 75%), + linear-gradient(0deg, var(--bg) 0%, rgba(9, 9, 11, 0.6) 20%, transparent 50%), + linear-gradient(180deg, rgba(9, 9, 11, 0.55) 0%, transparent 22%); +} +.hero__content { + position: absolute; inset: auto 0 0 0; z-index: 2; + padding-bottom: clamp(130px, 17vh, 190px); + display: flex; flex-direction: column; align-items: flex-start; gap: 16px; + max-width: calc(min(720px, 60vw) + var(--gutter) * 2); +} +.hero__slide .hero__content > * { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); } +.hero__slide.is-active .hero__content > * { opacity: 1; transform: none; } +.hero__slide.is-active .hero__content > :nth-child(2) { transition-delay: 80ms; } +.hero__slide.is-active .hero__content > :nth-child(3) { transition-delay: 140ms; } +.hero__slide.is-active .hero__content > :nth-child(4) { transition-delay: 200ms; } +.hero__slide.is-active .hero__content > :nth-child(5) { transition-delay: 260ms; } +.hero__eyebrow { + display: inline-flex; align-items: center; gap: 8px; + font-size: var(--fs-md); font-weight: var(--fw-heavy); letter-spacing: -0.01em; +} +.hero__eyebrow .icon { color: var(--accent); } +.hero__titlebox { width: 100%; } +.hero__title { font-size: var(--fs-hero); font-weight: var(--fw-heavy); letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5); } +.hero__logo { display: block; - background: #000; + max-width: min(520px, 90%); max-height: clamp(90px, 16vh, 170px); + width: auto; height: auto; object-fit: contain; object-position: left bottom; + filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.6)); } +.hero__meta { + display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; + color: var(--text); font-size: 0.95rem; font-weight: var(--fw-semi); +} +.hero__genres { color: var(--text-2); } +.hero__genres .dot { margin: 0 6px; color: var(--text-3); } +.meta-link { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; } +.meta-link:hover { color: var(--accent-hover); text-decoration-color: currentColor; } +.hero__overview { + max-width: 62ch; color: var(--text-2); font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem); + display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; + text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); +} +.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; } -/* top-left back button */ -.player-back { - position: absolute; - top: var(--space-3); - left: var(--space-3); - z-index: 5; - display: inline-flex; - align-items: center; - justify-content: center; - width: 42px; - height: 42px; - border-radius: var(--radius-full); - background: rgba(0, 0, 0, 0.45); - color: #fff; - backdrop-filter: blur(6px); - opacity: 0; - transform: translateY(-4px); - transition: opacity 160ms ease, transform 160ms ease, background 120ms ease; -} - -.player-back:hover { - background: rgba(0, 0, 0, 0.7); -} - -.player-back svg { - width: 22px; - height: 22px; -} - -/* centered big play (shown when paused) */ -.player-bigplay { - position: absolute; - top: 50%; - left: 50%; - z-index: 4; - transform: translate(-50%, -50%); - width: 76px; - height: 76px; - border: none; - border-radius: var(--radius-full); - background: color-mix(in srgb, var(--color-accent) 90%, transparent); - color: var(--color-accent-text); - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - box-shadow: var(--shadow-2); - opacity: 0; - pointer-events: none; - transition: opacity 160ms ease, transform 160ms ease; -} - -.player-bigplay:hover { - transform: translate(-50%, -50%) scale(1.05); -} - -.player-bigplay svg { - width: 34px; - height: 34px; - margin-left: 4px; -} - -/* bottom controls bar */ -.player-controls { - position: absolute; - left: 0; - right: 0; - bottom: 0; - z-index: 6; - display: flex; - flex-direction: column; - padding: var(--space-4) var(--space-4) var(--space-3); - background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); - opacity: 0; - transform: translateY(6px); - transition: opacity 160ms ease, transform 160ms ease; -} - -.player-controls__bar { - display: flex; - align-items: center; - gap: var(--space-2); -} - -.player-controls__spacer { - flex: 1; -} - -.pc-btn { - display: inline-flex; - align-items: center; - justify-content: center; - width: 38px; - height: 38px; - flex: 0 0 auto; - border: none; - border-radius: var(--radius-sm); - background: transparent; - color: #fff; - cursor: pointer; - transition: background 120ms ease; -} - -.pc-btn:hover { - background: rgba(255, 255, 255, 0.14); -} - -.pc-btn:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: 2px; -} - -.pc-btn svg { - width: 20px; - height: 20px; -} - -.pc-btn--text { - width: auto; - padding: 0 var(--space-2); - font-size: var(--text-xs); - font-weight: var(--font-weight-bold); - letter-spacing: 0.04em; -} - -.pc-btn.is-on { - color: var(--color-accent); -} - -.pc-time { - flex: 0 0 auto; - font-size: var(--text-xs); - font-variant-numeric: tabular-nums; - color: rgba(255, 255, 255, 0.85); - white-space: nowrap; -} - -.pc-quality { - flex: 0 0 auto; - font-size: var(--text-xs); - font-weight: var(--font-weight-semibold); - color: var(--color-accent); - white-space: nowrap; -} - -/* range inputs (seek + volume) */ -.pc-seek, -.pc-vol { - -webkit-appearance: none; - appearance: none; - height: 4px; - border-radius: var(--radius-full); - background: linear-gradient( - to right, - var(--color-accent) var(--pc-progress), - rgba(255, 255, 255, 0.28) var(--pc-progress) - ); - cursor: pointer; -} - -.pc-seek { - width: 100%; - margin-bottom: var(--space-2); -} - -.pc-vol { - width: 72px; - flex: 0 0 auto; -} - -.pc-seek::-webkit-slider-thumb, -.pc-vol::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - width: 13px; - height: 13px; - border-radius: 50%; - background: var(--color-accent); - border: none; - box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4); -} - -.pc-seek::-moz-range-thumb, -.pc-vol::-moz-range-thumb { - width: 13px; - height: 13px; - border-radius: 50%; - background: var(--color-accent); - border: none; - box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4); -} - -/* show back + controls when hovered or flagged */ -.player-wrap:hover .player-controls, -.player-wrap:hover .player-back, -.player-wrap--controls .player-controls, -.player-wrap--controls .player-back { - opacity: 1; - transform: none; -} - -.player-wrap:hover .player-bigplay, -.player-wrap--controls .player-bigplay { - /* big play only when paused — handled by .player-wrap--paused below */ -} - -.player-wrap--paused .player-bigplay { - opacity: 1; - pointer-events: auto; -} - -/* in-player source switcher (gear popup) */ -.player-sources { - position: absolute; - right: var(--space-3); - bottom: calc(var(--space-4) + 64px); - z-index: 7; - display: flex; - flex-direction: column; - width: min(380px, calc(100% - var(--space-6))); - max-height: calc(100% - 112px); - border: 1px solid rgba(255, 255, 255, 0.14); - border-radius: var(--radius-md); - background: rgba(10, 10, 10, 0.94); - backdrop-filter: blur(12px); - box-shadow: var(--shadow-2); - overflow: hidden; -} - -.player-sources__head { - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--space-3); - padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); - border-bottom: 1px solid rgba(255, 255, 255, 0.1); - color: #fff; - font-size: var(--text-sm); - font-weight: var(--font-weight-semibold); -} - -.player-sources__close { - display: inline-flex; - align-items: center; - justify-content: center; - width: 34px; - height: 34px; - flex: 0 0 auto; - border: none; - border-radius: var(--radius-full); - background: rgba(255, 255, 255, 0.1); - color: #fff; - cursor: pointer; - transition: background 120ms ease; -} - -.player-sources__close:hover { - background: rgba(255, 255, 255, 0.22); -} - -.player-sources__close svg { - width: 18px; - height: 18px; -} - -.player-sources__list { - flex: 1; - min-height: 0; - display: flex; - flex-direction: column; - gap: 2px; - overflow-y: auto; - padding: var(--space-2); - scrollbar-width: thin; - scrollbar-color: var(--color-border-strong) transparent; -} - -.player-sources__group { - padding: var(--space-2) var(--space-3) var(--space-1); - font-size: var(--text-xs); - font-weight: var(--font-weight-semibold); - letter-spacing: 0.06em; - text-transform: uppercase; - color: rgba(255, 255, 255, 0.55); -} - -.player-sources__group--error { - color: var(--color-danger); - cursor: help; -} - -.source-item { - display: flex; - align-items: center; - gap: var(--space-3); - width: 100%; - padding: var(--space-2) var(--space-3); - border: none; - border-radius: var(--radius-sm); - background: transparent; - color: var(--color-text); - text-align: left; - cursor: pointer; - font-size: var(--text-sm); -} - -.source-item:hover { - background: rgba(255, 255, 255, 0.08); -} - -.source-item--active { - background: color-mix(in srgb, var(--color-accent) 20%, transparent); -} - -.source-item__rank { - flex: 0 0 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - border-radius: var(--radius-full); - background: rgba(255, 255, 255, 0.08); - border: 1px solid rgba(255, 255, 255, 0.18); - font-size: var(--text-xs); - color: rgba(255, 255, 255, 0.75); -} - -.source-item--active .source-item__rank { - background: var(--color-accent); - border-color: var(--color-accent); - color: var(--color-accent-text); -} - -.source-item__name { - font-weight: var(--font-weight-medium); -} - -.source-item__meta { - margin-left: auto; - color: rgba(255, 255, 255, 0.5); - font-size: var(--text-xs); - white-space: nowrap; +.hero__dots { position: absolute; left: 0; right: 0; bottom: clamp(100px, 13vh, 150px); z-index: 3; display: flex; justify-content: flex-end; pointer-events: none; } +.hero__dots-inner { display: flex; gap: 8px; pointer-events: auto; } +.hero__dot { + position: relative; width: 8px; height: 8px; border-radius: 8px; overflow: hidden; + background: rgba(255, 255, 255, 0.35); + transition: width var(--dur) var(--ease), background var(--dur); } +.hero__dot::before { content: ""; position: absolute; inset: -10px; } +.hero__dot:hover { background: rgba(255, 255, 255, 0.6); } +.hero__dot.is-active { width: 34px; background: rgba(255, 255, 255, 0.3); } +.hero__dot i { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; border-radius: inherit; } +.hero__dot.is-active i { animation: dotfill var(--dur, 8000ms) linear forwards; } +.hero.is-paused .hero__dot.is-active i { animation-play-state: paused; } +@keyframes dotfill { to { width: 100%; } } +@media (prefers-reduced-motion: reduce) { .hero__dot.is-active i { animation: none; width: 100%; } } @media (max-width: 720px) { - .player-sources { - left: var(--space-3); - right: var(--space-3); - bottom: calc(var(--space-3) + 64px); - width: auto; - max-height: calc(100% - 88px); + .hero { height: max(560px, 82svh); } + .hero__img { object-position: 30% center; } + .hero__scrim { + background: + linear-gradient(0deg, var(--bg) 0%, rgba(9, 9, 11, 0.85) 32%, rgba(9, 9, 11, 0.2) 62%, rgba(9, 9, 11, 0.45) 100%); } + .hero__content { max-width: none; padding-bottom: 76px; gap: 12px; } + .hero__eyebrow { font-size: var(--fs-sm); } + .hero__logo { max-height: 96px; max-width: 80%; } + .hero__overview { -webkit-line-clamp: 3; font-size: var(--fs-sm); } + .hero__meta { font-size: var(--fs-sm); gap: 4px 10px; } + .hero__actions { width: 100%; gap: 10px; } + .hero__actions .btn--lg { height: 46px; padding: 0 18px; font-size: 0.95rem; } + .hero__actions .btn--lg.btn--icon { width: 46px; padding: 0; } + .hero__actions .btn--primary { flex: 1; } + .hero__dots { bottom: 40px; justify-content: center; } } + +/* ---- tabs / select / inputs ---------------------------------------------------------- */ +.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); } +.tabs::-webkit-scrollbar { display: none; } +.tab { + position: relative; flex-shrink: 0; + padding: 10px 16px 12px; color: var(--text-3); font-weight: var(--fw-bold); font-size: 0.95rem; + transition: color var(--dur-fast); +} +.tab:hover { color: var(--text); } +.tab.is-active { color: var(--text); } +.tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); } +.tabs--pills { border: 0; gap: 8px; } +.tabs--pills .tab { padding: 7px 16px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: var(--fs-sm); } +.tabs--pills .tab.is-active { background: var(--text); color: var(--bg); } +.tabs--pills .tab.is-active::after { display: none; } + +.select-wrap { position: relative; display: inline-flex; align-items: center; } +.select-wrap .icon { position: absolute; right: 12px; pointer-events: none; color: var(--text-2); } +.select { + appearance: none; -webkit-appearance: none; + height: 42px; padding: 0 40px 0 16px; min-width: 150px; + border-radius: var(--r-md); border: 1px solid var(--border-strong); + background: var(--surface-2); color: var(--text); font-weight: var(--fw-bold); font-size: var(--fs-sm); + cursor: pointer; +} +.select:hover { border-color: rgba(255, 255, 255, 0.3); } +.select:focus-visible { outline: none; box-shadow: var(--ring); } +.select option { background: var(--surface-2); } + +.input { + width: 100%; height: 44px; padding: 0 14px; + border-radius: var(--r-md); border: 1px solid var(--border-strong); + background: var(--bg-elev); color: var(--text); font-size: var(--fs-sm); font-family: var(--font-mono); + transition: border-color var(--dur-fast); +} +.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); } +.input--sm { height: 36px; font-family: var(--font); max-width: 240px; } + +.switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; } +.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; } +.switch__track { position: absolute; inset: 0; border-radius: 26px; background: var(--surface-3); transition: background var(--dur) var(--ease); } +.switch__track::after { + content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; + background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease); +} +.switch input:checked + .switch__track { background: var(--accent); } +.switch input:checked + .switch__track::after { transform: translateX(20px); } +.switch input:focus-visible + .switch__track { box-shadow: var(--ring); } + +/* ---- toasts --------------------------------------------------------------------------- */ +.toasts { + position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h)); z-index: var(--z-toast); + display: flex; flex-direction: column; align-items: center; gap: 8px; + transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); +} +.toast { + display: flex; align-items: center; gap: 14px; + padding: 12px 18px; border-radius: var(--r-md); + background: rgba(38, 38, 45, 0.96); border: 1px solid var(--border-strong); + -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); + box-shadow: var(--shadow-lg); + font-size: var(--fs-sm); font-weight: var(--fw-semi); + opacity: 0; transform: translateY(12px) scale(0.98); + transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); + pointer-events: auto; +} +.toast.is-shown { opacity: 1; transform: none; } +.toast--error { border-color: rgba(255, 95, 95, 0.5); } +.toast--error::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0; } +.toast__action { color: var(--accent); font-weight: var(--fw-bold); } + +/* ---- modal ----------------------------------------------------------------------------- */ +.modal { + position: fixed; inset: 0; z-index: var(--z-modal); + display: grid; place-items: center; padding: 24px; + background: rgba(0, 0, 0, 0.78); + -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); + opacity: 0; transition: opacity var(--dur) var(--ease); +} +.modal.is-open { opacity: 1; } +.modal__dialog { + position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto; + border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); + box-shadow: var(--shadow-lg); + transform: scale(0.96); transition: transform var(--dur) var(--ease); +} +.modal.is-open .modal__dialog { transform: none; } +.modal__dialog--wide { width: min(1100px, 100%); background: #000; overflow: hidden; } +.modal__close { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0, 0, 0, 0.6); color: #fff; } +.modal__close:hover { background: rgba(0, 0, 0, 0.85); } +.modal__media { aspect-ratio: 16 / 9; } +.modal__video { width: 100%; height: 100%; border: 0; } + +/* ---- empty states ------------------------------------------------------------------------ */ +.empty { max-width: 440px; margin: 48px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; } +.empty__icon { + display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; + background: var(--surface-2); color: var(--text-2); font-size: 1.6rem; font-weight: var(--fw-heavy); +} +.empty__title { font-size: var(--fs-lg); font-weight: var(--fw-heavy); } +.empty__text { color: var(--text-2); margin-bottom: 8px; } + +/* ---- status lines -------------------------------------------------------------------------- */ +.status { min-height: 1.2em; margin-top: 10px; font-size: var(--fs-sm); color: var(--text-3); } +.status--ok { color: var(--accent); } +.status--err { color: var(--danger); } +.hint { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); } diff --git a/web/css/pages.css b/web/css/pages.css index 1cb9d8d..5d4237c 100644 --- a/web/css/pages.css +++ b/web/css/pages.css @@ -1,782 +1,198 @@ /* - PAGES — page-specific layout: home, search, watch. - Widget styling lives in components.css; this file only positions - page-level blocks and handles responsive behavior. - */ + pages.css — page-level layout: home, title, search, list/browse, settings. +*/ +.page--padded { padding-top: calc(var(--header-h) + clamp(20px, 3vw, 40px)); } +.page--center { min-height: 70vh; display: grid; place-items: center; padding-top: var(--header-h); } +.page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 2.5vw, 32px); } +.page__title { font-size: var(--fs-2xl); font-weight: var(--fw-heavy); letter-spacing: -0.03em; } +.page__eyebrow { color: var(--accent); font-size: var(--fs-xs); font-weight: var(--fw-heavy); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; } +.section { margin-top: clamp(28px, 3.5vw, 48px); } +.section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; } +.section__title { font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.45rem); font-weight: var(--fw-heavy); letter-spacing: -0.02em; } -/* ---- home: hero carousel ------------------------------------------------------ */ - -.hero { - position: relative; - height: clamp(440px, 72vh, 640px); - margin: calc(-1 * var(--space-5)) 0 var(--space-6); - overflow: hidden; - background: var(--color-surface); +/* ---- home ---------------------------------------------------------------------------- */ +.hero-slot { min-height: clamp(560px, 88vh, 920px); } +.hero-slot > .hero--empty { height: var(--header-h); } +.rows { position: relative; z-index: 2; margin-top: clamp(-120px, -9vh, -60px); } +.rows > .row:first-child { margin-top: 0; } +@media (max-width: 720px) { + .hero-slot { min-height: max(560px, 82svh); } + .rows { margin-top: -24px; } } -.hero__slides, -.hero__slide { - position: absolute; - inset: 0; +/* ---- title page -------------------------------------------------------------------------- */ +.title-hero { + position: relative; overflow: hidden; + min-height: clamp(540px, 82vh, 860px); + display: flex; align-items: flex-end; } - -.hero__slide { - opacity: 0; - visibility: hidden; - transition: opacity 600ms ease, visibility 0s linear 600ms; -} - -.hero__slide.is-active { - z-index: 1; - opacity: 1; - visibility: visible; - transition: opacity 600ms ease; -} - -.hero__backdrop { - width: 100%; - height: 100%; - object-fit: cover; - transform: scale(1.04); - transition: transform 8s ease; -} - -.hero__slide.is-active .hero__backdrop { - transform: scale(1); -} - -.hero__scrim { - position: absolute; - inset: 0; +.title-hero .hero__media { position: absolute; inset: 0; } +.title-hero .hero__img { opacity: 1; object-position: center 25%; } +.title-hero .hero__scrim { background: - linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.22) 75%, rgba(0, 0, 0, 0.05) 100%), - linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.05) 100%); + linear-gradient(90deg, rgba(9, 9, 11, 0.92) 0%, rgba(9, 9, 11, 0.6) 32%, transparent 68%), + linear-gradient(0deg, var(--bg) 0%, rgba(9, 9, 11, 0.55) 26%, transparent 55%), + linear-gradient(180deg, rgba(9, 9, 11, 0.6) 0%, transparent 24%); +} +.title-hero__content { + position: relative; z-index: 2; + display: flex; flex-direction: column; align-items: flex-start; gap: 16px; + padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(28px, 4vw, 56px); + max-width: calc(min(760px, 64vw) + var(--gutter) * 2); + animation: rise var(--dur-slow) var(--ease) both; +} +.title-hero--loading { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); } +.title-hero__title { font-size: var(--fs-hero); font-weight: var(--fw-heavy); letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5); } +.title-hero__tagline { color: var(--text-2); font-style: italic; font-size: var(--fs-md); } +@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } } + +.story { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: clamp(24px, 4vw, 72px); } +.story__text { margin-top: 12px; color: var(--text-2); font-size: 1rem; line-height: 1.7; max-width: 80ch; } +.facts { margin: 0; display: grid; gap: 12px; align-content: start; padding: 20px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); } +.facts__row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: var(--fs-sm); } +.facts dt { color: var(--text-3); font-weight: var(--fw-semi); } +.facts dd { margin: 0; color: var(--text); font-weight: var(--fw-semi); } +.container-row { margin-top: clamp(20px, 3vw, 40px); } + +/* cast */ +.cast { + display: flex; align-items: center; gap: 12px; + padding: 8px 12px 8px 8px; border-radius: var(--r-pill); + transition: background var(--dur-fast); +} +.cast:hover, .cast:focus-visible { background: var(--surface-2); } +.cast:focus-visible { outline: none; box-shadow: var(--ring); } +.cast__avatar { + flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; + background: var(--surface-3); display: grid; place-items: center; + box-shadow: 0 0 0 2px var(--border); +} +.cast__img { width: 100%; height: 100%; object-fit: cover; } +.cast__initials { font-weight: var(--fw-heavy); color: var(--text-2); } +.cast__text { min-width: 0; } +.cast__name { font-size: var(--fs-sm); font-weight: var(--fw-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.cast__role { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + +/* episodes */ +.episodes .section__head { border-bottom: 1px solid var(--border); padding-bottom: 0; align-items: flex-end; } +.episodes .section__head .tabs { border-bottom: 0; order: -1; flex-basis: 100%; } +.episodes .section__head .section__title { padding-bottom: 12px; font-size: var(--fs-md); color: var(--text-2); } +.episodes .section__head .select-wrap { margin-bottom: 12px; } +.episodes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 28px 18px; } +.card--episode .card__media { aspect-ratio: 16 / 9; } +.ep__num { + position: absolute; left: 10px; bottom: 10px; z-index: 1; + padding: 2px 8px; border-radius: var(--r-xs); + background: rgba(0, 0, 0, 0.65); font-size: var(--fs-xs); font-weight: var(--fw-heavy); +} +.card--episode .card__progress { left: 0; right: 0; bottom: 0; border-radius: 0; height: 4px; } +.card--episode .card__shade { opacity: 0.6; } +.ep__body { padding: 12px 2px 0; } +.ep__title { font-weight: var(--fw-bold); font-size: 0.98rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.ep__meta { margin-top: 3px; font-size: var(--fs-xs); color: var(--text-3); font-weight: var(--fw-semi); } +.ep__overview { + margin-top: 6px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; + display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; +} +.card--episode.is-future { opacity: 0.55; } +.card--episode.is-watched .ep__meta { color: var(--accent); } + +@media (max-width: 900px) { + .story { grid-template-columns: 1fr; } +} +@media (max-width: 720px) { + .title-hero { min-height: auto; padding-top: 52vw; } + .title-hero .hero__media { bottom: auto; height: 78vw; } + .title-hero .hero__img { object-position: center; } + .title-hero .hero__scrim { + background: linear-gradient(0deg, var(--bg) 0%, var(--bg) calc(100% - 78vw), rgba(9, 9, 11, 0.4) calc(100% - 30vw), rgba(9, 9, 11, 0.35) 100%); + } + .title-hero__content { max-width: none; padding-top: 0; gap: 12px; } + .title-hero__title { font-size: 2.2rem; } + .title-hero .hero__logo { max-height: 90px; max-width: 75%; } + .title-hero .hero__actions { width: 100%; } + .title-hero .hero__actions .btn--primary { flex-basis: 100%; } + .title-hero .hero__actions .btn--glass:not(.btn--icon) { flex: 1; } + .title-hero .hero__actions .btn--lg { height: 46px; padding: 0 16px; font-size: 0.95rem; } + .title-hero .hero__actions .btn--lg.btn--icon { width: 46px; padding: 0; } + .facts__row { grid-template-columns: 96px 1fr; } + .card--episode .card__link { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 12px; align-items: start; } + .card--episode .ep__body { padding: 0; } + .card--episode .ep__overview { -webkit-line-clamp: 3; line-clamp: 3; font-size: var(--fs-xs); } + .card--episode.card--skeleton { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 12px; } + .episodes__grid { gap: 16px; } } -.hero__fade { - position: absolute; - left: 0; - right: 0; - bottom: 0; - height: 34%; - background: linear-gradient(to top, var(--color-bg) 2%, color-mix(in srgb, var(--color-bg) 72%, transparent) 58%, transparent 100%); - pointer-events: none; +/* ---- search ----------------------------------------------------------------------------- */ +.search-field { + display: flex; align-items: center; gap: 12px; + height: 60px; padding: 0 20px; margin-bottom: clamp(24px, 3vw, 40px); + border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-strong); + color: var(--text-3); + transition: border-color var(--dur-fast), box-shadow var(--dur-fast); } +.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--text); } +.search-field__input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 1.15rem; font-weight: var(--fw-semi); color: var(--text); } +.search-field__input::placeholder { color: var(--text-3); } +.search-field__input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); } +.page--padded > .page__title { font-size: var(--fs-lg); margin-bottom: 20px; } +@media (max-width: 720px) { .search-field { height: 52px; } .search-field__input { font-size: 1rem; } } -.hero__inner { - position: absolute; - top: 0; - bottom: 0; - left: 50%; - transform: translateX(-50%); - z-index: 2; - width: 100%; - max-width: var(--container-max); - padding: 0 var(--container-pad); - display: flex; - align-items: flex-end; -} +.load-more { height: 1px; } -.hero__content { - max-width: 620px; - padding-bottom: clamp(72px, 12vh, 112px); -} - -.hero__kicker { - display: inline-block; - margin-bottom: var(--space-3); - padding: 4px 10px; - border: 1px solid rgba(255, 255, 255, 0.14); - border-radius: var(--radius-full); - background: rgba(255, 255, 255, 0.08); - backdrop-filter: blur(8px); - color: rgba(255, 255, 255, 0.78); - font-size: var(--text-xs); - font-weight: var(--font-weight-semibold); - letter-spacing: 0.08em; - text-transform: uppercase; -} - -.hero__logo { - max-width: min(420px, 60vw); - max-height: 140px; - object-fit: contain; - margin-bottom: var(--space-4); -} - -.hero__title { - font-size: clamp(2.2rem, 5vw, 3.6rem); - line-height: 1.05; - letter-spacing: -0.03em; - text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4); -} - -.hero__meta { - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 10px; - margin-top: var(--space-4); - color: rgba(255, 255, 255, 0.78); - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); -} - -.hero__rating { - color: var(--color-star); - font-weight: var(--font-weight-semibold); -} - -.hero__dot { - color: rgba(255, 255, 255, 0.35); -} - -.hero__meta .badge { - border-color: rgba(255, 255, 255, 0.18); - background: rgba(255, 255, 255, 0.08); - color: rgba(255, 255, 255, 0.88); -} - -.hero__overview { - max-width: 58ch; - margin-top: var(--space-4); - color: rgba(255, 255, 255, 0.8); - font-size: var(--text-sm); - line-height: 1.6; - text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -.hero__actions { - display: flex; - flex-wrap: wrap; - gap: var(--space-3); - margin-top: var(--space-5); -} - -.hero__play { - padding: 10px 24px; - font-size: var(--text-md); -} - -.hero__play svg { - width: 18px; - height: 18px; -} - -.hero__arrow { - position: absolute; - z-index: 3; - top: 50%; - transform: translateY(-50%); - display: grid; - place-items: center; - width: 44px; - height: 44px; - border: none; - border-radius: var(--radius-full); - background: rgba(10, 10, 10, 0.42); - color: #fff; - backdrop-filter: blur(8px); - cursor: pointer; - opacity: 0; - transition: opacity 160ms ease, background 120ms ease; -} - -.hero:hover .hero__arrow, -.hero__arrow:focus-visible { - opacity: 1; -} - -.hero__arrow:hover { - background: rgba(10, 10, 10, 0.65); -} - -.hero__arrow svg { - width: 22px; - height: 22px; -} - -.hero__arrow--prev { - left: 20px; -} - -.hero__arrow--next { - right: 20px; -} - -.hero__dots { - position: absolute; - z-index: 3; - left: 50%; - transform: translateX(-50%); - bottom: var(--space-5); - display: flex; - gap: var(--space-2); -} - -.hero__dot { - width: 8px; - height: 8px; - padding: 0; - border: none; - border-radius: var(--radius-full); - background: rgba(255, 255, 255, 0.32); - cursor: pointer; - transition: width 160ms ease, background 160ms ease; -} - -.hero__dot.is-active { - width: 24px; - background: var(--color-accent); -} - -/* ---- search ------------------------------------------------------------------ */ - -.search-bar { - margin-bottom: var(--space-5); -} - -.search-bar__form { - display: flex; - gap: var(--space-2); -} - -.search-bar__input { - flex: 1; - font-size: var(--text-md); - padding: var(--space-3) var(--space-4); -} - -.search-toolbar { - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--space-3); - flex-wrap: wrap; - margin-bottom: var(--space-4); -} - -.search-count { - font-size: var(--text-sm); - color: var(--color-text-faint); -} - -/* ---- watch: player (.player-wrap + controls live in components.css) ------------- */ - -.player-status { - position: absolute; - inset: 0; - z-index: 2; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - gap: var(--space-3); - background: rgba(0, 0, 0, 0.75); - color: var(--color-text-dim); - font-size: var(--text-sm); - text-align: center; - padding: var(--space-5); -} - -.player-status h3 { - font-size: var(--text-md); - color: var(--color-text); -} - -.player-status .spinner { - margin-bottom: var(--space-1); -} - -/* ---- watch: toolbar (source popup lives in components.css with the player) ---------- */ - -.watch-toolbar { - display: flex; - align-items: center; - flex-wrap: wrap; - gap: var(--space-3); - margin: var(--space-4) 0 var(--space-5); - font-size: var(--text-sm); - color: var(--color-text-dim); -} - -.watch-toolbar__source { - font-weight: var(--font-weight-semibold); - color: var(--color-text); -} - -.watch-toolbar__spacer { - flex: 1; -} - -/* ---- settings ------------------------------------------------------------------ */ - -.settings { - display: grid; - grid-template-columns: 200px minmax(0, 1fr); - gap: var(--space-6); - align-items: start; -} - -.settings__nav { - position: sticky; - top: calc(var(--header-height) + var(--space-5)); - display: flex; - flex-direction: column; - gap: var(--space-1); -} - -.settings__navlink { - padding: var(--space-2) var(--space-3); - border-radius: var(--radius-full); - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); - color: var(--color-text-dim); - text-align: left; -} - -.settings__navlink:hover { - color: var(--color-text); - background: var(--color-surface); -} - -.settings__navlink.is-active { - color: var(--color-accent-text); - background: var(--color-accent); -} - -.settings__content { - display: grid; - gap: var(--space-5); - min-width: 0; -} - -.settings__card { - border: 1px solid var(--color-border); - border-radius: var(--radius-lg); - background: var(--color-surface); - padding: var(--space-5); - scroll-margin-top: calc(var(--header-height) + var(--space-4)); -} - -.settings__card h2 { - font-size: var(--text-xl); - margin-bottom: var(--space-2); -} - -.settings__hint { - color: var(--color-text-dim); - font-size: var(--text-sm); - margin-bottom: var(--space-4); - max-width: 60ch; -} - -.settings__actions { - display: flex; - flex-wrap: wrap; - gap: var(--space-2); - margin: var(--space-4) 0; -} - -.settings__status { - font-size: var(--text-sm); - min-height: 1.2em; -} - -.settings__status--ok { - color: var(--color-success); -} - -.settings__status--err { - color: var(--color-danger); -} - -.provider-list { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - gap: var(--space-2); - margin-top: var(--space-4); -} +/* ---- settings ---------------------------------------------------------------------------- */ +.settings__layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; } +.settings-nav { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; } +.settings-nav__link { text-align: left; padding: 10px 14px; border-radius: var(--r-md); color: var(--text-2); font-weight: var(--fw-bold); font-size: var(--fs-sm); } +.settings-nav__link:hover { background: var(--surface); color: var(--text); } +.settings__cards { display: flex; flex-direction: column; gap: 20px; max-width: 980px; } +.settings-card { padding: clamp(18px, 2.4vw, 28px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 20px); } +.settings-card__head { margin-bottom: 18px; } +.settings-card__title { font-size: var(--fs-lg); font-weight: var(--fw-heavy); } +.settings-card__desc { margin-top: 4px; color: var(--text-3); font-size: var(--fs-sm); } +.field-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); } +.field-row__label { font-weight: var(--fw-bold); } +.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 4px; cursor: pointer; } +.switch-row__text { display: flex; flex-direction: column; gap: 2px; font-weight: var(--fw-bold); } +.switch-row__text small { color: var(--text-3); font-weight: var(--fw-medium); font-size: var(--fs-xs); } +.input-row { display: flex; gap: 8px; } +.input-row .input { flex: 1; min-width: 0; } +.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; } +.toolbar__actions { display: flex; flex-wrap: wrap; gap: 8px; } +.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 14px; } .provider { - display: flex; - align-items: center; - gap: var(--space-2); - padding: var(--space-2) var(--space-3); - border: 1px solid var(--color-border); - border-radius: var(--radius-md); - background: var(--color-surface-2); - cursor: pointer; - transition: border-color 120ms ease; + position: relative; display: flex; align-items: center; gap: 12px; + padding: 10px 12px; border-radius: var(--r-md); + background: var(--bg-elev); border: 1px solid var(--border); + cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); } - -.provider:hover { - border-color: var(--color-border-strong); +.provider:hover { border-color: var(--border-strong); } +.provider input { position: absolute; opacity: 0; pointer-events: none; } +.provider__check { + flex-shrink: 0; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; + border: 1.5px solid var(--border-strong); color: transparent; + transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); } +.provider input:checked ~ .provider__check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } +.provider:has(input:checked) { border-color: rgba(192, 132, 252, 0.35); background: rgba(192, 132, 252, 0.06); } +.provider input:focus-visible ~ .provider__check { box-shadow: var(--ring); } +.provider__text { min-width: 0; display: flex; flex-direction: column; } +.provider__name { font-weight: var(--fw-bold); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.provider__meta { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.health { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--surface-3); } +.health--good { background: var(--accent); } +.health--fair { background: var(--warn); } +.health--bad { background: var(--danger); } -.provider input[type="checkbox"] { - flex: 0 0 auto; - width: 16px; - height: 16px; - margin: 0; - accent-color: var(--color-accent); - cursor: pointer; +@media (max-width: 900px) { + .settings__layout { grid-template-columns: 1fr; } + .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); } + .settings-nav__link { flex-shrink: 0; background: var(--surface); } } - -.provider__name { - font-size: var(--text-sm); - font-weight: var(--font-weight-medium); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -/* ---- responsive ---------------------------------------------------------------- */ - @media (max-width: 720px) { - :root { - --card-width: 132px; - } - - .hero { - height: clamp(360px, 58vh, 520px); - margin-bottom: var(--space-5); - } - - .hero__content { - padding-bottom: 64px; - } - - .hero__overview { - -webkit-line-clamp: 2; - } - - .hero__arrow { - display: none; - } - - .search-bar__form { - flex-direction: column; - } - - .settings { - grid-template-columns: 1fr; - gap: var(--space-4); - } - - .settings__nav { - position: static; - flex-direction: row; - flex-wrap: wrap; - } - - .settings__card { - padding: var(--space-4); - } -} - -.watch-page .page--watch { - padding-top: 0; -} - -.watch-page .site-header { - background: transparent; - border-bottom-color: transparent; - backdrop-filter: none; -} - -.watch-page.is-scrolled .site-header { - background: color-mix(in srgb, var(--color-bg) 85%, transparent); - border-bottom-color: var(--color-border); - backdrop-filter: blur(12px); -} - -.watch-hero { - position: relative; - isolation: isolate; - margin-top: calc(var(--header-height) * -1); - min-height: min(85svh, 900px); - display: flex; - align-items: flex-end; - overflow: hidden; - background: var(--color-surface); -} - -.watch-hero__backdrop { - position: absolute; - inset: 0; - z-index: -2; - background-size: cover; - background-position: center; - background-color: var(--color-surface); -} - -.watch-hero__scrim { - position: absolute; - inset: 0; - z-index: -1; - background: - linear-gradient( - 180deg, - color-mix(in srgb, var(--color-bg) 20%, transparent) 0%, - color-mix(in srgb, var(--color-bg) 55%, transparent) 55%, - var(--color-bg) 100% - ), - linear-gradient( - 90deg, - color-mix(in srgb, var(--color-bg) 85%, transparent) 0%, - transparent 65% - ); -} - -.watch-hero__inner { - width: 100%; - max-width: var(--container-max); - margin: 0 auto; - padding: calc(var(--header-height) + var(--space-8)) var(--container-pad) var(--space-8); -} - -.watch-hero__logo { - max-width: min(420px, 60vw); - max-height: 140px; - object-fit: contain; - margin-bottom: var(--space-4); -} - -.watch-hero__title { - margin: 0; - font-size: clamp(2.2rem, 6vw, 4.5rem); - line-height: 1.02; - letter-spacing: -0.035em; -} - -.watch-hero__meta { - display: flex; - flex-wrap: wrap; - align-items: center; - gap: var(--space-2) var(--space-3); - margin-top: var(--space-4); - color: var(--color-text-dim); - font-size: var(--text-sm); -} - -.watch-hero__rating { - color: var(--color-star); - letter-spacing: 2px; -} - -.watch-hero__dot { - color: var(--color-text-faint); -} - -.watch-hero__genres { - display: flex; - flex-wrap: wrap; - gap: var(--space-2); - margin-top: var(--space-4); -} - -.watch-hero__overview { - max-width: 72ch; - margin: var(--space-4) 0 0; - color: var(--color-text-dim); - line-height: 1.55; - display: -webkit-box; - -webkit-line-clamp: 4; - -webkit-box-orient: vertical; - overflow: hidden; -} - -.watch-hero__actions { - margin-top: var(--space-6); - display: flex; -} - -.watch-hero__actions .btn--primary { - padding: var(--space-3) var(--space-6); - font-size: var(--text-md); -} - -.watch-episodes { - padding: var(--space-8) 0; -} - -.watch-episodes__title { - margin: 0 0 var(--space-4); - font-size: var(--text-xl); -} - -.season-tabs { - display: flex; - gap: var(--space-2); - overflow-x: auto; - padding-bottom: var(--space-2); - margin-bottom: var(--space-5); -} - -.episode-shelf { - display: grid; - grid-auto-flow: column; - grid-auto-columns: minmax(220px, 1fr); - gap: var(--space-4); - overflow-x: auto; - scroll-snap-type: x mandatory; - padding: var(--space-2) var(--space-2) var(--space-3); - scroll-padding: var(--space-2); -} - -.episode-shelf__loading, -.episode-shelf__empty { - grid-column: 1 / -1; - display: grid; - place-items: center; - min-height: 180px; -} - -.episode-card { - scroll-snap-align: start; - text-align: left; - border: 1px solid var(--color-border); - background: var(--color-surface); - border-radius: var(--radius-lg); - overflow: hidden; - padding: 0; - cursor: pointer; -} - -.episode-card--current { - outline: 2px solid var(--color-accent); - outline-offset: 2px; -} - -.episode-card__thumb { - position: relative; - display: block; - aspect-ratio: 16 / 9; - width: 100%; - background: var(--color-surface-2); -} - -.episode-card__thumb img { - width: 100%; - height: 100%; - object-fit: cover; - display: block; -} - -.episode-card__thumb--empty { - display: grid; - place-items: center; - font-size: var(--text-2xl); - color: var(--color-text-faint); -} - -.episode-card__progress { - position: absolute; - left: 0; - bottom: 0; - height: 3px; - background: var(--color-accent); -} - -.episode-card__body { - display: grid; - gap: var(--space-1); - padding: var(--space-3); -} - -.episode-card__num { - color: var(--color-text-faint); - font-size: var(--text-xs); - text-transform: uppercase; - letter-spacing: 0.08em; -} - -.episode-card__title { - font-weight: 600; - color: var(--color-text-dim); -} - -.episode-card__meta { - color: var(--color-text-dim); - font-size: var(--text-xs); -} - -.player-overlay { - position: fixed; - inset: 0; - z-index: 100; - background: #000; - display: grid; - place-items: center; -} - -.player-overlay[hidden] { - display: none; -} - -body.player-open { - overflow: hidden; -} - -body.player-open .player-overlay { - display: grid; -} - -.player-overlay__close { - position: absolute; - top: var(--space-4); - right: var(--space-4); - z-index: 20; - background: color-mix(in srgb, #000 60%, transparent); - color: #fff; - border: 1px solid rgb(255 255 255 / 20%); -} - -#playerOverlay .player-wrap { - width: 100vw; - height: 100vh; - height: 100dvh; - aspect-ratio: auto; - border: none; - border-radius: 0; -} - -#playerOverlay .watch-toolbar { - position: absolute; - left: 50%; - transform: translateX(-50%); - bottom: var(--space-5); - z-index: 2; - background: color-mix(in srgb, #000 65%, transparent); - border: 1px solid rgb(255 255 255 / 10%); - padding: var(--space-2) var(--space-3); - border-radius: var(--radius-md); -} - -@media (max-width: 720px) { - .watch-hero { - min-height: 70svh; - } - - .watch-hero__inner { - padding-bottom: var(--space-6); - } - - .watch-hero__actions .btn--primary { - width: 100%; - } - - .episode-shelf { - grid-auto-columns: minmax(160px, 80vw); - } - - .player-overlay__close { - top: var(--space-2); - right: var(--space-2); - } + .input-row { flex-wrap: wrap; } + .input-row .input { flex-basis: 100%; } + .provider-grid { grid-template-columns: 1fr; } + .input--sm { max-width: none; flex: 1; } } diff --git a/web/css/player.css b/web/css/player.css new file mode 100644 index 0000000..bc80611 --- /dev/null +++ b/web/css/player.css @@ -0,0 +1,1292 @@ +/* + PLAYER — full-screen watch view (js/views/watch.js). + Uses the shell's tokens when present, with standalone fallbacks. +*/ + +html.pl-open, +html.pl-open body { + overflow: hidden; +} + +.pl { + --pl-accent: var(--accent, var(--color-accent, #c084fc)); + --pl-text: #f5f5f7; + --pl-dim: rgba(245, 245, 247, 0.66); + --pl-faint: rgba(245, 245, 247, 0.38); + --pl-glass: rgba(18, 18, 22, 0.72); + --pl-glass-strong: rgba(14, 14, 18, 0.9); + --pl-line: rgba(255, 255, 255, 0.1); + --pl-ease: cubic-bezier(0.22, 1, 0.36, 1); + --pl-font: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); + position: fixed; + inset: 0; + z-index: 1000; + background: #000; + color: var(--pl-text); + font-family: var(--pl-font); + overflow: hidden; + overflow: clip; + user-select: none; + -webkit-user-select: none; + -webkit-tap-highlight-color: transparent; + outline: none; + cursor: default; +} +.pl:not(.show-ui)[data-phase="playing"] { + cursor: none; +} + +.pl button { + font: inherit; + color: inherit; +} + +/* ---- backdrop + video ---------------------------------------------------- */ + +.pl-backdrop { + position: absolute; + inset: -40px; + background: #000 center / cover no-repeat; + filter: blur(28px) saturate(1.2) brightness(0.6); + transform: scale(1.06); + transition: opacity 0.9s var(--pl-ease), filter 0.9s var(--pl-ease); +} +.pl[data-phase="playing"] .pl-backdrop, +.pl[data-phase="paused"] .pl-backdrop, +.pl[data-phase="buffering"] .pl-backdrop { + opacity: 0; +} + +.pl-video { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + object-fit: contain; + background: transparent; + opacity: 0; + transition: opacity 0.6s var(--pl-ease); +} +.pl[data-phase="playing"] .pl-video, +.pl[data-phase="paused"] .pl-video, +.pl[data-phase="buffering"] .pl-video { + opacity: 1; +} + +.pl-video::cue { + font-family: var(--pl-font); + font-size: 4.2vh; + line-height: 1.3; + color: #fff; + background: rgba(0, 0, 0, 0.55); + text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); +} +.pl[data-subsize="s"] .pl-video::cue { font-size: 3.2vh; } +.pl[data-subsize="l"] .pl-video::cue { font-size: 5.4vh; } +.pl[data-subsize="xl"] .pl-video::cue { font-size: 7vh; } + +.pl-scrim { + position: absolute; + inset: 0; + pointer-events: none; + background: + linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 22%), + linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 18%, rgba(0, 0, 0, 0) 38%); + opacity: 0; + transition: opacity 0.35s var(--pl-ease); +} +.pl.show-ui .pl-scrim, +.pl[data-phase="paused"] .pl-scrim { + opacity: 1; +} + +/* ---- loading overlay ------------------------------------------------------- */ + +.pl-load { + position: absolute; + inset: 0; + display: grid; + place-items: center; + padding: 72px 24px 40px; + background: + radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 70%), + linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.15) 60%); + transition: opacity 0.6s var(--pl-ease), visibility 0.6s; + z-index: 2; +} +.pl[data-phase="playing"] .pl-load, +.pl[data-phase="paused"] .pl-load, +.pl[data-phase="buffering"] .pl-load { + opacity: 0; + visibility: hidden; + pointer-events: none; +} + +.pl-load__inner { + width: min(560px, 100%); + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 10px; + animation: pl-rise 0.7s var(--pl-ease) both; +} +.pl-load__logo { + max-width: min(360px, 80%); + max-height: 120px; + object-fit: contain; + filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.6)); + margin-bottom: 4px; +} +.pl-load__title { + margin: 0; + font-size: clamp(1.6rem, 4vw, 2.6rem); + font-weight: 800; + letter-spacing: -0.02em; + line-height: 1.1; + text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); +} +.pl-load__sub { + margin: 0 0 14px; + color: var(--pl-dim); + font-size: 0.98rem; +} +.pl-load__status { + margin-top: 14px; + font-weight: 600; + font-size: 1.02rem; +} +.pl-load__count { + color: var(--pl-dim); + font-size: 0.86rem; + font-variant-numeric: tabular-nums; +} +.pl-load__bar { + width: min(320px, 80%); + height: 3px; + border-radius: 3px; + background: rgba(255, 255, 255, 0.12); + overflow: hidden; +} +.pl-load__bar span { + display: block; + height: 100%; + width: 6%; + border-radius: inherit; + background: var(--pl-accent); + box-shadow: 0 0 12px var(--pl-accent); + transition: width 0.4s var(--pl-ease); +} +.pl-load__torrent { + font-size: 0.86rem; + color: var(--pl-accent); + font-variant-numeric: tabular-nums; +} +.pl-load__ticker { + list-style: none; + margin: 12px 0 0; + padding: 0; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 6px; + max-height: 96px; + overflow: hidden; + mask-image: linear-gradient(to bottom, #000 70%, transparent); + -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); +} +.pl[data-phase="error"] .pl-ring { + display: none; +} +.pl[data-phase="error"] .pl-load__status { + color: #ff8a8a; +} + +.pl-chip-btn { + margin-top: 14px; + padding: 8px 16px; + border-radius: 999px; + border: 1px solid var(--pl-line); + background: rgba(255, 255, 255, 0.08); + backdrop-filter: blur(10px); + cursor: pointer; + font-size: 0.86rem; + font-weight: 600; + transition: background 0.2s, border-color 0.2s; +} +.pl-chip-btn:hover { + background: rgba(255, 255, 255, 0.16); + border-color: rgba(255, 255, 255, 0.24); +} + +/* provider chips (ticker + panel) */ +.pl-prov { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 4px 10px 4px 8px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.07); + border: 1px solid rgba(255, 255, 255, 0.06); + font-size: 0.76rem; + color: var(--pl-dim); + animation: pl-pop 0.35s var(--pl-ease) both; +} +.pl-prov__dot { + width: 7px; + height: 7px; + border-radius: 50%; + background: var(--pl-faint); + flex: none; +} +.pl-prov__name { + color: var(--pl-text); +} +.pl-prov__count { + padding: 0 5px; + border-radius: 6px; + background: color-mix(in srgb, var(--pl-accent) 25%, transparent); + color: var(--pl-text); + font-weight: 700; +} +.pl-prov__ms { + font-variant-numeric: tabular-nums; + color: var(--pl-faint); +} +.pl-prov--pending .pl-prov__dot { + animation: pl-blink 1s ease-in-out infinite; +} +.pl-prov--ok .pl-prov__dot { + background: var(--pl-accent); + box-shadow: 0 0 8px var(--pl-accent); +} +.pl-prov--empty .pl-prov__dot { + background: #8a8a92; +} +.pl-prov--timeout .pl-prov__dot { + background: #f0b429; +} +.pl-prov--error .pl-prov__dot { + background: #ff6b6b; +} +.pl-prov--empty, +.pl-prov--timeout, +.pl-prov--error { + opacity: 0.7; +} + +/* ---- ring spinner -------------------------------------------------------------- */ + +.pl-ring { + width: 46px; + height: 46px; + border-radius: 50%; + border: 3px solid rgba(255, 255, 255, 0.12); + border-top-color: var(--pl-accent); + animation: pl-spin 0.9s linear infinite; +} + +/* ---- top bar ---------------------------------------------------------------------- */ + +.pl-top, +.pl-bottom { + position: absolute; + left: 0; + right: 0; + z-index: 4; + transition: opacity 0.35s var(--pl-ease), transform 0.35s var(--pl-ease); +} +.pl-top { + top: 0; + display: flex; + align-items: center; + gap: 12px; + padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); +} +.pl-top__text { + min-width: 0; +} +.pl-top__title { + font-size: 1.08rem; + font-weight: 700; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.pl-top__sub { + font-size: 0.86rem; + color: var(--pl-dim); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +/* while finding sources the loading card shows the title */ +.pl[data-phase="finding"] .pl-top__text, +.pl[data-phase="starting"] .pl-top__text, +.pl[data-phase="error"] .pl-top__text { + opacity: 0; +} + +.pl:not(.show-ui):not([data-phase="paused"]):not([data-phase="finding"]):not([data-phase="starting"]):not([data-phase="error"]) .pl-top { + opacity: 0; + transform: translateY(-12px); + pointer-events: none; +} +.pl:not(.show-ui):not([data-phase="paused"]) .pl-bottom, +.pl[data-phase="finding"] .pl-bottom, +.pl[data-phase="starting"] .pl-bottom, +.pl[data-phase="error"] .pl-bottom { + opacity: 0; + transform: translateY(14px); + pointer-events: none; +} + +/* ---- buttons --------------------------------------------------------------------- */ + +.pl-btn { + position: relative; + display: inline-grid; + place-items: center; + width: 42px; + height: 42px; + flex: none; + padding: 0; + border: 0; + border-radius: 50%; + background: transparent; + cursor: pointer; + transition: background 0.2s, transform 0.15s, color 0.2s, opacity 0.2s; +} +.pl-btn:hover { + background: rgba(255, 255, 255, 0.12); +} +.pl-btn:active { + transform: scale(0.92); +} +.pl-btn:focus-visible, +.pl-seek:focus-visible, +.pl-vol:focus-visible, +.pl-source:focus-visible, +.pl-ep:focus-visible, +.pl-menu__item:focus-visible { + outline: 2px solid var(--pl-accent); + outline-offset: 2px; +} +.pl-btn[hidden] { + display: none; +} +.pl-ico { + display: grid; + place-items: center; + width: 24px; + height: 24px; +} +.pl-ico svg { + width: 100%; + height: 100%; +} +.pl-btn.is-on { + color: var(--pl-accent); +} +.pl-btn.is-on::after { + content: ""; + position: absolute; + bottom: 6px; + left: 50%; + width: 14px; + height: 2px; + margin-left: -7px; + border-radius: 2px; + background: var(--pl-accent); +} +.pl-btn.is-dim { + opacity: 0.45; +} +.pl-btn.pl-back { + width: 44px; + height: 44px; + background: rgba(255, 255, 255, 0.08); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); +} +.pl-back .pl-ico { + width: 26px; + height: 26px; +} + +.pl-src-btn__count { + position: absolute; + top: 3px; + right: 1px; + min-width: 17px; + height: 17px; + padding: 0 4px; + border-radius: 9px; + background: var(--pl-accent); + color: #000; + font-size: 0.66rem; + font-weight: 800; + line-height: 17px; + text-align: center; +} +.pl-src-btn__count:empty { + display: none; +} +.pl-src-btn.is-searching .pl-src-btn__count { + animation: pl-blink 1.4s ease-in-out infinite; +} + +/* ---- center --------------------------------------------------------------------- */ + +.pl-center { + position: absolute; + inset: 0; + display: grid; + place-items: center; + pointer-events: none; + z-index: 3; +} +.pl-center > * { + grid-area: 1 / 1; +} +.pl-btn.pl-bigplay { + width: 84px; + height: 84px; + background: rgba(255, 255, 255, 0.14); + backdrop-filter: blur(16px) saturate(1.4); + -webkit-backdrop-filter: blur(16px) saturate(1.4); + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.18); + opacity: 0; + transform: scale(0.85); + transition: opacity 0.3s var(--pl-ease), transform 0.3s var(--pl-ease), background 0.2s; +} +.pl-bigplay .pl-ico { + width: 38px; + height: 38px; + margin-left: 4px; +} +.pl-bigplay:hover { + background: var(--pl-accent); + color: #000; +} +.pl[data-phase="paused"] .pl-bigplay { + opacity: 1; + transform: scale(1); + pointer-events: auto; +} +.pl-spin { + opacity: 0; + transition: opacity 0.3s; +} +.pl[data-phase="buffering"] .pl-spin { + opacity: 1; + transition-delay: 0.25s; +} +.pl-spin .pl-ring { + width: 56px; + height: 56px; +} +.pl-center-msg { + margin-top: 96px; + font-size: 0.86rem; + color: var(--pl-dim); + opacity: 0; +} +.pl[data-phase="buffering"] .pl-center-msg { + opacity: 1; +} + +/* double-tap / j-l ripples */ +.pl-ripple { + position: absolute; + top: 0; + bottom: 0; + width: 38%; + display: grid; + place-content: center; + justify-items: center; + gap: 6px; + font-size: 0.84rem; + font-weight: 700; + pointer-events: none; + opacity: 0; + z-index: 3; +} +.pl-ripple .pl-ico { + width: 40px; + height: 40px; +} +.pl-ripple--l { + left: 0; + border-radius: 0 50% 50% 0 / 0 50% 50% 0; + background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.16), transparent 70%); +} +.pl-ripple--r { + right: 0; + border-radius: 50% 0 0 50% / 50% 0 0 50%; + background: radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.16), transparent 70%); +} +.pl-ripple.is-on { + animation: pl-ripple 0.6s var(--pl-ease); +} + +/* ---- bottom controls ---------------------------------------------------------------- */ + +.pl-bottom { + bottom: 0; + padding: 0 max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); +} +.pl-row { + display: flex; + align-items: center; + gap: 2px; +} +.pl-spacer { + flex: 1; +} +.pl-time { + margin-left: 10px; + font-size: 0.88rem; + font-variant-numeric: tabular-nums; + color: var(--pl-dim); + white-space: nowrap; +} +.pl-qtag { + margin-right: 6px; + padding: 2px 7px; + border-radius: 6px; + border: 1px solid rgba(255, 255, 255, 0.28); + font-size: 0.7rem; + font-weight: 800; + letter-spacing: 0.04em; + color: var(--pl-dim); +} +.pl-qtag:empty { + display: none; +} + +/* seek bar */ +.pl-seek { + position: relative; + height: 22px; + display: flex; + align-items: center; + cursor: pointer; + touch-action: none; + margin-bottom: 4px; +} +.pl-seek__track { + position: relative; + width: 100%; + height: 4px; + border-radius: 4px; + background: rgba(255, 255, 255, 0.2); + overflow: hidden; + transition: height 0.18s var(--pl-ease); +} +.pl-seek.is-hover .pl-seek__track, +.pl-seek.is-scrub .pl-seek__track { + height: 7px; +} +.pl-seek__buf, +.pl-seek__hover, +.pl-seek__fill { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 0; +} +.pl-seek__buf { + background: rgba(255, 255, 255, 0.32); + transition: width 0.3s linear; +} +.pl-seek__hover { + background: rgba(255, 255, 255, 0.18); + opacity: 0; +} +.pl-seek.is-hover .pl-seek__hover { + opacity: 1; +} +.pl-seek__fill { + background: var(--pl-accent); + box-shadow: 0 0 10px color-mix(in srgb, var(--pl-accent) 60%, transparent); +} +.pl-seek__thumb { + position: absolute; + top: 50%; + width: 14px; + height: 14px; + margin: -7px 0 0 -7px; + border-radius: 50%; + background: var(--pl-accent); + box-shadow: 0 0 0 4px color-mix(in srgb, var(--pl-accent) 25%, transparent), 0 2px 8px rgba(0, 0, 0, 0.5); + transform: scale(0); + transition: transform 0.18s var(--pl-ease); +} +.pl-seek.is-hover .pl-seek__thumb, +.pl-seek.is-scrub .pl-seek__thumb, +.pl-seek:focus-visible .pl-seek__thumb { + transform: scale(1); +} +.pl-seek__tip { + position: absolute; + bottom: 26px; + transform: translateX(-50%); + padding: 4px 8px; + border-radius: 6px; + background: var(--pl-glass-strong); + border: 1px solid var(--pl-line); + font-size: 0.78rem; + font-weight: 700; + font-variant-numeric: tabular-nums; + white-space: nowrap; + opacity: 0; + pointer-events: none; + transition: opacity 0.15s; +} +.pl-seek.is-hover .pl-seek__tip, +.pl-seek.is-scrub .pl-seek__tip { + opacity: 1; +} + +/* volume */ +.pl-volwrap { + display: flex; + align-items: center; +} +.pl-vol { + width: 0; + height: 30px; + display: flex; + align-items: center; + overflow: hidden; + cursor: pointer; + touch-action: none; + transition: width 0.25s var(--pl-ease), margin 0.25s var(--pl-ease); +} +.pl-volwrap:hover .pl-vol, +.pl-vol:focus-visible, +.pl-vol:active { + width: 84px; + margin: 0 6px 0 2px; +} +.pl-vol__track { + position: relative; + width: 100%; + height: 4px; + border-radius: 4px; + background: rgba(255, 255, 255, 0.24); +} +.pl-vol__fill { + position: absolute; + inset: 0 auto 0 0; + border-radius: inherit; + background: #fff; +} + +/* ---- menus ------------------------------------------------------------------------ */ + +.pl-menu { + position: absolute; + bottom: 84px; + right: 20px; + z-index: 6; + min-width: 230px; + max-width: min(320px, calc(100vw - 24px)); + max-height: min(60vh, 460px); + overflow-y: auto; + padding: 8px; + border-radius: 14px; + background: var(--pl-glass); + backdrop-filter: blur(24px) saturate(1.5); + -webkit-backdrop-filter: blur(24px) saturate(1.5); + border: 1px solid var(--pl-line); + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); + opacity: 0; + transform: translateY(8px) scale(0.98); + transform-origin: bottom right; + transition: opacity 0.2s var(--pl-ease), transform 0.2s var(--pl-ease); +} +.pl-menu.is-in { + opacity: 1; + transform: none; +} +.pl-menu[hidden] { + display: none; +} +.pl-menu__head { + padding: 10px 10px 6px; + font-size: 0.7rem; + font-weight: 800; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--pl-faint); +} +.pl-menu__item { + display: flex; + align-items: center; + gap: 8px; + width: 100%; + padding: 9px 10px; + border: 0; + border-radius: 9px; + background: transparent; + text-align: left; + cursor: pointer; + font-size: 0.92rem; +} +.pl-menu__item:hover { + background: rgba(255, 255, 255, 0.09); +} +.pl-menu__check { + width: 18px; + height: 18px; + flex: none; + color: var(--pl-accent); +} +.pl-menu__check .pl-ico { + width: 18px; + height: 18px; +} +.pl-menu__label { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.pl-menu__item[aria-checked="true"] .pl-menu__label { + font-weight: 700; +} +.pl-menu__hint { + font-size: 0.76rem; + color: var(--pl-faint); +} +.pl-menu__empty { + padding: 6px 10px 10px; + font-size: 0.84rem; + color: var(--pl-faint); +} +.pl-menu__seg { + display: flex; + gap: 4px; + padding: 2px 6px 8px; +} +.pl-seg { + flex: 1; + padding: 7px 4px; + border: 1px solid var(--pl-line); + border-radius: 8px; + background: rgba(255, 255, 255, 0.04); + cursor: pointer; + font-size: 0.78rem; + font-weight: 600; +} +.pl-seg.is-on { + background: var(--pl-accent); + border-color: transparent; + color: #000; +} + +/* ---- side panels -------------------------------------------------------------------- */ + +.pl-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + z-index: 7; + width: min(420px, 100vw); + display: flex; + flex-direction: column; + background: linear-gradient(to left, var(--pl-glass-strong), var(--pl-glass)); + backdrop-filter: blur(28px) saturate(1.4); + -webkit-backdrop-filter: blur(28px) saturate(1.4); + border-left: 1px solid var(--pl-line); + box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5); + transform: translateX(105%); + visibility: hidden; + transition: transform 0.4s var(--pl-ease), visibility 0s linear 0.4s; + user-select: text; +} +.pl-panel.is-open { + transform: none; + visibility: visible; + transition: transform 0.4s var(--pl-ease), visibility 0s; +} +.pl-panel__head { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 12px; + padding: max(18px, env(safe-area-inset-top)) 16px 12px 20px; + border-bottom: 1px solid var(--pl-line); +} +.pl-panel__head h2 { + margin: 0 0 4px; + font-size: 1.2rem; + font-weight: 800; +} +.pl-panel__meta { + font-size: 0.8rem; + color: var(--pl-dim); +} +.pl-panel__list { + flex: 1; + overflow-y: auto; + padding: 10px 12px 20px; + display: flex; + flex-direction: column; + gap: 6px; + overscroll-behavior: contain; +} +.pl-panel__empty { + padding: 40px 12px; + text-align: center; + color: var(--pl-faint); +} + +.pl-source { + display: block; + width: 100%; + padding: 11px 12px; + border-radius: 12px; + border: 1px solid transparent; + background: rgba(255, 255, 255, 0.04); + text-align: left; + cursor: pointer; + transition: background 0.2s, border-color 0.2s; + animation: pl-rise 0.35s var(--pl-ease) both; +} +.pl-source:hover { + background: rgba(255, 255, 255, 0.09); +} +.pl-source.is-current { + border-color: color-mix(in srgb, var(--pl-accent) 70%, transparent); + background: color-mix(in srgb, var(--pl-accent) 12%, transparent); +} +.pl-source.is-failed { + opacity: 0.45; +} +.pl-source__top { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; +} +.pl-source__prov { + font-weight: 700; + font-size: 0.92rem; + text-transform: capitalize; +} +.pl-source__now { + font-size: 0.68rem; + font-weight: 800; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--pl-accent); +} +.pl-source__name { + margin: 2px 0 8px; + font-size: 0.78rem; + color: var(--pl-faint); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.pl-source__name:empty { + display: none; +} +.pl-source__badges { + display: flex; + flex-wrap: wrap; + gap: 4px; +} +.pl-badge { + padding: 2px 7px; + border-radius: 6px; + background: rgba(255, 255, 255, 0.08); + font-size: 0.7rem; + font-weight: 700; + color: var(--pl-dim); + white-space: nowrap; +} +.pl-badge--q { + background: rgba(255, 255, 255, 0.16); + color: var(--pl-text); +} +.pl-badge--q.is-hd { + background: color-mix(in srgb, var(--pl-accent) 30%, transparent); +} +.pl-badge--q.is-4k { + background: linear-gradient(135deg, #f5c451, #e08b2b); + color: #1b1200; +} +.pl-badge--hls { color: #8ecbff; } +.pl-badge--file { color: #9ef0c0; } +.pl-badge--remux { color: #f7c97a; } +.pl-badge--torrent { color: #d8a8ff; } +.pl-badge--direct { + color: var(--pl-accent); +} +.pl-badge--fail { + background: rgba(255, 107, 107, 0.2); + color: #ff9a9a; +} + +.pl-provs-wrap { + border-top: 1px solid var(--pl-line); + padding: 10px 16px max(14px, env(safe-area-inset-bottom)); + max-height: 34%; + overflow-y: auto; +} +.pl-provs-wrap summary { + cursor: pointer; + font-size: 0.8rem; + font-weight: 700; + color: var(--pl-dim); +} +.pl-provs { + list-style: none; + margin: 10px 0 0; + padding: 0; + display: flex; + flex-wrap: wrap; + gap: 5px; +} + +.pl-select { + margin-top: 2px; + padding: 6px 28px 6px 10px; + border-radius: 8px; + border: 1px solid var(--pl-line); + background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center / 14px no-repeat; + color: var(--pl-text); + font: inherit; + font-size: 0.86rem; + appearance: none; + cursor: pointer; +} +.pl-select option { + background: #16161a; +} + +/* episodes */ +.pl-ep { + display: flex; + gap: 12px; + width: 100%; + padding: 8px; + border: 1px solid transparent; + border-radius: 12px; + background: transparent; + text-align: left; + cursor: pointer; + transition: background 0.2s; +} +.pl-ep:hover { + background: rgba(255, 255, 255, 0.07); +} +.pl-ep.is-current { + background: color-mix(in srgb, var(--pl-accent) 12%, transparent); + border-color: color-mix(in srgb, var(--pl-accent) 55%, transparent); +} +.pl-ep__thumb { + position: relative; + flex: none; + width: 132px; + aspect-ratio: 16 / 9; + border-radius: 8px; + overflow: hidden; + background: rgba(255, 255, 255, 0.06); + display: grid; + place-items: center; + font-weight: 800; + color: var(--pl-faint); +} +.pl-ep__thumb img { + width: 100%; + height: 100%; + object-fit: cover; +} +.pl-ep__prog { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 3px; + background: rgba(0, 0, 0, 0.5); +} +.pl-ep__prog span { + display: block; + height: 100%; + background: var(--pl-accent); +} +.pl-ep__now { + position: absolute; + inset: auto 6px 8px auto; + padding: 2px 6px; + border-radius: 5px; + background: var(--pl-accent); + color: #000; + font-size: 0.62rem; + font-weight: 800; + text-transform: uppercase; +} +.pl-ep__body { + min-width: 0; +} +.pl-ep__num { + font-size: 0.72rem; + font-weight: 700; + color: var(--pl-faint); +} +.pl-ep__name { + font-weight: 700; + font-size: 0.9rem; + margin: 2px 0 4px; +} +.pl-ep__ov { + font-size: 0.76rem; + color: var(--pl-dim); + line-height: 1.4; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* ---- next episode card --------------------------------------------------------------- */ + +.pl-nextcard { + position: absolute; + right: max(24px, env(safe-area-inset-right)); + bottom: 96px; + z-index: 5; + display: flex; + gap: 14px; + width: min(420px, calc(100vw - 32px)); + padding: 12px; + border-radius: 16px; + background: var(--pl-glass); + backdrop-filter: blur(24px) saturate(1.4); + -webkit-backdrop-filter: blur(24px) saturate(1.4); + border: 1px solid var(--pl-line); + box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); + opacity: 0; + transform: translateY(16px); + transition: opacity 0.4s var(--pl-ease), transform 0.4s var(--pl-ease); +} +.pl-nextcard.is-in { + opacity: 1; + transform: none; +} +.pl-nextcard[hidden] { + display: none; +} +.pl-nextcard__img { + position: relative; + flex: none; + width: 150px; + aspect-ratio: 16 / 9; + border-radius: 10px; + background: #222 center / cover no-repeat; + overflow: hidden; +} +.pl-nextcard.is-counting .pl-nextcard__img::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + height: 3px; + width: 100%; + background: var(--pl-accent); + transform-origin: left; + animation: pl-countdown var(--countdown, 10s) linear forwards; +} +.pl-nextcard__body { + min-width: 0; + display: flex; + flex-direction: column; + justify-content: center; +} +.pl-nextcard__label { + font-size: 0.72rem; + font-weight: 800; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--pl-accent); +} +.pl-nextcard__name { + margin: 3px 0 10px; + font-weight: 700; + font-size: 0.92rem; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} +.pl-nextcard__actions { + display: flex; + gap: 8px; +} +.pl-nextcard__play, +.pl-nextcard__cancel { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 7px 14px; + border-radius: 999px; + border: 0; + cursor: pointer; + font-size: 0.84rem; + font-weight: 700; +} +.pl-nextcard__play { + background: #fff; + color: #000 !important; +} +.pl-nextcard__play .pl-ico { + width: 16px; + height: 16px; +} +.pl-nextcard__play:hover { + background: var(--pl-accent); +} +.pl-nextcard__cancel { + background: rgba(255, 255, 255, 0.1); +} +.pl-nextcard__cancel:hover { + background: rgba(255, 255, 255, 0.18); +} + +/* ---- toasts -------------------------------------------------------------------------- */ + +.pl-toasts { + position: absolute; + top: 76px; + left: 50%; + z-index: 9; + transform: translateX(-50%); + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + pointer-events: none; + width: min(520px, calc(100vw - 32px)); +} +.pl-toast { + padding: 9px 16px; + border-radius: 999px; + background: var(--pl-glass-strong); + backdrop-filter: blur(16px); + -webkit-backdrop-filter: blur(16px); + border: 1px solid var(--pl-line); + font-size: 0.86rem; + font-weight: 600; + text-align: center; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); + opacity: 0; + transform: translateY(-8px); + transition: opacity 0.3s var(--pl-ease), transform 0.3s var(--pl-ease); +} +.pl-toast.is-in { + opacity: 1; + transform: none; +} +.pl-toast--err { + border-color: rgba(255, 107, 107, 0.45); +} + +/* ---- responsive ---------------------------------------------------------------------- */ + +@media (max-width: 720px) { + .pl-btn { + width: 38px; + height: 38px; + } + .pl-ico { + width: 22px; + height: 22px; + } + .pl-time { + font-size: 0.78rem; + margin-left: 4px; + } + .pl-row .pl-btn[aria-label^="Back 10s"], + .pl-row .pl-btn[aria-label^="Forward 10s"], + .pl-row .pl-qtag, + .pl-row .pl-btn[aria-label="Picture in picture"], + .pl-vol { + display: none; + } + .pl-nextcard { + right: 16px; + bottom: 84px; + } + .pl-nextcard__img { + width: 110px; + } + .pl-ep__thumb { + width: 112px; + } + .pl-btn.pl-bigplay { + width: 72px; + height: 72px; + } +} +@media (max-width: 480px) { + .pl-bottom { + padding-left: 10px; + padding-right: 10px; + } + .pl-row { + gap: 0; + } + .pl-btn { + width: 36px; + height: 36px; + } + .pl-load__ticker { + max-height: 64px; + } +} +@media (hover: none) { + .pl-vol { + display: none; + } +} + +@media (prefers-reduced-motion: reduce) { + .pl *, + .pl *::before, + .pl *::after { + animation-duration: 0.01ms !important; + transition-duration: 0.01ms !important; + } +} + +/* ---- keyframes -------------------------------------------------------------------------- */ + +@keyframes pl-spin { + to { transform: rotate(360deg); } +} +@keyframes pl-blink { + 50% { opacity: 0.3; } +} +@keyframes pl-rise { + from { opacity: 0; transform: translateY(10px); } +} +@keyframes pl-pop { + from { opacity: 0; transform: scale(0.9); } +} +@keyframes pl-ripple { + 0% { opacity: 0; } + 25% { opacity: 1; } + 100% { opacity: 0; } +} +@keyframes pl-countdown { + from { transform: scaleX(0); } + to { transform: scaleX(1); } +} diff --git a/web/css/tokens.css b/web/css/tokens.css index 37e4bcd..6420389 100644 --- a/web/css/tokens.css +++ b/web/css/tokens.css @@ -1,68 +1,122 @@ /* - ============================================================================ - DESIGN TOKENS — the only file you need to touch to restyle the whole UI. - Every color, font size, spacing step, radius and shadow used elsewhere - references a variable defined here. Change a value and it applies everywhere. - ============================================================================ + tokens.css — design tokens. Every color, size, radius, shadow and duration used by the + UI comes from here; retheme by editing this file only. */ - :root { - /* ---- palette (retheme here) ----------------------------------------- */ - --color-bg: #0a0a0a; /* page background */ - --color-surface: #141414; /* cards, panels */ - --color-surface-hover: #1d1d1d; /* hover state for surfaces */ - --color-surface-2: #1a1a1a; /* inputs, alt surfaces */ - --color-border: #262626; /* default borders */ - --color-border-strong: #3a3a3a; /* visible borders / hover borders */ - --color-text: #f2f2f2; /* primary text */ - --color-text-dim: #9a9a9a; /* secondary text */ - --color-text-faint: #5c5c5c; /* tertiary text */ - --color-accent: #c084fc; /* brand / primary action color */ - --color-accent-hover: #d8b4fe; - --color-accent-text: #12071f; /* text on accent buttons */ - --color-danger: #ff6b6b; - --color-success: #c084fc; - --color-star: #ffc94d; /* rating stars */ + color-scheme: dark; - /* ---- typography ------------------------------------------------------ */ - --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; - --text-xs: 0.75rem; - --text-sm: 0.875rem; - --text-md: 1rem; - --text-lg: 1.125rem; - --text-xl: 1.375rem; - --text-2xl: 1.75rem; - --text-3xl: 2.25rem; - --leading-tight: 1.2; - --leading-normal: 1.55; - --font-weight-normal: 400; - --font-weight-medium: 500; - --font-weight-semibold: 600; - --font-weight-bold: 700; + /* palette */ + --bg: #09090b; + --bg-elev: #0f0f12; + --surface: #15151a; + --surface-2: #1c1c22; + --surface-3: #26262d; + --overlay: rgba(9, 9, 11, 0.82); + --glass: rgba(255, 255, 255, 0.1); + --glass-hover: rgba(255, 255, 255, 0.18); + --glass-border: rgba(255, 255, 255, 0.16); + --border: rgba(255, 255, 255, 0.08); + --border-strong: rgba(255, 255, 255, 0.16); + --text: #f4f4f6; + --text-2: #b6b6c0; + --text-3: #7c7c88; + --accent: #c084fc; + --accent-hover: #d8b4fe; + --accent-ink: #12071f; + --accent-soft: rgba(192, 132, 252, 0.16); + --accent-glow: rgba(192, 132, 252, 0.4); + --star: #f5c518; + --danger: #ff5f5f; + --warn: #f5a524; + --ok: var(--accent); + --focus: #ffffff; - /* ---- spacing (4px scale) ---------------------------------------------- */ - --space-1: 4px; - --space-2: 8px; - --space-3: 12px; - --space-4: 16px; - --space-5: 24px; - --space-6: 32px; - --space-7: 48px; - --space-8: 64px; + /* type */ + --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace; + --fs-2xs: 0.6875rem; + --fs-xs: 0.75rem; + --fs-sm: 0.875rem; + --fs-base: 1rem; + --fs-md: 1.125rem; + --fs-lg: 1.375rem; + --fs-xl: 1.75rem; + --fs-2xl: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); + --fs-hero: clamp(2.4rem, 1.4rem + 4vw, 4.75rem); + --lh-tight: 1.1; + --lh: 1.55; + --fw-medium: 500; + --fw-semi: 600; + --fw-bold: 700; + --fw-heavy: 800; - /* ---- shape ------------------------------------------------------------- */ - --radius-sm: 8px; - --radius-md: 12px; - --radius-lg: 16px; - --radius-full: 999px; - --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.45); - --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.6); + /* spacing (4px base) */ + --sp-1: 4px; + --sp-2: 8px; + --sp-3: 12px; + --sp-4: 16px; + --sp-5: 20px; + --sp-6: 24px; + --sp-7: 32px; + --sp-8: 40px; + --sp-9: 48px; + --sp-10: 64px; + --sp-11: 80px; + --max-w: 1680px; + --gutter: max(clamp(16px, 4vw, 56px), calc((100vw - var(--max-w)) / 2)); - /* ---- layout ------------------------------------------------------------ */ - --container-max: 1280px; - --container-pad: var(--space-5); - --header-height: 64px; - --poster-aspect: 2 / 3; /* 2:3 poster cards */ - --card-width: 160px; /* poster card width in carousels */ - --player-aspect: 16 / 9; + /* layout */ + --header-h: 72px; + --tabbar-h: 0px; + --row-gap: clamp(10px, 1vw, 16px); + --card-poster-w: clamp(128px, 12.5vw, 210px); + --card-wide-w: clamp(250px, 23vw, 380px); + --card-logo-w: clamp(150px, 15vw, 220px); + + /* radii */ + --r-xs: 4px; + --r-sm: 6px; + --r-md: 10px; + --r-lg: 14px; + --r-xl: 20px; + --r-pill: 999px; + + /* shadows */ + --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); + --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45); + --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6); + --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus); + + /* motion */ + --ease: cubic-bezier(0.2, 0.8, 0.2, 1); + --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); + --dur-fast: 140ms; + --dur: 240ms; + --dur-slow: 600ms; + --dur-fade: 900ms; + + /* z layers */ + --z-header: 50; + --z-tabbar: 55; + --z-modal: 100; + --z-toast: 110; +} + +@media (max-width: 720px) { + :root { + --header-h: 60px; + --tabbar-h: calc(62px + env(safe-area-inset-bottom, 0px)); + --card-poster-w: 31vw; + --card-wide-w: 74vw; + --card-logo-w: 40vw; + } +} + +@media (prefers-reduced-motion: reduce) { + :root { + --dur-fast: 0ms; + --dur: 0ms; + --dur-slow: 0ms; + --dur-fade: 0ms; + } } diff --git a/web/img/bug.svg b/web/img/bug.svg new file mode 100644 index 0000000..f8986dd --- /dev/null +++ b/web/img/bug.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/index.html b/web/index.html index 2e38628..dd13de6 100644 --- a/web/index.html +++ b/web/index.html @@ -2,52 +2,90 @@ - - bug.tv — home + + + + + + + + + bug tv + + + + + + + + + - -