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

:root {
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text: #f0f0f0;
  --muted: #888;
  --accent-marvel: #e62429;
  --accent-dc: #0476d9;
  --accent-mm: #ffd700;
  --accent-scooby: #8b5cf6;
  --accent-default: #f0f0f0;
  --collected: #22c55e;
  --uncollected: #3f3f46;
  --radius: 12px;
  --font-display: "Bebas Neue", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- HEADER ---- */

header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    #e62429 0%,
    #0476d9 40%,
    #ffd700 70%,
    #8b5cf6 100%
  );
  opacity: 0.5;
}

header {
  padding: 3rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 80% at 80% 50%,
      rgba(230, 36, 41, 0.08) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 40% 60% at 20% 30%,
      rgba(4, 118, 217, 0.06) 0%,
      transparent 70%
    );
  pointer-events: none;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.header-text {
  flex: 1;
}

.header-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 0;
}

h1 span {
  display: block;
  font-size: 0.55em;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.header-tagline {
  margin-top: 0.75rem;
  font-size: 12px;
  color: #555;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ---- HEADER LOGO ---- */
.header-logo {
  width: clamp(120px, 20%, 220px);
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* ---- STATS BAR ---- */
.stats-bar {
  display: flex;
  margin: auto;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  justify-content: center;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  justify-content: center;
}

.stat-collected-wrap .stat-value {
  color: var(--collected);
}

/* ---- PROGRESS BAR ---- */
.global-progress {
  margin-top: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.progress-track {
  height: 4px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.progress-fill {
  height: 100%;
  background: var(--collected);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- MAIN LAYOUT ---- */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ---- SIDEBAR ---- */
.sidebar {
  position: sticky;
  top: 2rem;
}

.sidebar-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-btn {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition:
    background 0.15s,
    color 0.15s;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.category-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.category-btn.active {
  background: var(--surface-2);
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: calc(0.75rem - 3px);
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.cat-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 99px;
}

/* ---- FILTER ROW ---- */
.content-area {
  min-width: 0;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.category-label {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ---- FIGURE GRID (outer wrapper) ---- */
.figure-grid {
  display: block;
}

/* ---- INNER GRID (the actual card grid) ---- */
.figure-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

/* ---- FIGURE CARD ---- */
.figure-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s;
  position: relative;
  animation: fadeUp 0.3s ease both;
}

.figure-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.figure-card.collected {
  border-color: rgba(34, 197, 94, 0.25);
}

.card-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.figure-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--border-hover);
}

.collected-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--collected);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.figure-card.collected .collected-badge {
  opacity: 1;
}

.collected-badge svg {
  width: 12px;
  height: 12px;
  fill: #fff;
}

.year-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 10px 12px 12px;
}

.card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.card-status {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-status.owned {
  color: var(--collected);
}
.card-status.wanted {
  color: var(--muted);
}

/* ---- SECTION GROUPS ---- */
.section-group {
  margin-bottom: 3rem;
}

.section-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.section-group-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-group-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-group-count {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ---- EMPTY STATE ---- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  .main {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .footer-main {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-links {
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .footer-disclaimer {
    text-align: left;
  }
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding: 2.5rem 2rem 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1;
  min-width: 180px;
}

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.footer-brand-sub {
  font-size: 10px;
  color: #3a3a3a;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-brand-desc {
  font-size: 12px;
  color: #4a4a4a;
  line-height: 1.6;
  max-width: 230px;
}

.footer-series-dots {
  display: flex;
  gap: 6px;
  margin-top: 1rem;
}

.footer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 90px;
}

.footer-link-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3a3a3a;
  margin-bottom: 0.2rem;
}

.footer-link {
  font-size: 13px;
  color: #4a4a4a;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
  display: inline-block;
}

.footer-link:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 11px;
  color: #333;
}

.footer-copyright a {
  color: #4a4a4a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-copyright a:hover {
  color: var(--muted);
}

.footer-disclaimer {
  font-size: 11px;
  color: #2e2e2e;
  text-align: right;
  max-width: 340px;
  line-height: 1.5;
}

.footer-accent-strip {
  height: 3px;
  background: linear-gradient(
    90deg,
    #e62429 0%,
    #0476d9 40%,
    #ffd700 70%,
    #8b5cf6 100%
  );
  opacity: 0.4;
}
