:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08100f;
  color: #f4f8f6;
  --panel: #101c1a;
  --line: #28413b;
  --accent: #62e6a7;
  --accent-dark: #123c2c;
  --muted: #a8bdb6;
  --danger: #ff9a9a;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #173b31 0, #08100f 38rem); }
button, input, select { font: inherit; }
button, input, select { min-height: 46px; border-radius: 10px; }
input, select { width: 100%; padding: .7rem .8rem; color: #fff; background: #07110f; border: 1px solid var(--line); }
input:focus, select:focus, button:focus { outline: 3px solid #fff; outline-offset: 2px; }
button { cursor: pointer; padding: .7rem 1rem; border: 0; color: #062016; background: var(--accent); font-weight: 800; }
button:hover { filter: brightness(1.08); }
button.secondary { color: #fff; border: 1px solid var(--line); background: transparent; }
label { display: block; margin-top: .85rem; margin-bottom: .35rem; color: var(--muted); font-weight: 700; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(2rem, 6vw, 4rem); max-width: 13ch; line-height: 1; }

.skip-link { position: absolute; left: -9999px; top: 1rem; z-index: 20; background: #fff; color: #000; padding: .7rem; }
.skip-link:focus { left: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); }
main { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1.5rem, 4vw, 4rem) 0; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 900; letter-spacing: .14em; }
.panel { padding: 1.25rem; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 16px 50px rgba(0,0,0,.18); }
.login-panel { max-width: 620px; margin: 5vh auto; padding: clamp(1.4rem, 4vw, 3rem); }
.login-panel button, .form-grid button { width: 100%; margin-top: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.card-grid, .video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.library-section { margin-top: 3rem; }
.muted, .empty-state { color: var(--muted); }
.match-row { padding: .65rem; margin: .6rem 0 0; border-radius: 8px; background: #0a1513; }
.status { position: sticky; top: .5rem; z-index: 10; margin: 0 auto 1rem; padding: .9rem 1rem; border-radius: 10px; font-weight: 800; }
.status.success { color: #d9ffed; border: 1px solid #2a7b57; background: #123c2c; }
.status.error { color: #ffe4e4; border: 1px solid #8d3f3f; background: #421f1f; }
.match-video { width: 100%; margin-top: 1rem; border-radius: 10px; background: #000; }
progress { width: 100%; margin-top: 1rem; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; }
  h2 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

