:root {
  --bg: #05060c;
  --panel: #0e111c;
  --panel-2: #151a29;
  --line: #232a3d;
  --text: #eef0f8;
  --muted: #9aa0b8;
  --ink: #160b2e;
  --blue: #4f7dff;
  --purple: #a85cff;
  --pink: #ff5c9d;
  --lime: #d9ff6e;
  --brand: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
  --radius: 14px;
  --font: system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; }
a { color: #c9b8ff; }
[hidden] { display: none !important; }
button { font: inherit; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
          padding: 12px 24px; background: rgba(5, 6, 12, .8); backdrop-filter: blur(10px);
          border-bottom: 1px solid rgba(255, 255, 255, .05); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.logo img { width: 34px; height: 34px; border-radius: 8px; }
.topbar nav { display: flex; gap: 22px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.topbar nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 900px); display: flex; align-items: center; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 40%; }
.hero-text { position: relative; z-index: 1; max-width: 820px; padding: 0 clamp(20px, 6vw, 96px); }
.hero h1 { margin: 0; font-size: clamp(60px, 10vw, 140px); line-height: .95; letter-spacing: -3px; font-weight: 800;
           background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { margin: 14px 0 0; font-size: clamp(18px, 2.2vw, 26px); font-style: italic; color: #b9b9d0; }
.tagline { max-width: 24em; }
.lede { margin: 18px 0 0; font-size: clamp(17px, 1.8vw, 21px); color: var(--muted); max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line);
       background: var(--panel-2); color: var(--text); font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #3a4462; }
.btn.primary { border: 0; background: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }

/* ---------- Sections ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 72px clamp(16px, 4vw, 32px) 24px; }
.section-title { margin: 0 0 20px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -1px; }
.muted { color: var(--muted); }
.narrow { max-width: 42em; }

/* ---------- Player ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden;
          box-shadow: 0 30px 80px rgba(80, 40, 180, .25); }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player:fullscreen { border-radius: 0; }

.dog { position: absolute; left: 3.5%; top: 5%; display: flex; align-items: center; opacity: .32; pointer-events: none;
       filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35)); }
.dog img { width: clamp(28px, 4vw, 60px); height: auto; position: relative; z-index: 1; }
.dog-word { overflow: hidden; margin-left: -4px; padding-left: 12px; }
.dog-word span { display: block; font-size: clamp(16px, 2.3vw, 36px); font-weight: 800; letter-spacing: -1px; color: #fff;
                 transform: translateX(-110%); opacity: 0; transition: transform .9s cubic-bezier(.6, 0, .3, 1), opacity .9s; }
.dog.expanded .dog-word span { transform: none; opacity: 1; }
.player.ident .dog { display: none; }

.start { position: absolute; inset: 0; margin: auto; width: 110px; height: 110px; border-radius: 50%; border: 0; cursor: pointer;
         background: var(--brand); color: #fff; font-size: 40px; box-shadow: 0 10px 40px rgba(168, 92, 255, .5); }
.start span { margin-left: 6px; }
.spinner { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: none;
           border: 5px solid rgba(255, 255, 255, .15); border-top-color: var(--purple); border-radius: 50%; animation: spin 1s linear infinite; }
/* Only shown if loading takes more than a second */
.player.loading .spinner { display: block; opacity: 0; animation: spin 1s linear infinite, appear .3s 1s forwards; }
@keyframes appear { to { opacity: 1; } }
.player.switching .spinner { display: none; }

.controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px;
            background: linear-gradient(transparent, rgba(0, 0, 0, .8)); opacity: 0; transition: opacity .3s; }
.player:hover .controls, .player.paused .controls, .player:focus-within .controls { opacity: 1; }
.player.idle .controls { display: none; }
.controls button { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.controls button:hover { background: rgba(255, 255, 255, .12); }
.progress { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); cursor: pointer; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--brand); }
.time { font-size: 14px; color: #ddd; font-variant-numeric: tabular-nums; min-width: 88px; text-align: right; }

.now { margin-top: 18px; padding: 18px 22px; border-radius: var(--radius); background: var(--panel); border-left: 4px solid var(--purple); }
.now-label { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.now h2 { margin: 4px 0 0; font-size: clamp(22px, 3vw, 30px); }
.credits { margin: 6px 0 0; color: var(--muted); }
.credits b { color: var(--text); font-weight: 600; }

/* ---------- Library ---------- */
.channel { margin-bottom: 40px; }
.channel h3 { margin: 0; font-size: 24px; }
.channel .desc { margin: 2px 0 16px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
        overflow: hidden; color: var(--text); cursor: pointer; padding: 0; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--purple); }
.card .thumb { aspect-ratio: 16 / 9; background: var(--panel-2) center / cover no-repeat; }
.card .body { padding: 12px 14px 16px; }
.card .title { font-weight: 700; }
.card .by { margin-top: 2px; font-size: 14px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); color: #c9b8ff; border: 1px solid var(--line); }

/* ---------- Submit form ---------- */
.form { display: grid; gap: 16px; max-width: 760px; margin-top: 24px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input:not([type=checkbox]), .form textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
       background: var(--panel); color: var(--text); font: inherit; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: transparent; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; display: grid; gap: 14px; }
.form legend { padding: 0 6px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
               background: var(--panel); font-weight: 500; cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--purple); background: #231a3d; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form .check input { margin-top: 4px; }
.req { color: var(--pink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--lime); }
.form-status.err { color: var(--pink); }

.about { max-width: 46em; font-size: 18px; color: #cfd2e2; }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 1200px; margin: 60px auto 0;
          padding: 28px clamp(16px, 4vw, 32px) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; }
  .topbar nav { gap: 14px; font-size: 14px; }
  .logo span { display: none; }
  .hero { min-height: 80vh; align-items: flex-end; padding-bottom: 48px; }
  .hero canvas { opacity: .75; }
  .form .row { grid-template-columns: 1fr; }
  .controls { opacity: 1; }
  .time { min-width: 0; }
}
