:root {
  --dark-bg: #1a1a2e;
  --dark-panel: #2a2a3e;
  --dark-text: #ffffff;
  --dark-muted: #aaaaaa;
  --light-bg: #fafaf8;
  --light-panel: #f0efeb;
  --light-text: #1a1a1a;
  --light-muted: #666666;
  --gold: #d4af37;
  --gold-strong: #e8c84a;
  --gold-dark: #c4a83a;
  --border-light: #e8e5dd;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--page-text);
  background: var(--page-bg);
  letter-spacing: 0;
  transition: background 220ms ease, color 220ms ease;
}

body.theme-dark {
  --page-bg: var(--dark-bg);
  --page-panel: var(--dark-panel);
  --page-text: var(--dark-text);
  --page-muted: var(--dark-muted);
  --page-border: rgba(212, 175, 55, 0.22);
  --header-bg: rgba(26, 26, 46, 0.78);
}

body.theme-light {
  --page-bg: var(--light-bg);
  --page-panel: var(--light-panel);
  --page-text: var(--light-text);
  --page-muted: var(--light-muted);
  --page-border: var(--border-light);
  --header-bg: rgba(250, 250, 248, 0.86);
}

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

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

button,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--gold);
  color: #111;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  height: 76px;
  padding: 0 clamp(18px, 4vw, 64px);
  color: var(--page-text);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled,
.site-header.nav-open {
  background: var(--header-bg);
  border-bottom-color: var(--page-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.14);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand img,
.footer-brand img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 36px);
  font-size: 15px;
  color: var(--page-muted);
}

.site-nav a {
  position: relative;
  padding: 28px 0;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 21px;
  height: 2px;
  background: var(--gold);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: var(--gold);
  color: #171717;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.nav-cta:hover,
.btn:hover {
  transform: translateY(-1px);
  background: var(--gold-strong);
  border-color: var(--gold-strong);
}

.btn.ghost {
  color: var(--page-text);
  background: transparent;
}

.btn.ghost:hover {
  color: #171717;
  background: var(--gold);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--page-border);
  border-radius: 7px;
  background: transparent;
  color: var(--page-text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 112px clamp(18px, 6vw, 86px) 58px;
}

.sub-hero {
  min-height: 58vh;
}

.hero-media,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: var(--hero-image) center / cover no-repeat;
  transform: scale(1.01);
  z-index: 0;
}

.hero-media::after {
  content: "";
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(26, 26, 46, 0.86), rgba(26, 26, 46, 0.44), rgba(26, 26, 46, 0.68)),
    linear-gradient(180deg, rgba(26, 26, 46, 0.22), var(--page-bg));
}

.theme-light .hero-media::after {
  background:
    linear-gradient(90deg, rgba(250, 250, 248, 0.9), rgba(250, 250, 248, 0.42), rgba(250, 250, 248, 0.7)),
    linear-gradient(180deg, rgba(250, 250, 248, 0.18), var(--page-bg));
}

.theme-light .hero.clear-media .hero-media::after {
  background:
    linear-gradient(90deg, rgba(250, 250, 248, 0.68), rgba(250, 250, 248, 0.14), rgba(250, 250, 248, 0.34)),
    linear-gradient(180deg, rgba(250, 250, 248, 0.04), rgba(250, 250, 248, 0.2) 68%, var(--page-bg) 100%);
}

.hero-content {
  position: relative;
  width: min(900px, 100%);
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0;
}

.hero h1 {
  margin: 14px 0 18px;
  color: var(--gold);
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.05;
  letter-spacing: 0;
}

.sub-hero h1 {
  color: var(--page-text);
  font-size: clamp(40px, 5vw, 70px);
}

.hero p {
  margin: 0;
  max-width: 700px;
  color: var(--page-muted);
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.section {
  padding: clamp(58px, 9vw, 112px) clamp(18px, 6vw, 86px);
}

.section.alt {
  background: color-mix(in srgb, var(--page-panel) 62%, transparent);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head h2,
.detail-title {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
}

.section-head p,
.muted {
  color: var(--page-muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.card,
.cta-panel,
.filter-panel,
.legal-box {
  border: 1px solid var(--page-border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--page-panel) 88%, transparent);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.12);
}

.card {
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.58);
  box-shadow: var(--shadow);
}

.feature-card {
  padding: 28px;
}

.feature-icon {
  color: var(--gold);
  font-size: 38px;
  line-height: 1;
}

.card h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--gold);
  font-weight: 800;
}

.thumb {
  height: 190px;
  overflow: hidden;
  background: var(--page-panel);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, opacity 260ms ease;
}

.card:hover .thumb img {
  transform: scale(1.045);
}

