:root { color-scheme: dark; --bg: #101114; --panel: #1b1d22; --line: #2c2f36; --text: #e8e9ec; --muted: #9a9ea8; --accent: #7aa2ff; --err: #ff7a7a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.link { background: none; border: none; color: var(--accent); }
.muted { color: var(--muted); }
.error { color: var(--err); }
header { display: flex; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
header #home { font-weight: 600; font-size: 17px; }
#searchform { flex: 1; }
#search { width: 100%; max-width: 420px; }
main { padding: 16px; }
.card { max-width: 380px; margin: 8vh auto; display: grid; gap: 12px; background: var(--panel); padding: 24px; border-radius: 10px; }
.card label { display: grid; gap: 4px; }
.card h1 { margin: 0 0 4px; font-size: 20px; }
.row h3 { margin: 18px 0 8px; font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.tile { background: none; border: none; padding: 0; text-align: left; display: grid; gap: 6px; }
.tile .poster { aspect-ratio: 2 / 3; width: 100%; border-radius: 6px; background: var(--panel) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); overflow: hidden; position: relative; }
.tile.wide .poster { aspect-ratio: 16 / 9; }
.tile .poster img { width: 100%; height: 100%; object-fit: cover; }
.tile .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); }
.tile .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: 12px; color: var(--muted); }
#crumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.detail { display: grid; grid-template-columns: minmax(120px, 240px) 1fr; gap: 20px; max-width: 980px; }
.detail img { width: 100%; border-radius: 8px; background: var(--panel); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
#player { position: fixed; inset: 0; background: #000; z-index: 5; display: flex; flex-direction: column; }
#stage { flex: 1; position: relative; min-height: 0; }
#stage canvas, #stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#controls { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: #000c; flex-wrap: wrap; }
#pseek { flex: 1; min-width: 120px; padding: 0; }
#pstatus { margin: 0; padding: 0 12px 8px; background: #000c; }
@media (max-width: 600px) { .detail { grid-template-columns: 1fr; } .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } }
#known { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
#known:empty { display: none; }
.server { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.server .url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
