:root {
  --bg: #0f1117;
  --card: #1b1e29;
  --text: #f1f1f4;
  --muted: #9a9fb0;
  --accent: #e50914;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 5vw;
  background: #151822;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 1.5rem; }

#search {
  flex: 1;
  min-width: 220px;
  max-width: 480px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}
#search:focus { border-color: var(--accent); }

.tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 5vw 0; }
.tab {
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: .2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #fff; }

main { padding: 24px 5vw 60px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(0, 0, 0, .5); }

.thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  color: #fff;
  background: rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover .play { opacity: 1; }

.info { padding: 12px 14px 16px; }
.info h3 { font-size: 1rem; margin-bottom: 6px; }
.meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
}

.empty { text-align: center; color: var(--muted); margin-top: 40px; }