/* ============================================================
   爱游戏官网 / 共享样式 site.css
   高原夜蓝底 + 青海湖青交互 + 暖琥珀高亮
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; }
input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

:root {
  --night-900: #081522;
  --night-800: #0E2235;
  --night-700: #14304A;
  --lake-500: #2FB7B0;
  --lake-300: #6FD6CE;
  --amber-500: #FFB347;
  --amber-300: #FFD28A;
  --fog: #F2F7FA;
  --mute: #B9C8D4;
  --line: #2A4258;
  --league-clay: #C97B63;
  --league-moss: #7A9A7E;
  --league-indigo: #7C86B8;
  --league-sand: #C9A66B;
  --league-slate: #6F9BA3;

  --font-sans: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell-max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --glass: rgba(20, 48, 74, 0.62);
  --glass-strong: rgba(12, 29, 46, 0.94);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  line-height: 1.7;
  color: var(--fog);
  background-color: var(--night-900);
  background-image:
    radial-gradient(920px 480px at 12% -10%, rgba(47, 183, 176, 0.16), transparent 62%),
    radial-gradient(780px 420px at 94% 2%, rgba(255, 179, 71, 0.11), transparent 60%),
    radial-gradient(1200px 720px at 50% 118%, rgba(20, 48, 74, 0.85), transparent 72%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(90deg, rgba(42, 66, 88, 0.34) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(42, 66, 88, 0.2) 0 1px, transparent 1px 96px);
  -webkit-mask-image: radial-gradient(120% 88% at 50% 0%, #000 18%, transparent 78%);
  mask-image: radial-gradient(120% 88% at 50% 0%, #000 18%, transparent 78%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--fog);
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 4.4vw, 58px); }
h2 { font-size: clamp(23px, 2.6vw, 36px); }
h3 { font-size: clamp(18px, 1.5vw, 22px); }
p { text-wrap: pretty; }

a { color: var(--lake-300); transition: color 0.18s var(--ease); }
a:hover { color: var(--fog); }

:focus-visible {
  outline: 2px solid var(--amber-300);
  outline-offset: 3px;
  border-radius: 4px;
}

[id] { scroll-margin-top: 104px; }

/* ---------- 通用容器与排版 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: 70ch; }

.split-rail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
}

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: rgba(111, 214, 206, 0.22);
  -webkit-text-stroke: 1.5px rgba(111, 214, 206, 0.6);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn-primary {
  background: linear-gradient(180deg, var(--amber-300), var(--amber-500));
  color: #20140a;
  box-shadow: 0 10px 24px -14px rgba(255, 179, 71, 0.9);
}
.btn-primary:hover { color: #20140a; transform: translateY(-1px); }
.btn-lake {
  background: linear-gradient(180deg, var(--lake-300), var(--lake-500));
  color: #04211f;
  box-shadow: 0 10px 24px -14px rgba(47, 183, 176, 0.9);
}
.btn-lake:hover { color: #04211f; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(20, 48, 74, 0.5);
  border-color: rgba(111, 214, 206, 0.28);
  color: var(--fog);
}
.btn-ghost:hover {
  color: var(--fog);
  border-color: var(--lake-300);
  background: rgba(47, 183, 176, 0.16);
}

/* ---------- 标签 / 比分 / 图例 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47, 183, 176, 0.3);
  background: rgba(47, 183, 176, 0.12);
  color: var(--lake-300);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tag-amber {
  color: var(--amber-300);
  background: rgba(255, 179, 71, 0.14);
  border-color: rgba(255, 179, 71, 0.38);
}
.tag-mute {
  color: var(--mute);
  background: rgba(42, 66, 88, 0.35);
  border-color: rgba(42, 66, 88, 0.9);
}

.score-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.04em;
  color: var(--amber-300);
}

.league-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mute);
}
.league-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--league-slate);
}

.legend-swatch {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--league-slate);
}
.legend-swatch[data-league="clay"],
.league-chip[data-league="clay"]::before { background: var(--league-clay); }
.legend-swatch[data-league="moss"],
.league-chip[data-league="moss"]::before { background: var(--league-moss); }
.legend-swatch[data-league="indigo"],
.league-chip[data-league="indigo"]::before { background: var(--league-indigo); }
.legend-swatch[data-league="sand"],
.league-chip[data-league="sand"]::before { background: var(--league-sand); }
.legend-swatch[data-league="slate"],
.league-chip[data-league="slate"]::before { background: var(--league-slate); }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(42, 66, 88, 0.95);
  background: linear-gradient(180deg, var(--night-800), #0B1B2C);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { border-color: rgba(111, 214, 206, 0.42); }

.card-glass {
  background: var(--glass);
  border-color: rgba(111, 214, 206, 0.2);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.crumb { color: var(--mute); }
.crumb:hover { color: var(--lake-300); }
.crumb[aria-current="page"] { color: var(--fog); }
.crumb-sep { color: var(--line); }

/* ---------- 图片容器基础规则（页面阶段放占位） ---------- */
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(42, 66, 88, 0.9);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(47, 183, 176, 0.22), transparent 60%),
    linear-gradient(135deg, var(--night-700), var(--night-900));
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 48%, rgba(8, 21, 34, 0.72));
}

