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

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --border: #2a2a3a;
  --accent: #7c6af7;
  --text: #e8e8f0;
  --muted: #888899;
}

body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header h1 { font-size: 1.4rem; }
nav a {
  color: var(--muted); text-decoration: none;
  margin-left: 1.5rem; font-size: 0.95rem;
}
nav a:hover { color: var(--text); }

#app { padding: 2rem; max-width: 1200px; margin: 0 auto; }

.stats {
  display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.5rem; flex: 1; min-width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.stat span { font-size: 1.8rem; font-weight: 700; color: var(--accent); }

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  transition: transform 0.2s; cursor: pointer;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.no-cover {
  width: 100%; aspect-ratio: 2/3;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: var(--border);
}
.card-body { padding: 0.75rem; }
.card-body small { color: var(--muted); font-size: 0.75rem; }
.card-body h3 { font-size: 0.85rem; margin: 0.3rem 0; }
.badges { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0.4rem 0; }
.badge {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 20px;
  background: var(--border); color: var(--muted);
}
.badge.owned { background: #1a3a2a; color: #4caf80; }
.badge.wishlist { background: #2a2a1a; color: #f0c060; }
.badge.signed { background: #2a1a3a; color: #b080f0; }
.price { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

.loading, .error { text-align: center; padding: 3rem; color: var(--muted); }
.error { color: #f06060; }
