:root {
  color-scheme: dark;
  --bg: #070d1c;
  --bg-2: #0a1430;
  --ink: #f4eedc;
  --muted: #b7c0d4;
  --line: #243156;
  --gold: #f0c24b;
  --red: #e3350d;
  --cyan: #62d0c8;
  --green: #7dcf83;
  --panel: #0e1a36;
  --panel-2: #132244;
  --shadow: 0 22px 80px rgba(0, 12, 40, .5);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(240, 194, 75, .05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(240, 194, 75, .035) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(227, 53, 13, .16), transparent 28rem),
    linear-gradient(145deg, #050a16 0%, #0a1430 54%, #070d1c 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
  color: var(--ink);
  font-family: "Afacad", "Trebuchet MS", "Gill Sans", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 50%, transparent 50%);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
  opacity: .4;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: #ffe08b;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(240, 194, 75, .22);
  background: rgba(7, 13, 28, .88);
  backdrop-filter: blur(14px);
}

.nav-wrap,
.container,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.nav-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.lang-dropdown {
  position: relative;
  display: inline-block;
  user-select: none;
}

.lang-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: all .2s ease;
}

.lang-dropdown-trigger::-webkit-details-marker {
  display: none;
}

.lang-dropdown-trigger:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .25);
}

.lang-dropdown[open] .lang-dropdown-trigger {
  background: rgba(255, 255, 255, .12);
  border-color: var(--gold);
}

.lang-globe {
  font-size: .9rem;
  line-height: 1;
}

.lang-caret {
  font-size: .75rem;
  opacity: .7;
  transition: transform .2s ease;
}

.lang-dropdown[open] .lang-caret {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  background: #0d1527;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFade .15s ease-out;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
}

.lang-option.active {
  background: rgba(247, 209, 87, .15);
  color: var(--gold);
  font-weight: 600;
}

.lang-check {
  display: inline-block;
  width: 12px;
  font-size: .85rem;
  font-weight: bold;
  color: var(--gold);
}

.site-nav a {
  color: var(--muted);
  font-size: .94rem;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--ink);
  border-color: rgba(240, 194, 75, .35);
  background: rgba(240, 194, 75, .08);
}

.hero {
  min-height: calc(100svh - 70px);
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr);
  align-items: center;
  gap: 34px;
  padding: 46px 0 36px;
}

.page-hero {
  min-height: auto;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .7fr);
  padding-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: .85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--cyan);
}

h1,
h2,
h3 {
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 5.8rem);
  max-width: 10ch;
  text-transform: uppercase;
}

.page-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.2rem, 5vw, 4.9rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 18px 0 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.button,
button.button {
  appearance: none;
  border: 1px solid rgba(240, 194, 75, .55);
  border-radius: var(--radius);
  background: var(--gold);
  color: #171105;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 900;
  text-transform: uppercase;
}

.button.secondary {
  background: rgba(240, 194, 75, .08);
  color: var(--ink);
}

.button.danger {
  background: var(--red);
  border-color: rgba(255, 255, 255, .2);
  color: #fff8e6;
}

.button:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.keyword-strip,
.mini-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.keyword-strip li,
.mini-facts li {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: .92rem;
}

.hero > .keyword-strip {
  grid-column: 1 / -1;
  margin-top: -12px;
}

.game-panel {
  border: 1px solid rgba(240, 194, 75, .34);
  background: #080907;
  box-shadow: var(--shadow);
}

.game-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid rgba(240, 194, 75, .22);
  background: var(--panel);
}

.toolbar-title {
  color: var(--muted);
  font-size: .92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--green);
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-actions .button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: .82rem;
}

.game-shell {
  aspect-ratio: 16 / 10;
  min-height: 560px;
  background: #000;
  position: relative;
  width: 100%;
}

.game-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.game-cover {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 6, .1), rgba(7, 8, 6, .88)),
    var(--cover-image) center / cover no-repeat;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  align-content: end;
  justify-items: start;
  padding: clamp(18px, 4vw, 34px);
  text-align: left;
  font: inherit;
}

.game-cover[hidden] {
  display: none;
}

.game-cover strong {
  display: block;
  font-size: clamp(1.6rem, 4vw, 3.8rem);
  line-height: 1;
  max-width: 10ch;
  text-transform: uppercase;
}

.game-cover span {
  margin-top: 12px;
  display: inline-flex;
  background: var(--gold);
  color: #171105;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.play-note {
  padding: 12px 14px;
  color: var(--muted);
  font-size: .95rem;
  border-top: 1px solid rgba(240, 194, 75, .16);
  margin: 0;
}

.install-tip {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(98, 208, 200, .45);
  background: rgba(98, 208, 200, .08);
  color: var(--ink);
}

.visual-frame {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .14);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.visual-frame img {
  width: 100%;
  min-height: 270px;
  object-fit: cover;
  filter: saturate(.94) contrast(1.05);
}

.visual-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  background: rgba(7, 8, 6, .82);
  border: 1px solid rgba(240, 194, 75, .28);
  color: var(--muted);
  font-size: .9rem;
}

.band {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 52px 0;
}

.band.alt {
  background: rgba(255, 255, 255, .028);
}

.section-kicker {
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 7px;
}

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

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.fact-card {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(17, 21, 15, .9);
  padding: 18px;
  border-radius: var(--radius);
}

.feature-card p,
.fact-card p {
  margin: 0;
  color: var(--muted);
}

