:root {
  --bg: #0d1117;
  --panel: #151b23;
  --panel2: #202938;
  --text: #eef2f7;
  --muted: #a9b4c2;
  --accent: #3478f6;
  --line: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #161c25 0%, #0d1117 100%);
}

h1 { margin: 0 0 10px; font-size: 36px; }

.hero p {
  color: var(--muted);
  max-width: 820px;
  margin: 0 0 22px;
}

.search {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search input {
  flex: 1 1 320px;
  min-width: 260px;
  padding: 15px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 16px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.secondary {
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--line);
}

.filters {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.filterBtn.active {
  background: var(--accent);
}

.main {
  padding: 22px 20px 40px;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

#statusText { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card, .detailCard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: #0a0d12;
}

.body {
  padding: 14px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.title {
  margin: 0 0 8px;
  font-size: 18px;
}

.meta, .overview {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.meta {
  margin-bottom: 10px;
  font-size: 14px;
}

.openBtn {
  margin-top: 12px;
  width: 100%;
}

.pagination {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

.hidden {
  display: none;
}

.detailCard {
  display: grid;
  grid-template-columns: 320px 1fr;
  margin-bottom: 24px;
}

.detailBody {
  padding: 18px;
}

.detailBody h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}

.empty {
  color: var(--muted);
  padding: 30px 0;
}

@media (max-width: 860px) {
  .detailCard { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1 { font-size: 29px; }
  .search { flex-direction: column; }
}