* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #12141c;
  --surface: #1c1f2b;
  --surface-hover: #262a3a;
  --text: #e8eaf2;
  --text-dim: #9aa0b4;
  --accent: #d4a437;
  --border: #2e3346;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.title-row { display: flex; align-items: baseline; gap: 0.75rem; }
h1 { font-size: 1.3rem; letter-spacing: 0.02em; }
h1::before { content: "◆ "; color: var(--accent); }
.summary { color: var(--text-dim); font-size: 0.85rem; }

.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }

input[type="search"], select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
input[type="search"] { width: 230px; }
input[type="search"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

main { flex: 1; padding: 1.5rem; }

.status { color: var(--text-dim); text-align: center; padding: 2rem 0; }
.status.error { color: #e07777; }
.status:empty { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.12s ease, background 0.12s ease;
}
.card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
}

.card img {
  width: 100%;
  aspect-ratio: 421 / 614;
  object-fit: cover;
  display: block;
  background: #0d0f15;
}

.card .info {
  padding: 0.5rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.card .name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.points {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent);
  color: #1a1405;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
}

footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
}
footer a { color: var(--accent); }

@media (max-width: 600px) {
  header { padding: 0.75rem 1rem; }
  input[type="search"] { width: 100%; }
  .controls { width: 100%; }
  main { padding: 1rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
}
