:root {
  color-scheme: dark;
  --bg: #101112;
  --panel: #191b1d;
  --panel-2: #222528;
  --text: #f2efe9;
  --muted: #a9aaa5;
  --line: #32363a;
  --red: #e2453f;
  --gold: #d7a84c;
  --teal: #4cc7b0;
  --blue: #6da8ff;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(226, 69, 63, 0.16), transparent 34rem),
    linear-gradient(180deg, #111213 0%, #151515 44%, #0f1010 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 17, 18, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--red), #1f2022 54%, var(--gold));
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  gap: 0.6rem;
}

.nav a,
.button,
.filter {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav a {
  padding: 0.62rem 0.82rem;
  color: var(--muted);
}

.nav a:hover,
.filter:hover,
.filter.is-active {
  border-color: rgba(76, 199, 176, 0.5);
  color: var(--text);
}

.hero {
  display: grid;
  min-height: 650px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 4vw, 4rem);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1rem;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1rem;
  font-weight: 800;
}

.button.primary {
  border-color: rgba(226, 69, 63, 0.55);
  background: var(--red);
  color: white;
}

.button.ghost {
  color: var(--muted);
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(25, 27, 29, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.hero-panel div {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--panel-2);
}

.metric {
  display: block;
  color: var(--gold);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
}

.section {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 4rem);
}

.section-heading {
  display: flex;
  max-width: 1180px;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto 2rem;
}

.feature-band {
  background: #171818;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.bot-grid,
.feature-grid,
.pack-grid,
.status-grid,
.collection-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 1rem;
}

.bot-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pack-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.status-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.bot-card,
.feature-card,
.pack-card,
.status-card,
.rules-card,
.rule-item,
.collection-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--panel);
}

.bot-card,
.feature-card,
.pack-card,
.rules-card {
  padding: 1rem;
}

.bot-card p,
.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.bot-toolbar,
.rarity-summary {
  display: flex;
  max-width: 1180px;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 auto 1rem;
}

.bot-toolbar span,
.rarity-stat {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.bot-toolbar span {
  padding: 0.65rem 0.8rem;
  color: var(--muted);
}

.bot-role {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.bot-details {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
}

.bot-details div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
}

.bot-details dt,
.bot-details dd {
  margin: 0;
  font-size: 0.85rem;
}

.bot-details dt {
  color: var(--muted);
}

.bot-details dd {
  color: var(--text);
}

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

.module-list span {
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
}

.pack-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
}

.pack-card p,
.rules-card p {
  color: var(--muted);
  line-height: 1.65;
}

.pack-highlight {
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(215, 168, 76, 0.12);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pack-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drop-table {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
}

.drop-table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.drop-table strong,
.guarantee {
  color: var(--gold);
}

.guarantee {
  font-weight: 800;
}

.pack-meta strong {
  color: var(--text);
}

.pack-meta span {
  color: var(--muted);
}

.status-card {
  display: flex;
  gap: 0.8rem;
  padding: 1rem;
}

.status-card h3 {
  margin-bottom: 0.2rem;
}

.status-card strong {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--teal);
}

.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.status-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(76, 199, 176, 0.12);
}

.status-dot.paused {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215, 168, 76, 0.12);
}

.rules-layout {
  display: grid;
  max-width: 1180px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  margin: 0 auto;
}

.mini-game-grid {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1rem auto 0;
}

.mini-game-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--panel);
}

.mini-game-card span {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-game-card p {
  color: var(--muted);
  line-height: 1.55;
}

.mini-game-card strong {
  color: var(--gold);
}

.rule-list {
  display: grid;
  gap: 0.7rem;
}

.rule-item {
  padding: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.collection-heading {
  align-items: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.filter {
  min-height: 38px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.collection-tools {
  display: flex;
  max-width: 1180px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 1rem;
}

.collection-tools input {
  width: min(100%, 420px);
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #151617;
  color: var(--text);
  font: inherit;
  padding: 0 0.9rem;
}

.collection-tools select {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #151617;
  color: var(--text);
  font: inherit;
  padding: 0 0.9rem;
}

.rarity-stat {
  min-width: 120px;
  padding: 0.75rem;
}

.rarity-stat strong,
.rarity-stat span {
  display: block;
}

.rarity-stat strong {
  color: var(--gold);
  font-size: 1.4rem;
}

.rarity-stat span {
  color: var(--muted);
}

#collectionCount {
  color: var(--muted);
  font-size: 0.92rem;
}

.collection-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.collection-card {
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.collection-card:hover,
.collection-card:focus-visible {
  border-color: rgba(215, 168, 76, 0.55);
  transform: translateY(-2px);
}

.collection-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #0d0e0f;
}

.collection-body {
  padding: 0.8rem;
}

.collection-body p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.rarity {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rarity.common {
  color: #c9cbc8;
}

.rarity.rare {
  color: var(--blue);
}

.rarity.epic {
  color: #cb88ff;
}

.rarity.legendary {
  color: var(--gold);
}

.empty-state {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.card-dialog {
  width: min(880px, calc(100vw - 2rem));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #151617;
  color: var(--text);
  padding: 0;
}

.card-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.dialog-content {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  padding: 1.2rem;
}

.dialog-content img {
  width: 100%;
  border-radius: var(--radius);
  background: #0d0e0f;
}

.dialog-content p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 800px) {
  .topbar,
  .section-heading,
  .collection-tools,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .rules-layout {
    grid-template-columns: 1fr;
  }

  .dialog-content {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: flex-start;
  }
}
