/* ============================================================
   PG游艺 · /assets/site.css
   共享外壳样式：reset / 变量 / 中文排版 / 头部 / 页脚 / 基础组件
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1200px 520px at 78% -12%, rgba(0, 224, 198, 0.10), transparent 68%),
    radial-gradient(900px 460px at 4% 8%, rgba(18, 49, 79, 0.55), transparent 70%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { max-width: 100%; }
img, svg, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #06121F;
  --ink-800: #0A1E33;
  --ink-700: #12314F;
  --cyan-500: #00E0C6;
  --cyan-300: #7CFFE9;
  --amber-500: #FF7A1A;
  --yellow-400: #FFC53D;
  --paper: #EAF2FF;
  --muted: #9FB3C8;
  --line: #1F4A66;

  --font-sans: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", ui-monospace,
    Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;

  --radius-pill: 999px;
  --radius-card: 18px;
  --radius-soft: 12px;

  --shadow-panel: 0 30px 80px -60px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(124, 255, 233, 0.07);
  --shadow-float: 0 26px 62px -34px rgba(0, 0, 0, 0.98), inset 0 1px 0 rgba(124, 255, 233, 0.12);
  --shadow-cyan: 0 14px 34px -16px rgba(0, 224, 198, 0.85);

  --shell: 1240px;
  --gutter: 20px;
}

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  color: var(--paper);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.2vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 25px); letter-spacing: -0.005em; }
h4 { font-size: 17px; font-weight: 800; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--cyan-300); text-decoration: none; }
a:hover { color: var(--cyan-500); }

strong, b { font-weight: 800; color: var(--paper); }
small { font-size: 13px; }

ul, ol { padding-left: 1.2em; }

::selection { background: rgba(0, 224, 198, 0.3); color: #FFFFFF; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.lede {
  max-width: 64ch;
  margin: 0 0 1.2em;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--cyan-300);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan-500);
}

/* ---------- 4. 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--yellow-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 20px;
  z-index: 300;
  padding: 12px 22px;
  border-radius: 0 0 14px 14px;
  background: var(--yellow-400);
  color: #2A1A00;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-130%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: #2A1A00;
}

#main-content { scroll-margin-top: 120px; }

/* ---------- 5. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shell-narrow { max-width: 860px; }

.section { padding: 56px 0; }

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

.divider {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: linear-gradient(90deg, var(--line), rgba(31, 74, 102, 0));
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
    color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn-primary {
  background: var(--cyan-500);
  color: #04212A;
  box-shadow: var(--shadow-cyan);
}
.btn-primary:hover {
  background: var(--cyan-300);
  color: #04212A;
  transform: translateY(-2px);
}

.btn-amber {
  background: var(--amber-500);
  color: #2A1000;
  box-shadow: 0 14px 34px -16px rgba(255, 122, 26, 0.85);
}
.btn-amber:hover { background: var(--yellow-400); color: #2A1000; transform: translateY(-2px); }

.btn-quiet {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn-quiet:hover {
  color: var(--cyan-300);
  border-color: rgba(0, 224, 198, 0.55);
  transform: translateY(-2px);
}

/* ---------- 7. 徽章 / 卡片 / 面板 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(18, 49, 79, 0.6);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.badge-cyan {
  color: var(--cyan-300);
  border-color: rgba(0, 224, 198, 0.4);
  background: rgba(0, 224, 198, 0.1);
}
.badge-amber {
  color: #FFD3AC;
  border-color: rgba(255, 122, 26, 0.42);
  background: rgba(255, 122, 26, 0.12);
}
.badge-yellow {
  color: #FFE6A6;
  border-color: rgba(255, 197, 61, 0.42);
  background: rgba(255, 197, 61, 0.12);
}

.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(10, 30, 51, 0.92), rgba(6, 18, 31, 0.86));
  box-shadow: 0 24px 60px -48px rgba(0, 0, 0, 1);
}
.card-title { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.card-text { margin: 0; color: var(--muted); font-size: 15px; }

.panel {
  position: relative;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(10, 30, 51, 0.94), rgba(6, 18, 31, 0.9));
  box-shadow: var(--shadow-panel);
}

.panel-accent::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(22px, 3vw, 36px);
  right: 40%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan-500), rgba(0, 224, 198, 0));
}

/* ---------- 8. 面包屑 ---------- */
.crumbs {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cyan-300); }
.crumbs [aria-current="page"] { color: var(--paper); font-weight: 600; }

