:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #111111;
  --panel-2: #181818;
  --line: rgba(255,255,255,.09);
  --text: #f5f5f5;
  --muted: #999;
  --accent: #e50914;
  --accent-2: #ff3340;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% -10%, rgba(229,9,20,.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: rgba(7,7,7,.82);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  font-weight: 800;
  letter-spacing: .11em;
  font-size: 17px;
}
.brand span { color: var(--accent); }

.status {
  color: #8ee59b;
  font-size: 12px;
  font-weight: 600;
}
.status.offline { color: #ff8585; }

.shell {
  width: min(1400px, 92vw);
  margin: 0 auto;
  padding: 64px 0 90px;
}

.hero {
  min-height: 260px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .95;
  letter-spacing: -.055em;
}

.hero-copy {
  color: var(--muted);
  margin: 20px 0 0;
  font-size: 15px;
}

.primary-button {
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  padding: 13px 18px;
  white-space: nowrap;
  transition: transform .15s, background .15s;
}
.primary-button:hover { background: var(--accent-2); transform: translateY(-1px); }
.primary-button.wide { width: 100%; margin-top: 8px; padding: 15px; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.filters { display: flex; gap: 6px; }
.filter {
  border: 0;
  background: transparent;
  color: #888;
  padding: 13px 14px;
  border-bottom: 2px solid transparent;
  font-weight: 700;
}
.filter.active { color: white; border-bottom-color: var(--accent); }

.count { color: #777; font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
}

.poster {
  aspect-ratio: 2 / 3;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.14), transparent 20%),
    linear-gradient(145deg, #242424, #090909 70%);
}
.poster-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(229,9,20,.35), transparent 55%);
  filter: blur(15px);
}
.poster-letter {
  position: relative;
  font-size: 72px;
  font-weight: 800;
  color: rgba(255,255,255,.12);
  text-transform: uppercase;
}
.poster-type {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(0,0,0,.65);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.card-body { padding: 14px; }
.card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #8f8f8f;
  font-size: 11px;
}
.dot { color: #555; }
.added-by { margin-left: auto; }

.delete-button {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666;
  font-size: 11px;
}
.delete-button:hover { color: #ff6666; }

.empty {
  min-height: 300px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
.empty h2 { color: white; margin-bottom: 6px; }

dialog {
  width: min(520px, 92vw);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0,0,0,.7);
}
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }

.modal { padding: 30px; position: relative; }
.modal h2 { margin: 0 0 26px; font-size: 28px; letter-spacing: -.03em; }

.icon-button {
  position: absolute;
  top: 17px;
  right: 17px;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 28px;
}
.icon-button:hover { color: white; }

label {
  display: block;
  margin: 0 0 17px;
  color: #aaa;
  font-size: 12px;
  font-weight: 700;
}
input, select {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #292929;
  border-radius: 6px;
  background: #181818;
  color: white;
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus { border-color: #666; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.error { color: #ff7777; font-size: 12px; }

.hidden { display: none !important; }

@media (max-width: 650px) {
  .shell { padding-top: 38px; }
  .hero { min-height: auto; align-items: start; flex-direction: column; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 11px; }
  .added-by { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
}
