:root { --bg:#0d1117; --card:#161b22; --fg:#e6edf3; --muted:#9aa4b2; --accent:#ff4d4d; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg);
  font-family:system-ui,-apple-system,sans-serif; }
main { width:100%; padding:16px; }
main > section, main > .topbar, main > h1 { margin-left:auto; margin-right:auto; max-width:560px; }
h1 { font-size:22px; }
#logo { cursor:pointer; user-select:none; display:flex; align-items:center; gap:8px; margin:0; }
.logoicon { height:22px; width:22px; flex-shrink:0; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#backBtn { width:auto; margin:0; padding:8px 14px; font-size:14px; }
.card { background:var(--card); border-radius:14px; padding:16px; margin-top:12px; }
.hidden { display:none; }
input { width:100%; padding:12px; font-size:16px; border-radius:10px; border:1px solid #333; background:#0d1117; color:var(--fg); }
textarea { width:100%; padding:12px; font-size:13px; font-family:ui-monospace,monospace; border-radius:10px; border:1px solid #333; background:#0d1117; color:var(--fg); resize:vertical; }
.muted { color:var(--muted); font-size:14px; }
.secondary { background:transparent; border:1px solid #444; }
a { color:var(--accent); }
code { font-family:ui-monospace,monospace; background:#0d1117; padding:1px 5px; border-radius:5px; font-size:13px; word-break:break-all; }
#admin { margin-top:12px; }
#admin summary { cursor:pointer; color:var(--muted); padding:6px 0; font-size:14px; }
#admin h2 { font-size:16px; margin:14px 0 6px; }
#admin[open] summary { margin-bottom:4px; }
button { width:100%; padding:12px; margin-top:10px; font-size:16px; border:0; border-radius:10px; background:var(--accent); color:#fff; cursor:pointer; }
button:hover { filter:brightness(1.1); }
button:disabled { opacity:.6; cursor:default; }
.searching { animation:pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
.bar { height:16px; background:#0d1117; border-radius:8px; overflow:hidden; margin-top:8px; }
#barFill { height:100%; width:0%; background:var(--accent); transition:width .3s; }
.result { display:flex; gap:10px; padding:10px 0; border-top:1px solid #222; cursor:pointer; align-items:center; }
.result:hover { background:#1c2128; }
.result img { width:120px; height:67px; object-fit:cover; border-radius:6px; flex-shrink:0; }
.result .meta { flex:1; min-width:0; }
.result .title { font-weight:600; }
.result .sub { color:var(--muted); font-size:13px; margin-top:2px; }
video { width:100%; border-radius:10px; background:#000; }
#player { width:80vw; max-width:none; }
#fetchStatus { color:var(--muted); margin-top:8px; min-height:1em; }