:root { --bg: #05080f; --panel: #0b1220; --panel-2: #101a2c; --line: #1c2a42; --text: #dbe7f5; --muted: #7d8da6; --accent: #3de0ff; --bad: #ff5d6c; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #0d2238 0%, transparent 60%), var(--bg);
  color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.box {
  width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center;
  padding: 32px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
}
.logo { width: 56px; margin: 0 auto; }
h1 { margin: 0; font-size: 20px; }
.muted { color: var(--muted); margin: 0; }
input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--text); font: inherit; }
button, .btn { background: var(--accent); color: #022; border: 0; border-radius: 10px; padding: 12px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.error { color: var(--bad); margin: 0; min-height: 1.4em; }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 16px; }
header h1 { font-size: 24px; }
video { width: 100%; max-height: 75vh; background: #000; border-radius: 14px; display: block; }
.episodes { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.episodes button { text-align: left; background: var(--panel); color: var(--text); border: 1px solid var(--line); font-weight: 400; }
.episodes button.active { border-color: var(--accent); color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--panel); }
.viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); display: grid; place-items: center; z-index: 10; }
.viewer img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.viewer .nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; padding: 10px 16px; }
.viewer .prev { left: 10px; } .viewer .next { right: 10px; }
.viewer .close { position: fixed; top: 12px; right: 12px; background: rgba(255, 255, 255, .12); color: #fff; padding: 8px 14px; }
.file { max-width: 420px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.top a, .link { color: var(--accent); text-decoration: none; background: none; border: 0; padding: 0; font-weight: 400; }
.shares { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.share {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: var(--text); text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
}
.share:hover { border-color: rgba(61, 224, 255, .45); }
.share .ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: rgba(61, 224, 255, .1); color: var(--accent); font-size: 18px; }
.share b { display: block; }
.share small { color: var(--muted); }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