.card-body {
  padding: 20px;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.tag.red { color: #ff7d7d; background: rgba(255, 98, 98, 0.16); }
.tag.orange { color: #f4a261; background: rgba(244, 162, 97, 0.16); }
.tag.green { color: #6fcf97; background: rgba(111, 207, 151, 0.16); }
.tag.blue { color: #73b7ff; background: rgba(115, 183, 255, 0.16); }
.tag.pink { color: #d8578f; background: rgba(216, 87, 143, 0.14); }

.center-link {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.cta-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: clamp(26px, 4vw, 42px);
}

.cta-panel h2,
.cta-panel h3 {
  margin: 0 0 8px;
  font-size: clamp(25px, 3.2vw, 38px);
}

.weapp-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 218px;
}

.qr-placeholder {
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(212, 175, 55, 0.14) 25%, transparent 25% 50%, rgba(212, 175, 55, 0.14) 50% 75%, transparent 75%) 0 0 / 22px 22px,
    var(--page-bg);
}

.qr-placeholder img {
  width: 76px;
  height: 76px;
  border-radius: 8px;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
}

.filter-panel select {
  min-width: 260px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--page-border);
  border-radius: 7px;
  background: var(--page-bg);
  color: var(--page-text);
}

.result-count {
  color: var(--gold);
  font-weight: 800;
}

.rarity-board {
  margin-bottom: 24px;
}

.rarity-item {
  padding: 18px;
}

.rarity-level {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  margin-bottom: 12px;
  color: #111;
  background: var(--gold);
  font-family: "JetBrains Mono", "SF Mono", monospace;
  font-weight: 900;
}

.aircraft-figure {
  display: grid;
  place-items: center;
  height: 140px;
  padding: 18px;
  background:
    radial-gradient(circle at 40% 55%, rgba(212, 175, 55, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.aircraft-shape {
  width: min(220px, 88%);
  height: 32px;
  position: relative;
  border-radius: 50% 55% 45% 50%;
  background: linear-gradient(90deg, #e6e8ef, #8d96a5);
}

.aircraft-shape::before,
.aircraft-shape::after {
  content: "";
  position: absolute;
  left: 46%;
  background: #aeb6c4;
}

.aircraft-shape::before {
  top: -42px;
  width: 82px;
  height: 42px;
  clip-path: polygon(0 100%, 100% 0, 86% 100%);
}

.aircraft-shape::after {
  bottom: -34px;
  width: 76px;
  height: 36px;
  clip-path: polygon(0 0, 100% 100%, 84% 0);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}

.chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--page-border);
  border-radius: 999px;
  background: transparent;
  color: var(--page-text);
  cursor: pointer;
}

.chip.active,
.chip:hover {
  border-color: var(--gold);
  color: #171717;
  background: var(--gold);
}

.detail-wrap {
  padding: 118px clamp(18px, 6vw, 86px) 80px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.detail-panel {
  padding: clamp(24px, 4vw, 42px);
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.detail-panel p,
.legal-box p {
  color: var(--page-muted);
  line-height: 1.85;
}

.facts {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--page-border);
}

.fact strong {
  color: var(--gold);
}

.legal-box {
  padding: 24px;
}

.legal-box h3 {
  margin-top: 0;
}

.site-footer {
  padding: 34px clamp(18px, 6vw, 86px);
  border-top: 1px solid var(--page-border);
  background: color-mix(in srgb, var(--page-panel) 70%, transparent);
  color: var(--page-muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 20px 34px;
  align-items: start;
}

.footer-brand {
  color: var(--page-text);
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.footer-links a,
.footer-note a {
  color: var(--page-muted);
}

.footer-links a:hover,
.footer-note a:hover {
  color: var(--gold);
}

.footer-note {
  grid-column: 1 / -1;
  font-size: 13px;
  line-height: 1.7;
}

.fade-in {
  animation: fadeIn 260ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
    height: 68px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav,
  .nav-cta {
    display: none;
  }

  .site-header.nav-open .site-nav {
    display: grid;
    position: absolute;
    top: 68px;
    left: 14px;
    right: 14px;
    padding: 12px;
    gap: 0;
    border: 1px solid var(--page-border);
    border-radius: var(--radius);
    background: var(--header-bg);
    backdrop-filter: blur(18px);
  }

  .site-header.nav-open .site-nav a {
    padding: 14px 10px;
  }

  .site-header.nav-open .site-nav a.active::after {
    display: none;
  }

  .hero {
    min-height: 86vh;
    padding: 96px 18px 42px;
  }

  .sub-hero {
    min-height: 54vh;
  }

  .hero h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .hero-actions,
  .section-head,
  .cta-panel,
  .filter-panel {
    display: grid;
    align-items: stretch;
  }

  .btn,
  .filter-panel select {
    width: 100%;
  }

  .grid.four,
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 52px 18px;
  }

  .thumb {
    height: 210px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .hero p {
    font-size: 17px;
  }

  .card-body,
  .feature-card,
  .legal-box {
    padding: 18px;
  }

  .qr-placeholder {
    width: 180px;
    height: 180px;
  }
}
