:root {
  --bg: #0d0f1a;
  --panel: #161a2b;
  --panel-2: #1e2338;
  --text: #eef0ff;
  --muted: #9aa1c4;
  --brand: #7c5cff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 80% -10%, #2a1d5c 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid #ffffff12;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 700; font-size: 18px; }
.logo {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #ff4fa3); font-size: 14px;
}

.view { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

.hero h1 { font-size: clamp(26px, 5vw, 40px); margin: 8px 0 4px; }
.hero p { color: var(--muted); margin: 0 0 18px; }
#search {
  width: 100%; max-width: 420px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid #ffffff1f; background: var(--panel); color: var(--text); font-size: 16px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid #ffffff24;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--panel); border: 1px solid #ffffff12; border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, border-color .15s;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: var(--accent); outline: none; }
.thumb {
  height: 140px; display: grid; place-items: center; font-size: 64px;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 45%, transparent), var(--panel-2) 70%);
  color: var(--accent); text-shadow: 0 0 24px var(--accent);
}
.card-body { padding: 14px 16px 16px; }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.best-badge { font-size: 12px; color: var(--accent); margin-left: auto; }
.card-foot { display: flex; align-items: center; gap: 6px; }
.empty { color: var(--muted); }

.playbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.playbar h2 { margin: 0; font-size: 20px; flex: 1; min-width: 120px; }
.best { color: var(--muted); font-size: 14px; }
.btn {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; font-size: 14px;
}
.btn.ghost { background: transparent; border-color: #ffffff2a; }
.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: calc(100vh - 190px);
  background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid #ffffff14;
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.controls { color: var(--muted); font-size: 14px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }

@media (max-width: 600px) {
  .stage { aspect-ratio: 3 / 4; }
}
