:root {
  --bg: #0d0e12;
  --panel: #171920;
  --panel-2: #20232d;
  --text: #f4f4f6;
  --muted: #a9acb7;
  --accent: #efb24c;
  --radius: 18px;
  --max-width: 1280px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(239,178,76,.12), transparent 35%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-header,
main,
footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  padding: 24px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  color: #17120a;
  font-weight: 900;
  letter-spacing: -.05em;
}

h1, h2, h3, p { margin-top: 0; }

.brand h1 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.brand p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .9rem;
}

.hero {
  padding: 76px 0 46px;
  max-width: 820px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
}

.hero h2 {
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 7vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.hero > p:last-child {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.08rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-bottom: 24px;
}

input, select {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #333743;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.clip-card {
  overflow: hidden;
  border: 1px solid #292c35;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 50px rgba(0,0,0,.18);
  transition: transform .2s ease, border-color .2s ease;
}

.clip-card:hover {
  transform: translateY(-4px);
  border-color: #4b4f5c;
}

.clip-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel-2);
  overflow: hidden;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-badge {
  position: absolute;
  inset: auto auto 14px 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: .85rem;
}

.card-copy {
  padding: 18px;
}

.card-copy h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.meta, .card-copy p {
  color: var(--muted);
}

.meta {
  display: flex;
  gap: 10px;
  font-size: .82rem;
  margin-bottom: 10px;
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

dialog {
  width: min(1000px, calc(100% - 24px));
  padding: 0;
  border: 1px solid #353945;
  border-radius: 20px;
  background: #0b0c10;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0,0,0,.65);
}

dialog::backdrop {
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(5px);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-info {
  padding: 20px 24px 24px;
}

.close-button {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
}

footer {
  padding: 56px 0 30px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .clips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .toolbar { grid-template-columns: 1fr; }
  .clips-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 54px; }
}
