:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: rgba(23, 33, 31, 0.66);
  --line: rgba(255, 255, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.34);
  --jade: #2e6b5b;
  --rust: #9c543a;
  --gold: #8a6418;
  --shadow: 0 22px 60px rgba(16, 20, 18, 0.24);
  --serif:
    ui-serif, "Songti SC", "Noto Serif SC", Georgia, Cambria, "Times New Roman",
    "STSong", SimSun, serif;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #171b19;
}

body {
  position: relative;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: transparent;
  font-family: var(--serif);
}

body::before,
body::after {
  position: fixed;
  content: "";
  pointer-events: none;
}

body::before {
  inset: -24px;
  z-index: 0;
  background: url("./assets/hero-bridge-archive.png") center / cover no-repeat;
  filter: blur(10px);
  transform: scale(1.04);
}

body::after {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(80, 44, 25, 0.42), rgba(104, 38, 55, 0.24) 45%, rgba(28, 65, 70, 0.42)),
    rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(2px) saturate(1.08);
  -webkit-backdrop-filter: blur(2px) saturate(1.08);
}

a {
  color: inherit;
}

.hero,
main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 72svh;
  display: grid;
  place-items: center;
  overflow: visible;
  padding: 64px 0 124px;
}

.hero__shade {
  display: none;
}

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

.hero__content {
  padding: 0;
  color: #fff;
  text-align: center;
}

h1 {
  margin: 0 auto;
  max-width: 860px;
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.42);
}

.hero__intro {
  max-width: 700px;
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.48);
}

main {
  margin-top: -82px;
  padding: 0 0 72px;
}

button,
input,
select,
.search-box,
.select-label,
.item-card__meta,
.item-tags,
.results-head p,
.stats span,
.source-link {
  font-family: var(--sans);
}

.toolbar,
.stats div,
.item-card,
.empty-state {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.14);
}

.toolbar {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 8px;
}

.search-box {
  display: grid;
  gap: 8px;
  color: rgba(23, 33, 31, 0.7);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.search-box input,
.select-label select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.search-box input {
  min-height: 48px;
  padding: 0 14px;
  font-size: 16px;
}

.search-box input::placeholder {
  color: rgba(23, 33, 31, 0.48);
}

.search-box input:focus,
.select-label select:focus {
  border-color: rgba(46, 107, 91, 0.66);
  box-shadow: 0 0 0 3px rgba(46, 107, 91, 0.18);
}

.control-group,
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.control-row {
  justify-content: space-between;
}

button,
select {
  cursor: pointer;
}

.chip,
.segment {
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}

.chip {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.segment {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
}

.chip:hover,
.segment:hover {
  background: rgba(255, 255, 255, 0.72);
}

.chip.is-active,
.segment.is-active {
  background: rgba(46, 107, 91, 0.92);
  color: #fff;
  border-color: rgba(46, 107, 91, 0.95);
  box-shadow: 0 8px 20px rgba(46, 107, 91, 0.22);
}

.select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(23, 33, 31, 0.7);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.select-label select {
  min-height: 38px;
  padding: 0 34px 0 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 22px 0 28px;
}

.stats div {
  padding: 18px;
  border-radius: 8px;
}

.stats strong {
  display: block;
  font-size: 35px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.results-head {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  align-items: end;
  margin: 0 0 14px;
}

.results-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
  font-weight: 700;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.42);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.item-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 18px;
  border-radius: 8px;
}

.item-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.platform-pill,
.type-pill,
.category-pill,
.item-tags span {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.platform-pill,
.type-pill,
.category-pill {
  padding: 5px 8px;
}

.platform-pill {
  color: var(--jade);
}

.type-pill {
  color: var(--rust);
}

.category-pill {
  color: var(--gold);
}

.item-card h3 {
  margin: 16px 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.03em;
}

.summary {
  margin: 0;
  color: rgba(23, 33, 31, 0.78);
  line-height: 1.82;
  letter-spacing: 0.02em;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.item-tags span {
  padding: 4px 8px;
  color: rgba(23, 33, 31, 0.64);
  font-size: 12px;
  font-weight: 800;
}

.item-card__footer {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  align-items: center;
  margin-top: auto;
  padding-top: 22px;
}

.item-card__footer a {
  color: var(--jade);
  font-weight: 850;
  text-decoration: none;
}

.item-card__footer a[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}

.item-card__footer a:hover {
  text-decoration: underline;
}

.empty-state {
  margin: 28px 0 0;
  padding: 28px;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .toolbar,
  .stats div,
  .item-card,
  .empty-state {
    background: rgba(255, 255, 255, 0.86);
  }
}

@media (max-width: 880px) {
  .hero {
    min-height: 620px;
    padding-bottom: 118px;
  }

  .hero__content {
    padding-bottom: 0;
  }

  .control-row,
  .results-head {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
    padding-inline: 8px;
  }

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

@media (max-width: 560px) {
  .hero__content,
  main {
    width: min(100% - 22px, 960px);
  }

  .hero {
    min-height: 600px;
    padding: 48px 0 108px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 48px);
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .hero__intro {
    letter-spacing: 0.08em;
  }

  main {
    margin-top: -74px;
  }

  .toolbar {
    padding: 12px;
  }

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

  .chip {
    width: 100%;
    padding-inline: 8px;
  }

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

  .item-card {
    min-height: auto;
  }
}
