@font-face {
  font-family: "Sic Icons";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/material-symbols.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101113;
  color: #eeedf3;
  --muted: #9d9ba7;
  --accent: #c7b6fa;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 45%, #27233377, transparent 60%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header { padding: 28px 6vw; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 30px; letter-spacing: -1px; color: #fff; font-weight: 750; }
.brand:hover { text-decoration: none; }
.robot { font-size: 34px; letter-spacing: 0; font-weight: 400; }
.landing-page { background: none; }
.landing { width: min(560px, calc(100% - 40px)); margin: auto; padding: 60px 0; text-align: center; isolation: isolate; }
.site-header { position: absolute; top: 0; left: 0; width: 100%; }
.site-header h1 { margin: 0; line-height: 1.3; }
.api-link { color: var(--muted); font-size: 14px; }
.api-link:hover { color: var(--accent); }
.input-row { position: relative; width: 100%; border: 1px solid #424049; border-radius: 16px; background: #1d1d23; box-shadow: 0 0 70px #0004; }
.input-row::before { content: ""; position: absolute; top: 50%; left: 50%; width: min(1100px, 100vw); height: min(720px, 100svh); transform: translate(-50%, -50%); z-index: -1; pointer-events: none; background: radial-gradient(ellipse at center, #27233377, transparent 70%); }
.input-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #c7b6fa15; }
input { display: block; width: 100%; height: 64px; padding: 0 64px 0 20px; font: inherit; font-size: 16px; color: #fff; background: none; border: 0; border-radius: inherit; outline: none; text-overflow: ellipsis; }
input::placeholder { color: #9d9ba7; }
input[readonly] { cursor: text; }
.spinner { position: absolute; right: 24px; top: 22px; width: 20px; height: 20px; border: 2px solid #c7b6fa33; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-button { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--accent); cursor: pointer; }
.icon-button:hover { background: #c7b6fa18; }
.icon { font-family: "Sic Icons"; font-weight: 400; font-style: normal; font-size: 22px; line-height: 1; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.error { min-height: 22px; margin: 12px 4px 0; color: #ff929b; font-size: 14px; line-height: 22px; text-align: left; }
video { display: block; width: 100%; max-height: 65svh; background: #070708; border-radius: 14px; }
.watch { width: min(900px, 92%); margin: auto; padding: 32px 0 60px; }
.caption { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.7; margin: 25px 0; }
.video-meta { display: flex; gap: 20px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; flex-wrap: wrap; margin-top: 25px; }
.embed { background: #000; min-height: 100vh; }
.embed .watch { width: 100%; padding: 0; margin: auto; }
.embed video { max-height: 100vh; border-radius: 0; }
.catalog-page { background: #101113; }
.catalog { width: min(1120px, 88%); margin: 20px auto 64px; }
.catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.catalog-heading h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.catalog-heading span, .catalog-empty { color: var(--muted); font-size: 14px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 22px; }
.video-card { min-width: 0; overflow: hidden; border: 1px solid #34323b; border-radius: 16px; background: #1b1b21; display: flex; flex-direction: column; }
.thumbnail-link { display: block; background: #09090b; }
.thumbnail { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; display: block; }
.video-card-content { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.video-card-stats { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.video-card h2 { margin: 12px 0 0; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.video-card h2 a { color: #eeedf3; }
.video-card h2, .video-card-caption { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.video-card-caption { margin: 10px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.short-link { margin-top: auto; padding-top: 18px; font-size: 12px; overflow-wrap: anywhere; }
.video-card-actions { display: flex; gap: 22px; margin-top: 18px; font-size: 14px; }
.video-card-expiry { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 18px 0 0; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-top: 32px; font-size: 14px; }
.pagination > :last-child { text-align: right; }
.pagination span { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
@media (max-width: 600px) {
  header { padding: 22px 6vw; }
  header .brand { font-size: 24px; }
  header .robot { font-size: 28px; }
  .watch { padding: 15px 0 35px; }
}