/* ---------- 入场浮现（JS 接管） ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ============================================================
   头部：桌面顶部悬浮胶囊 / 移动底部浮岛
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px var(--gutter) 0;
  transition: padding 0.22s var(--ease);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 300;
  transform: translate(-50%, -160%);
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--amber-300);
  color: #20140a;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: #20140a; }

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 24px);
  width: 100%;
  max-width: var(--shell-max);
  padding: 8px 10px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(111, 214, 206, 0.22);
  background: linear-gradient(180deg, rgba(20, 48, 74, 0.88), rgba(8, 21, 34, 0.74));
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(242, 247, 250, 0.06);
  transition: padding 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}

.site-header.is-condensed { padding-top: 6px; }
.site-header.is-condensed .header-shell {
  padding-block: 5px;
  border-color: rgba(111, 214, 206, 0.34);
  box-shadow: 0 22px 46px -22px rgba(0, 0, 0, 0.96), inset 0 1px 0 rgba(242, 247, 250, 0.09);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  color: var(--fog);
}
.brand:hover { color: var(--fog); }

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: conic-gradient(from 210deg, var(--lake-500), var(--lake-300) 38%, var(--amber-500) 76%, var(--lake-500));
  box-shadow: inset 0 0 0 1px rgba(8, 21, 34, 0.7);
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--night-900);
  transform: translate(-50%, -50%) rotate(45deg);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.brand-version {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lake-300);
}

/* 导航 */
.header-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
}
.nav-item { display: block; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--mute);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-link:hover { color: var(--fog); background: rgba(47, 183, 176, 0.14); }
.nav-link[aria-current="page"] {
  color: var(--night-900);
  background: linear-gradient(180deg, var(--lake-300), var(--lake-500));
  box-shadow: 0 8px 20px -12px rgba(47, 183, 176, 0.95);
}
.nav-link[aria-current="page"]:hover { color: var(--night-900); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-inline-start: auto;
}
.header-cta { padding: 9px 16px; font-size: 13px; }

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(111, 214, 206, 0.3);
  background: rgba(14, 34, 53, 0.92);
  color: var(--fog);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--lake-300); background: rgba(47, 183, 176, 0.18); }
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--lake-300);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.site-header[data-open] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle-label { display: inline-block; }

/* 阅读进度 */
.header-progress {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: min(calc(100% - 2 * var(--gutter)), var(--shell-max));
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: rgba(42, 66, 88, 0.7);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.24s var(--ease);
}
.site-header.is-condensed .header-progress { opacity: 1; }
.header-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lake-500), var(--amber-500));
  transition: width 0.1s linear;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 7vw, 96px);
  padding-block: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 32px);
  border-top: 1px solid rgba(42, 66, 88, 0.85);
  background: linear-gradient(180deg, rgba(8, 21, 34, 0) 0%, rgba(8, 21, 34, 0.7) 16%, rgba(8, 21, 34, 0.97) 100%);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(340px, 52%);
  height: 2px;
  background: linear-gradient(90deg, var(--lake-500), var(--amber-500), transparent);
}

.footer-inner { display: block; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.footer-brand .brand { padding-left: 0; }
.footer-summary {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--mute);
}

.footer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}
.footer-col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lake-300);
}
.footer-list { display: flex; flex-direction: column; gap: 2px; }
.footer-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--mute);
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}
.footer-link:hover { color: var(--fog); padding-left: 4px; }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px 28px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px dashed rgba(42, 66, 88, 0.95);
}
.footer-contact-line { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.footer-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lake-300);
}
.footer-v {
  font-size: 14px;
  color: var(--fog);
  word-break: break-word;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  margin-top: clamp(22px, 3vw, 30px);
  padding-top: 16px;
  border-top: 1px solid rgba(42, 66, 88, 0.6);
  font-size: 12.5px;
  color: var(--mute);
}
.footer-copy, .footer-icp, .footer-note { margin: 0; }
.footer-icp {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.footer-note { margin-inline-start: auto; color: rgba(185, 200, 212, 0.75); }

/* ============================================================
   平板
   ============================================================ */
@media (max-width: 1080px) {
  .nav-link { padding: 8px 9px; font-size: 13.5px; }
  .brand-version { display: none; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-summary { max-width: 52ch; }
}

/* ============================================================
   手机：底部浮岛
   ============================================================ */
@media (max-width: 880px) {
  .site-header {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
  }
  .site-header.is-condensed { padding-top: 0; }

  .header-shell {
    padding: 8px 10px 8px 12px;
    gap: 10px;
    border-radius: 20px;
    box-shadow: 0 -14px 40px -22px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(242, 247, 250, 0.07);
  }

  .brand-name { font-size: 16px; }

  .header-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    display: block;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(111, 214, 206, 0.24);
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 26px 54px -22px rgba(0, 0, 0, 0.96);
    max-height: min(64vh, 460px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transform-origin: bottom center;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  }
  .site-header[data-open] .header-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
    color: var(--fog);
    background: rgba(8, 21, 34, 0.45);
  }
  .nav-link:hover { background: rgba(47, 183, 176, 0.2); }
  .nav-link[aria-current="page"] {
    color: var(--night-900);
    background: linear-gradient(180deg, var(--lake-300), var(--lake-500));
  }

  .header-actions { margin-inline-start: auto; }
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-progress { display: none; }

  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-note { margin-inline-start: 0; }
}

@media (max-width: 520px) {
  .footer-links { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
