:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #10131a;
  color: #eef1f7;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input { font: inherit; }

button { cursor: pointer; }

button:disabled { cursor: wait; opacity: .6; }

.page-shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 80px; }

header { margin-bottom: 28px; }

.eyebrow { color: #8ca2c7; font-size: .76rem; font-weight: 700; letter-spacing: .14em; margin: 0 0 9px; }

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.045em; line-height: 1; margin: 0; }

.intro { color: #aeb9cd; margin: 14px 0 0; }

.search-panel { background: #1a202b; border: 1px solid #2d374a; border-radius: 14px; padding: 16px; box-shadow: 0 18px 50px #0003; }

form { display: flex; gap: 10px; }

input { background: #10151e; border: 1px solid #46536a; border-radius: 9px; color: inherit; flex: 1; min-width: 0; outline: none; padding: 12px 14px; }

input:focus { border-color: #72a7ff; box-shadow: 0 0 0 3px #72a7ff33; }

button { background: #4d84dc; border: 1px solid #73a6f7; border-radius: 9px; color: white; font-weight: 700; padding: 10px 16px; }

button:hover:not(:disabled) { background: #6297ed; }

.status { color: #aeb9cd; font-size: .9rem; min-height: 1.2em; margin: 12px 0 0; }

.status.error { color: #ffb4ae; }

.results { display: grid; gap: 14px; margin-top: 24px; }

.result-card { background: #171c26; border: 1px solid #2d374a; border-radius: 12px; display: grid; gap: 14px; grid-template-columns: 200px 1fr; overflow: hidden; padding: 12px; }

.thumbnail { align-self: center; aspect-ratio: 16 / 9; background: #0d1016; border-radius: 7px; object-fit: cover; width: 100%; }

.result-body { min-width: 0; padding: 2px 2px 2px 0; }

.title { font-size: 1.05rem; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }

.metadata { color: #aeb9cd; font-size: .9rem; margin: 8px 0 18px; }

.actions { display: flex; flex-wrap: wrap; gap: 9px; }

.download-button { background: #263348; border-color: #465b7c; font-size: .9rem; min-width: 86px; }

.download-button[data-state="complete"] { background: #21734c; border-color: #4fa879; }

.download-button[data-state="error"] { background: #802c36; border-color: #cc6470; }

.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 600px) {
  .page-shell { padding-top: 36px; width: min(100% - 24px, 1080px); }
  form { flex-direction: column; }
  .result-card { grid-template-columns: 1fr; }
  .thumbnail { max-width: 100%; }
}