.fact-card strong {
  color: var(--ink);
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.prose {
  color: var(--muted);
  max-width: 74ch;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin: 8px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(17, 21, 15, .8);
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.data-table th {
  color: var(--gold);
  background: rgba(240, 194, 75, .08);
  text-transform: uppercase;
  font-size: .86rem;
}

.data-table td {
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(17, 21, 15, .85);
  border-radius: var(--radius);
  padding: 14px 16px;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

details p {
  color: var(--muted);
  margin: 10px 0 0;
}

.quick-play {
  border: 1px solid rgba(240, 194, 75, .22);
  background: linear-gradient(135deg, rgba(201, 62, 53, .12), rgba(98, 208, 200, .08));
  padding: 18px;
  border-radius: var(--radius);
}

.breadcrumb {
  color: var(--muted);
  font-size: .9rem;
  padding: 20px 0 0;
}

.breadcrumb a {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(240, 194, 75, .22);
  background: #050a16;
  padding: 30px 0;
  color: var(--muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--cyan);
  color: #06100f;
  padding: 8px 12px;
  z-index: 99;
}

.skip-link:focus {
  top: 12px;
}

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

  .hero {
    min-height: auto;
    padding-top: 30px;
  }

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

  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-cluster,
  .site-nav,
  .lang-switch {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .nav-wrap,
  .container,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .game-toolbar,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .button,
  button.button {
    width: 100%;
  }

  .toolbar-actions .button {
    width: auto;
  }

  h1 {
    max-width: 11ch;
    font-size: 2.35rem;
  }

  .lead {
    font-size: 1rem;
    margin-bottom: 18px;
  }

  .hero > .keyword-strip {
    margin-top: 2px;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}

/* 游戏深度数据库专属组件样式 */
.badge-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .76rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: capitalize;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.5;
}

.data-table th {
  background: rgba(255, 255, 255, .03);
  color: var(--gold);
  font-weight: 600;
  text-align: left;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, .02);
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card-feature {
  background: rgba(18, 23, 38, .75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform .18s ease, border-color .18s ease;
}

.card-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 194, 75, .35);
}

.card-feature h4 {
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-feature p {
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.evolution-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(240, 194, 75, .1);
  border: 1px solid rgba(240, 194, 75, .25);
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 8px;
}

/* 5 大核心数据指标卡片 */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 28px 0 16px;
  width: 100%;
}

.stat-card {
  background: linear-gradient(145deg, rgba(14, 26, 54, .8), rgba(9, 18, 40, .85));
  border: 1px solid rgba(240, 194, 75, .16);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 194, 75, .4);
  box-shadow: 0 8px 24px rgba(240, 194, 75, .12);
}

.stat-number {
  display: block;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 4px;
}

/* 18 属性色彩胶囊药丸体系 */
.type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #fff;
  line-height: 1.2;
}

.type-grass { background: #4ca31f; }
.type-fire { background: #e83823; }
.type-water { background: #2682f5; }
.type-electric { background: #e5b300; color: #111; }
.type-normal { background: #88939c; }
.type-ice { background: #32bde6; color: #111; }
.type-fighting { background: #d92b5a; }
.type-poison { background: #8e36b8; }
.type-ground { background: #965a25; }
.type-flying { background: #74aef0; color: #111; }
.type-psychic { background: #ea3672; }
.type-bug { background: #8d9b1b; }
.type-rock { background: #a59e74; color: #111; }
.type-ghost { background: #683c6b; }
.type-dragon { background: #4d57dc; }
.type-dark { background: #473a38; }
.type-steel { background: #5798ab; }
.type-fairy { background: #e565db; }

/* 像素精灵展示盒 */
.sprite-showcase {
  background: rgba(10, 18, 38, .75);
  border: 1px solid rgba(240, 194, 75, .2);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}

.sprite-showcase-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.sprite-showcase-title strong {
  color: var(--gold);
}

.sprite-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 10px;
  align-items: center;
}

.sprite-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 6px;
  padding: 8px 4px;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.sprite-avatar-wrap:hover {
  transform: translateY(-2px);
  background: rgba(240, 194, 75, .08);
  border-color: rgba(240, 194, 75, .3);
}

.pokemon-pixel-img {
  image-rendering: pixelated;
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
}

.sprite-name-tiny {
  font-size: .68rem;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 宝可梦卡片网格系统（用于 Starters / Wiki / Best Pokemon） */
.pokemon-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.pokemon-roster-card {
  background: linear-gradient(160deg, rgba(14, 24, 48, .9) 0%, rgba(9, 15, 34, .95) 100%);
  border: 1px solid rgba(240, 194, 75, .15);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.pokemon-roster-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 194, 75, .45);
  box-shadow: 0 10px 24px rgba(240, 194, 75, .1);
}

.pokemon-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  opacity: .8;
}

.pokemon-card-role {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(240, 194, 75, .15);
  color: var(--gold);
}

.pokemon-card-role.legendary {
  background: rgba(230, 40, 41, .2);
  color: #ff6b6b;
  border: 1px solid rgba(230, 40, 41, .3);
}

.pokemon-card-sprite {
  image-rendering: pixelated;
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin: 12px 0 8px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
  transition: transform .2s ease;
}

.pokemon-roster-card:hover .pokemon-card-sprite {
  transform: scale(1.12);
}

.pokemon-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.pokemon-card-region {
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.pokemon-card-types {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pokemon-card-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  width: 100%;
}

