:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #eef6ff;
  --muted: #a9bad1;
  --gold: #ffd166;
  --green: #3ddc97;
  --blue: #72ddf7;
  --red: #ff6b6b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(61, 220, 151, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(114, 221, 247, 0.2), transparent 30rem),
    linear-gradient(135deg, #07111f 0%, #101827 48%, #04141f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
}

.hero,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 28px 0 38px;
}

.nav,
.hero-grid,
.filter-panel,
.summary-bar,
.card,
dialog {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 20, 36, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 999px;
  padding: 12px 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.nav-link,
.button,
#resetBtn {
  color: var(--text);
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-link,
.button.ghost,
#resetBtn {
  background: rgba(255, 255, 255, 0.1);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  border-radius: 34px;
  padding: clamp(28px, 6vw, 72px);
  overflow: hidden;
  position: relative;
}

.hero-grid::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.18), transparent 70%);
}

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

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

h1 {
  margin-bottom: 18px;
  max-width: 800px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.hero-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button.primary {
  color: #07111f;
  background: linear-gradient(135deg, var(--gold), #ff9f1c);
}

.hero-card {
  align-self: center;
  position: relative;
  z-index: 1;
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}

.trophy {
  font-size: 4rem;
  filter: drop-shadow(0 12px 24px rgba(255, 209, 102, 0.28));
}

.hero-card h2 {
  margin: 8px 0;
  font-size: 2rem;
}

.hero-card p,
.card p,
.meta,
.final,
footer {
  color: var(--muted);
  line-height: 1.55;
}

.stat-row {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.stat-row span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.controls {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  align-items: end;
  padding: 38px 0 16px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  letter-spacing: -0.05em;
}

.filter-panel {
  border-radius: 24px;
  padding: 18px;
}

.search-label,
.select-row label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(114, 221, 247, 0.15);
}

.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.summary-bar {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  padding: 12px 14px;
  margin: 8px 0 18px;
}

#resultCount {
  color: var(--muted);
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 370px;
  border-radius: 26px;
  padding: 20px;
  overflow: hidden;
  position: relative;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-5px);
  border-color: rgba(255, 209, 102, 0.55);
  background: rgba(14, 31, 52, 0.88);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--gold));
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
}

.year {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.host {
  color: var(--muted);
  font-weight: 700;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 10px;
  color: #06101d;
  background: var(--gold);
  font-size: 0.77rem;
  font-weight: 800;
}

.card h3 {
  margin: 18px 0 10px;
  font-size: 1.35rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.meta {
  padding: 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.92rem;
}

.meta strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.story {
  flex: 1;
}

.card button {
  align-self: flex-start;
  margin-top: 16px;
  color: #07111f;
  background: var(--green);
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.empty {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: var(--panel);
}

dialog {
  width: min(720px, calc(100% - 28px));
  color: var(--text);
  border-radius: 28px;
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

.close {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.dialog-inner {
  padding: 32px;
}

.dialog-inner h2 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 6vw, 3.2rem);
  letter-spacing: -0.05em;
}

.dialog-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.dialog-facts div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

footer {
  padding: 22px 0 36px;
  text-align: center;
}

@media (max-width: 920px) {
  .hero-grid,
  .controls {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .hero,
  main,
  footer {
    width: min(100% - 20px, 1180px);
  }

  .nav {
    border-radius: 22px;
  }

  .hero-grid {
    border-radius: 26px;
    padding: 26px;
  }

  .cards,
  .select-row,
  .dialog-facts {
    grid-template-columns: 1fr;
  }

  .summary-bar {
    align-items: stretch;
    flex-direction: column;
  }
}