/* ---------- 9. 图片容器基础规则（页面阶段使用） ---------- */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(150deg, var(--ink-700), var(--ink-900));
  box-shadow: 0 24px 60px -50px rgba(0, 0, 0, 1);
}
.media > img,
.media > svg,
.media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-ratio-16x9 { aspect-ratio: 16 / 9; }
.media-ratio-4x3 { aspect-ratio: 4 / 3; }
.media-ratio-1x1 { aspect-ratio: 1 / 1; }
.media-ratio-3x4 { aspect-ratio: 3 / 4; }
.media-slot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: rgba(159, 179, 200, 0.72);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-align: center;
}
.media-cap {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(6, 18, 31, 0.78);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 10. 头部：悬浮胶囊导航 ---------- */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 14px var(--gutter) 0;
  background: linear-gradient(
    180deg,
    rgba(6, 18, 31, 0.96) 0%,
    rgba(6, 18, 31, 0.72) 62%,
    rgba(6, 18, 31, 0) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-island {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 30, 51, 0.8);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }

.brand-mark {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: var(--radius-soft);
  background: linear-gradient(135deg, var(--cyan-500), var(--cyan-300));
  color: #04212A;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(0, 224, 198, 0.45), 0 10px 24px -12px rgba(0, 224, 198, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.brand-name { font-size: 17px; font-weight: 900; letter-spacing: 0.02em; }
.brand-tag {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  display: inline-block;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.nav-link:hover {
  color: var(--paper);
  background: rgba(18, 49, 79, 0.85);
}
.nav-link[aria-current="page"] {
  color: var(--cyan-300);
  background: rgba(0, 224, 198, 0.13);
  box-shadow: inset 0 0 0 1px rgba(0, 224, 198, 0.35);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(18, 49, 79, 0.85);
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.nav-toggle:hover { border-color: rgba(0, 224, 198, 0.55); color: var(--cyan-300); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color 0.2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.nav-shell[data-open] .nav-toggle-bars { background: transparent; }
.nav-shell[data-open] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-shell[data-open] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 10% -18%, rgba(0, 224, 198, 0.12), transparent 70%),
    radial-gradient(700px 320px at 92% 108%, rgba(255, 122, 26, 0.1), transparent 70%),
    linear-gradient(180deg, var(--ink-800), var(--ink-900));
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: 36px;
  align-items: start;
}

.footer-brandline {
  margin: 0 0 12px;
  color: var(--paper);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.footer-note {
  max-width: 36ch;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.footer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 13px;
  border: 1px solid rgba(255, 197, 61, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(255, 197, 61, 0.1);
  color: #FFE6A6;
  font-size: 12px;
  font-weight: 600;
}
.footer-chip .mono { color: var(--yellow-400); font-weight: 700; }

.footer-h {
  margin: 0 0 14px;
  color: var(--cyan-300);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-list a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer-list a:hover { color: var(--cyan-300); }
.footer-list li { display: flex; flex-direction: column; gap: 3px; }

.footer-list-plain li { gap: 4px; }
.footer-label {
  color: rgba(159, 179, 200, 0.75);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.footer-strong {
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-legal { margin: 0; color: var(--muted); }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--cyan-300); }
.footer-icp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---------- 12. JS 生成的界面元素 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-500), var(--yellow-400));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 30, 51, 0.9);
  color: var(--cyan-300);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease,
    border-color 0.22s ease, color 0.22s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.to-top:hover { border-color: rgba(0, 224, 198, 0.6); color: var(--cyan-500); }
.to-top.is-on { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- 13. 显现动效 ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}
html.has-js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1120px) {
  .brand-tag { display: none; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 1000px) {
  :root { --gutter: 16px; }

  .nav-island {
    flex-wrap: wrap;
    row-gap: 0;
    padding: 10px 12px;
    border-radius: 26px;
  }
  .nav-toggle { display: inline-flex; }
  .nav {
    order: 3;
    flex: 1 1 100%;
    display: none;
    justify-content: flex-start;
    min-width: 0;
  }
  .nav-shell[data-open] .nav {
    display: block;
    padding: 10px 2px 4px;
    border-top: 1px solid var(--line);
    margin-top: 10px;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-link {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
  }
  .nav-actions .btn { padding: 9px 14px; font-size: 13px; }

  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }

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

@media (max-width: 720px) {
  body { font-size: 15.5px; }

  .section { padding: 40px 0; }

  .site-footer { margin-top: 56px; padding: 44px 0 24px; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 32px;
  }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }

  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-note { max-width: none; }

  .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 400px) {
  .nav-actions .btn { display: none; }
  .brand-mark { font-size: 12px; padding: 6px 9px; }
  .brand-name { font-size: 16px; }
}

/* ---------- 15. 降低动态效果 ---------- */
@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;
    transition-delay: 0ms !important;
  }

  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .to-top { transform: none; }
}
