:root {
  --bg-dark: #080a13;
  --bg-deep: #06070d;
  --bg-card: rgba(17, 21, 37, 0.7);
  --bg-card-soft: rgba(17, 21, 37, 0.4);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-glow: rgba(139, 92, 246, 0.2);
  --border-glow-hover: rgba(6, 182, 212, 0.5);
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.45);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-dark);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  font-family: var(--font-body);
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.5rem 0;
  background: rgba(8, 10, 19, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.logo span {
  color: transparent;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
}

.logo b {
  padding: 0.15rem 0.5rem;
  color: var(--accent-cyan);
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--border-glow);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nav-links a,
.ghost-button {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.nav-links a:hover,
.ghost-button:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.hero {
  padding: 5rem 0 3.5rem;
}

.hero-inner {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-cyan);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.1;
}

h1 {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: transparent;
  background: linear-gradient(135deg, #ffffff 20%, var(--text-muted) 80%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 680px;
  margin: 1.5rem auto 0;
  color: var(--text-muted);
  font-size: 1.18rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 860px;
  margin: 2.25rem auto 0;
}

.stat {
  padding: 1rem;
  background: rgba(17, 21, 37, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

.stat strong {
  display: block;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.stat span {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar-band {
  border-block: 1px solid var(--border-subtle);
  background: rgba(6, 7, 13, 0.4);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(4, minmax(130px, 170px));
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

label {
  display: grid;
  gap: 0.35rem;
}

label span {
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 46px;
  color: var(--text-main);
  background: rgba(17, 21, 37, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  outline: none;
  padding: 0 0.9rem;
}

input:focus,
select:focus {
  border-color: var(--border-glow-hover);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

select option {
  color: #111827;
}

.content-shell {
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: 2.25rem;
  font-weight: 900;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--border-subtle);
}

.catalog-grid,
.asset-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.asset-grid,
.category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
}

.category-list {
  display: grid;
  gap: 3rem;
}

.category-section {
  display: grid;
  gap: 1.25rem;
}

.category-section + .category-section {
  padding-top: 3rem;
  border-top: 1px solid var(--border-subtle);
}

.category-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.category-head h3 {
  font-size: 1.65rem;
  font-weight: 900;
}

.category-head span {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.collection-card,
.asset-card {
  overflow: hidden;
  color: var(--text-main);
  background: rgba(17, 21, 37, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  text-align: left;
  transition: var(--transition);
}

.collection-card {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.asset-card {
  padding: 0;
}

.collection-card:hover,
.asset-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(17, 21, 37, 0.7);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  background: rgba(8, 10, 19, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.collection-card .thumb {
  height: 230px;
}

.asset-card .thumb {
  aspect-ratio: 1;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.85rem;
  transition: var(--transition);
}

.collection-card .thumb img {
  object-fit: cover;
  padding: 0;
}

.collection-card:hover .thumb img,
.asset-card:hover .thumb img {
  transform: scale(1.04);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.25rem 0.75rem;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-body {
  display: grid;
  gap: 0.8rem;
  padding: 1.5rem;
}

.asset-card .card-body {
  padding: 1.1rem;
}

.card-meta {
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.asset-id {
  margin: 0;
  color: var(--accent-gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.collection-card h3 {
  font-size: 1.45rem;
  font-weight: 900;
}

.asset-card h3 {
  min-height: 2.4em;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.formats span {
  padding: 0.18rem 0.45rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
}

.empty-state {
  margin: 3rem 0;
  color: var(--text-muted);
  text-align: center;
}

footer {
  padding: 3rem 0;
  color: var(--text-dim);
  background: rgba(6, 7, 13, 0.6);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.9rem;
}

dialog {
  width: min(920px, calc(100vw - 2rem));
  padding: 0;
  color: var(--text-main);
  background: var(--bg-deep);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 38px;
  height: 38px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

#dialogImage {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  padding: 2rem;
  background: rgba(8, 10, 19, 0.8);
}

.dialog-body {
  padding: 1.5rem 2rem 2rem;
}

.dialog-body h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
}

dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.6rem 1rem;
  margin: 0;
}

dt {
  color: var(--text-dim);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

dd {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 968px) {
  h1 {
    font-size: 2.75rem;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid,
  .asset-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .site-header {
    padding: 1rem 0;
  }

  .header-content {
    align-items: flex-start;
  }

  .logo {
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 1.05rem;
  }

  .nav-links a {
    padding: 0.25rem 0;
    font-size: 0.8rem;
  }

  .hero {
    padding: 3rem 0 2.25rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .toolbar,
  .catalog-grid,
  .asset-grid,
  .category-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .collection-card .thumb {
    height: 205px;
  }

  dl {
    grid-template-columns: 1fr;
  }
}
