:root {
  color-scheme: dark;
  --ink: #f9fbff;
  --muted: #bac4d6;
  --panel: rgba(17, 22, 32, 0.86);
  --panel_solid: #111620;
  --line: rgba(255, 255, 255, 0.14);
  --teal: #4fd8d1;
  --coral: #ff7a70;
  --gold: #f2c46b;
  --green: #78dc93;
  --blue: #88a8ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #080b10;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: clamp(360px, 52vh, 620px);
  overflow: hidden;
  display: grid;
  align-items: end;
}

.hero_image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero_scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.94), rgba(7, 9, 13, 0.48) 52%, rgba(7, 9, 13, 0.18)),
    linear-gradient(0deg, #080b10 0%, rgba(8, 11, 16, 0) 38%);
}

.hero_content {
  position: relative;
  width: min(760px, calc(100% - 40px));
  padding: 48px 20px 82px;
  margin-left: clamp(0px, 5vw, 64px);
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
  max-width: 720px;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.hero_copy {
  max-width: 620px;
  color: #d9e1ee;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.6;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  padding: 0 clamp(16px, 4vw, 52px) 52px;
  margin-top: -46px;
  position: relative;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 8px;
}

.controls_panel {
  padding: 18px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.panel_header {
  padding-bottom: 4px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
}

select,
.search {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

select:focus,
.search:focus,
input[type="range"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 216, 209, 0.18);
}

option {
  color: #10141d;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

#challenge_label {
  color: var(--ink);
  font-size: 0.92rem;
}

.primary_button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #071014;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  font-weight: 900;
  cursor: pointer;
}

.secondary_button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  cursor: pointer;
}

.primary_button:hover {
  filter: brightness(1.06);
}

.secondary_button:hover {
  border-color: var(--teal);
}

.result_panel {
  min-height: 270px;
  padding: clamp(18px, 3vw, 30px);
  display: grid;
  gap: 18px;
}

.top_match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.match_score {
  width: 116px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--green) var(--score), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.24);
}

.match_score span {
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel_solid);
  font-weight: 950;
  font-size: 1.42rem;
}

.tag_row,
.mini_stats,
.card_tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag,
.stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: #dfe7f2;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.match_title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.match_reason {
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
}

.match_link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  color: #071014;
  background: var(--coral);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
  text-decoration: none;
}

.library_area {
  grid-column: 1 / -1;
  padding-top: 12px;
}

.section_heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.section_heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.search {
  max-width: 330px;
  background: rgba(255, 255, 255, 0.1);
}

.search_group {
  width: min(420px, 100%);
  display: grid;
  justify-items: end;
  gap: 8px;
}

.source_badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 900;
}

.game_grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.game_card {
  min-height: 260px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    radial-gradient(circle at top right, var(--card_tint), transparent 36%),
    rgba(16, 21, 30, 0.92);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.game_card:hover,
.game_card:focus-visible {
  border-color: rgba(79, 216, 209, 0.72);
  background:
    radial-gradient(circle at top right, var(--card_tint), transparent 42%),
    rgba(22, 29, 42, 0.96);
  transform: translateY(-2px);
  outline: none;
}

.game_card.has_image {
  padding-top: 0;
  overflow: hidden;
}

.card_image {
  width: calc(100% + 32px);
  height: 138px;
  margin: 0 -16px 12px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.game_card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.2;
}

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

.learn_more {
  color: #071014;
  background: var(--teal);
  border-color: transparent;
}

.score_line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
}

.meter {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: var(--meter);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral));
}

.site_footer {
  padding: 0 clamp(16px, 4vw, 52px) 34px;
  color: var(--muted);
  font-size: 0.84rem;
}

.site_footer a {
  color: var(--teal);
  font-weight: 900;
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .controls_panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .hero_content {
    width: calc(100% - 24px);
    padding: 44px 12px 72px;
  }

  .workspace {
    padding-inline: 12px;
    margin-top: -34px;
  }

  .top_match,
  .section_heading {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section_heading {
    margin-bottom: 16px;
  }

  .match_score {
    width: 96px;
  }

  .search {
    max-width: none;
  }

  .search_group {
    width: 100%;
    justify-items: stretch;
  }

  .game_grid {
    grid-template-columns: 1fr;
  }
}
