:root {
  color-scheme: dark;
  --bg: #071614;
  --bg-deep: #04100f;
  --panel: rgba(9, 31, 28, 0.86);
  --panel-solid: #0a211e;
  --line: rgba(162, 229, 211, 0.14);
  --line-strong: rgba(162, 229, 211, 0.28);
  --text: #eef8f4;
  --muted: #8eaaa3;
  --mint: #70e4c5;
  --mint-strong: #a2f5dd;
  --orange: #f0a362;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -8%, rgba(48, 142, 119, 0.22), transparent 34rem),
    radial-gradient(circle at -5% 70%, rgba(240, 163, 98, 0.07), transparent 32rem),
    var(--bg);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(117, 229, 198, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 229, 198, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
}

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 16, 15, 0.62);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 228, 197, 0.4);
  border-radius: 50%;
  background: rgba(112, 228, 197, 0.08);
}

.brand-mark svg { width: 23px; fill: var(--mint); transform: rotate(-5deg); }

.year-tag {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-stat { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.header-stat strong { color: var(--mint-strong); font-size: 15px; }
.header-stat i { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

main { width: min(1520px, calc(100% - clamp(28px, 6vw, 100px))); margin: 0 auto; padding: 48px 0 28px; }

.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 10px; color: var(--mint); font-size: 12px; font-weight: 750; letter-spacing: 0.22em; }
h1 { margin: 0; font-size: clamp(30px, 3.3vw, 54px); line-height: 1.14; letter-spacing: -0.045em; font-weight: 630; }
.intro-note { width: 340px; margin: 0 0 4px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.controls-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }

.region-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(7, 25, 23, 0.7);
  scrollbar-width: none;
}
.region-tabs::-webkit-scrollbar { display: none; }
.region-button {
  position: relative;
  min-width: 72px;
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}
.region-button:hover { color: var(--text); background: rgba(112, 228, 197, 0.06); }
.region-button:active { transform: scale(0.97); }
.region-button.active { color: #061513; background: var(--mint); font-weight: 700; box-shadow: 0 8px 24px rgba(112, 228, 197, 0.16); }
.region-button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.search-box { position: relative; flex: 0 0 300px; height: 48px; }
.search-box > svg { position: absolute; z-index: 2; left: 15px; top: 14px; width: 19px; fill: none; stroke: var(--mint); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search-box input { width: 100%; height: 100%; padding: 0 38px 0 44px; border: 1px solid var(--line); border-radius: 14px; outline: none; color: var(--text); background: rgba(7,25,23,.84); font: inherit; font-size: 14px; transition: border-color 160ms ease, box-shadow 160ms ease; }
.search-box input::placeholder { color: #6f8a83; }
.search-box input:focus { border-color: rgba(112,228,197,.5); box-shadow: 0 0 0 3px rgba(112,228,197,.08); }
.search-box input::-webkit-search-cancel-button { opacity: .65; }
.search-results { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(360px, calc(100vw - 28px)); max-height: 350px; overflow-y: auto; padding: 7px; border: 1px solid var(--line-strong); border-radius: 15px; background: rgba(4,19,17,.98); box-shadow: 0 22px 55px rgba(0,0,0,.46); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transform: translateY(-5px); transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease; }
.search-results.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.search-result { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 10px 9px; border: 0; border-radius: 10px; color: var(--text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.search-result:hover, .search-result:focus-visible { outline: none; background: rgba(112,228,197,.08); }
.search-code { color: var(--mint); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.search-main { min-width: 0; }
.search-main strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 620; }
.search-main span, .search-passengers { color: var(--muted); font-size: 11px; }
.search-empty { padding: 18px 12px; color: var(--muted); font-size: 12px; text-align: center; }

.atlas { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: stretch; }
.map-card, .detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(13, 42, 38, 0.82), rgba(5, 21, 19, 0.94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-card { min-width: 0; }
.map-meta { height: 72px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.map-meta > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.meta-label { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; }
.map-meta strong { font-size: 19px; font-weight: 650; }
.meta-count { color: var(--muted); font-size: 13px; }
.meta-count span { color: var(--mint); font-size: 22px; font-weight: 700; margin-right: 3px; }

.map-stage { position: relative; min-height: 590px; overflow: hidden; background: radial-gradient(ellipse at 53% 45%, rgba(55, 147, 123, 0.1), transparent 52%); }
.map-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(112,228,197,.025) 1px, transparent 1px), linear-gradient(rgba(112,228,197,.025) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle, #000, transparent 78%); }
#mapSvg { display: block; width: 100%; height: 590px; transition: opacity 300ms ease; }
.province { fill: url(#regionFill); stroke: rgba(147, 210, 194, 0.28); stroke-width: 0.9; vector-effect: non-scaling-stroke; transition: fill 220ms ease, opacity 220ms ease, stroke 220ms ease; }
.province.outside { fill: #091e1c; opacity: 0.35; stroke: rgba(147, 210, 194, 0.13); }
.province.in-region { fill: #174b43; stroke: rgba(134, 237, 208, 0.5); }

.airport-node { cursor: pointer; outline: none; }
.airport-node .halo { fill: rgba(112, 228, 197, 0.12); transform-box: fill-box; transform-origin: center; animation: breathe 2.8s ease-in-out infinite; }
.airport-node .core { fill: var(--mint); stroke: #d7fff3; stroke-width: 1.3; vector-effect: non-scaling-stroke; transition: fill 160ms ease, r 160ms ease, filter 160ms ease; }
.airport-node.dimmed { opacity: 0; pointer-events: none; }
.airport-node:hover .core, .airport-node:focus .core, .airport-node.selected .core { fill: var(--orange); filter: url(#mapGlow); }
.airport-node.selected .halo { fill: rgba(240, 163, 98, 0.26); animation-duration: 1.6s; }
.airport-label { fill: #d8f4eb; font-size: 11px; font-weight: 600; paint-order: stroke; stroke: #071614; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; opacity: 0; transition: opacity 160ms ease; }
.airport-node:hover .airport-label, .airport-node:focus .airport-label, .airport-node.selected .airport-label { opacity: 1; }

@keyframes breathe { 0%, 100% { transform: scale(0.82); opacity: .55; } 50% { transform: scale(1.28); opacity: .95; } }

.map-loading { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); background: #091f1c; transition: opacity 300ms ease, visibility 300ms ease; }
.map-loading.hidden { opacity: 0; visibility: hidden; }
.map-loading span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--mint); animation: spin 800ms linear infinite; }
.map-loading p { margin: 0; font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-key { position: absolute; left: 20px; bottom: 18px; display: flex; align-items: center; gap: 18px; padding: 9px 12px; color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(4, 18, 16, .76); backdrop-filter: blur(10px); }
.map-key span { display: flex; align-items: center; gap: 7px; }
.key-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(112, 228, 197, .1); }
.key-dot-large { width: 11px; height: 11px; }
.key-dot-tiny { width: 4px; height: 4px; box-shadow: 0 0 0 3px rgba(112, 228, 197, .08); }

.tooltip { position: absolute; z-index: 6; min-width: 188px; padding: 13px 14px; pointer-events: none; opacity: 0; transform: translate(-50%, -100%) translateY(-12px) scale(.96); border: 1px solid rgba(112,228,197,.28); border-radius: 13px; background: rgba(4, 19, 17, .94); box-shadow: 0 14px 40px rgba(0,0,0,.34); backdrop-filter: blur(12px); transition: opacity 130ms ease, transform 130ms ease; }
.tooltip.visible { opacity: 1; transform: translate(-50%, -100%) translateY(-16px) scale(1); }
.tooltip strong { display: block; margin-bottom: 5px; font-size: 14px; }
.tooltip span { color: var(--muted); font-size: 12px; }
.tooltip em { color: var(--mint); font-style: normal; }

.detail-card { padding: 22px; display: flex; flex-direction: column; }
.detail-topline { display: flex; justify-content: space-between; align-items: center; }
.iata { font-size: 12px; font-weight: 800; letter-spacing: .18em; color: var(--mint); }
.rank { padding: 5px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 11px; }
.detail-heading { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.detail-heading p { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.detail-heading h2 { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
.plane-badge { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(112,228,197,.2); border-radius: 50%; background: rgba(112,228,197,.06); }
.plane-badge svg { width: 31px; fill: var(--mint); }

.hero-metric { padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.hero-metric > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.hero-metric strong { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 38px; letter-spacing: -.055em; font-weight: 560; color: var(--mint-strong); }
.hero-metric em { margin-left: 5px; color: var(--muted); font-size: 12px; font-style: normal; }
.metric-track { height: 3px; margin-top: 15px; overflow: hidden; border-radius: 3px; background: rgba(112,228,197,.08); }
.metric-track span { display: block; width: 100%; height: 100%; transform-origin: left; background: linear-gradient(90deg, var(--mint), var(--orange)); transition: transform 550ms cubic-bezier(.22,1,.36,1); }

.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 -22px; background: var(--line); border-bottom: 1px solid var(--line); }
.fact { min-height: 91px; padding: 14px 18px; display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-content: center; background: rgba(7, 27, 24, .96); }
.fact svg { grid-row: 1 / 3; width: 18px; fill: none; stroke: var(--mint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fact span { color: var(--muted); font-size: 11px; }
.fact strong { margin-top: 3px; font-size: 14px; font-weight: 650; }

.regional-list { padding-top: 19px; }
.list-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.list-heading div { display: flex; align-items: baseline; gap: 6px; }
.list-heading span { color: var(--muted); font-size: 11px; }
.list-heading strong { font-size: 13px; font-weight: 650; }
.airport-list-item { width: 100%; padding: 9px 0; display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; border: 0; border-bottom: 1px solid rgba(162,229,211,.07); color: var(--text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.airport-list-item:hover .list-name, .airport-list-item.active .list-name { color: var(--mint); }
.list-index { color: var(--muted); font-size: 11px; }
.list-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; transition: color 160ms ease; }
.list-value { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
#airportList { max-height: 206px; overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: rgba(112,228,197,.22) transparent; }

.seo-intro { margin-top: 18px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border: 1px solid var(--line); border-radius: 18px; background: rgba(7, 25, 23, .72); }
.seo-intro > div { max-width: 900px; }
.seo-intro .eyebrow { margin-bottom: 7px; }
.seo-intro h2 { margin: 0; font-size: 22px; line-height: 1.35; font-weight: 650; }
.seo-intro p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.directory-cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid rgba(112, 228, 197, .3); border-radius: 11px; color: var(--mint-strong); background: rgba(112, 228, 197, .07); text-decoration: none; font-size: 14px; transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.directory-cta:hover { border-color: rgba(112, 228, 197, .56); background: rgba(112, 228, 197, .12); transform: translateY(-1px); }
.directory-cta span { font-size: 18px; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 18px 2px 0; color: #68827c; font-size: 11px; line-height: 1.65; }
footer p { margin: 0; }
footer a { color: #86aaa0; text-underline-offset: 3px; }

@media (max-width: 1040px) {
  .atlas { grid-template-columns: 1fr; }
  .detail-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .detail-topline, .detail-heading, .hero-metric { grid-column: 1; }
  .fact-grid, .regional-list { grid-column: 2; }
  .fact-grid { margin: 0; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; align-self: start; }
  .regional-list { padding-top: 16px; }
}

@media (max-width: 720px) {
  .topbar { height: 62px; padding: 0 18px; }
  .header-stat { display: none; }
  main { width: calc(100% - 28px); padding-top: 30px; }
  .intro { display: block; margin-bottom: 22px; }
  .intro-note { width: auto; margin-top: 14px; font-size: 13px; }
  .controls-row { display: block; }
  .region-tabs { width: 100%; margin-bottom: 10px; }
  .search-box { width: 100%; height: 46px; }
  .region-button { min-width: 68px; padding: 9px 12px; }
  .map-meta { height: 62px; padding: 0 16px; }
  .map-stage { min-height: 430px; }
  #mapSvg { height: 430px; }
  .map-key { left: 12px; bottom: 12px; gap: 10px; max-width: calc(100% - 24px); }
  .detail-card { display: flex; padding: 20px; }
  .fact-grid { margin: 0 -20px; border-radius: 0; border-left: 0; border-right: 0; }
  .hero-metric strong { font-size: 34px; }
  .seo-intro { display: block; padding: 22px 20px; }
  .seo-intro h2 { font-size: 20px; }
  .directory-cta { margin-top: 16px; }
  footer { display: block; }
  footer p + p { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
