/* ============================================================
   PG娱乐 · 共享样式表 / assets/site.css
   深空黑 × 经幡五色 × 电子青 / 霓虹紫
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --ink: #070A14;
  --ink-2: #0C1020;
  --nebula: #241A46;
  --flag-blue: #2E5FA8;
  --flag-red: #B8384A;
  --flag-green: #2F7A5B;
  --flag-yellow: #E8B84B;
  --cyan: #35E0D6;
  --violet: #A25BFF;
  --paper: #F2F5F7;
  --mist: #9AA4B2;

  --line: rgba(242, 245, 247, 0.12);
  --line-strong: rgba(53, 224, 214, 0.42);
  --zone: var(--nebula);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 44px -30px rgba(0, 0, 0, 0.95);
  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(120% 70% at 12% -10%, rgba(36, 26, 70, 0.85), transparent 62%),
    radial-gradient(90% 60% at 92% 4%, rgba(46, 95, 168, 0.22), transparent 60%),
    var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
:where([id]) { scroll-margin-top: 96px; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.section { padding-block: clamp(48px, 8vw, 104px); }
.section--tight { padding-block: clamp(32px, 5vw, 64px); }

.prose { max-width: 34em; color: rgba(242, 245, 247, 0.78); }
.prose p + p { margin-top: 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--mist);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
}

.section-title {
  margin-top: 12px;
  font-size: clamp(1.55rem, 3.2vw, 2.45rem);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.01em;
}
.section-title::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.4s var(--ease);
}
[data-section].is-active .section-title::after { width: 72px; }
[data-section] .section-title { transition: color 0.32s var(--ease); }

.lede {
  margin-top: 16px;
  max-width: 34em;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: rgba(242, 245, 247, 0.76);
}

.mono, .stat-value { font-family: var(--font-mono); letter-spacing: 0.04em; }
.stat-value { font-weight: 700; color: var(--flag-yellow); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}
.breadcrumb a { color: rgba(242, 245, 247, 0.72); transition: color 0.24s var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb__sep { color: rgba(154, 164, 178, 0.45); }

/* ---------- 首屏骨架（页面层可扩展） ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 10vw, 132px) clamp(40px, 7vw, 88px);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% 30%;
  background:
    radial-gradient(45% 60% at 14% 30%, color-mix(in srgb, var(--zone) 70%, transparent), transparent 70%),
    radial-gradient(40% 55% at 86% 12%, rgba(53, 224, 214, 0.16), transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.page-hero > * { position: relative; z-index: 1; }

.page-hero__index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--flag-yellow);
}
.page-hero__title {
  margin-top: 14px;
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.page-hero__lede {
  margin-top: 20px;
  max-width: 30em;
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: rgba(242, 245, 247, 0.74);
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }

@media (min-width: 960px) {
  .grid--diag { grid-template-columns: 7fr 5fr; align-items: center; }
  .grid--diag-rev { grid-template-columns: 5fr 7fr; align-items: center; }
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(36, 26, 70, 0.6), rgba(7, 10, 20, 0.78));
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}
.card__title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.card__text {
  margin-top: 10px;
  font-size: 0.94rem;
  color: rgba(242, 245, 247, 0.72);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.tag--violet { color: var(--violet); }
.tag--yellow { color: var(--flag-yellow); }
.tag--red {
  color: #FF8A9A;
  border-color: rgba(184, 56, 74, 0.6);
  background: rgba(184, 56, 74, 0.16);
}
.tag--green {
  color: #7ED2AC;
  border-color: rgba(47, 122, 91, 0.62);
  background: rgba(47, 122, 91, 0.18);
}

/* ---------- 按钮 ---------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease),
    background 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.btn--cyan {
  background: linear-gradient(120deg, var(--cyan), #7AF2E8);
  color: #04121A;
  box-shadow: 0 10px 26px -16px rgba(53, 224, 214, 0.95);
}
.btn--cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(53, 224, 214, 1);
}
.btn--ghost {
  color: var(--paper);
  background: rgba(162, 91, 255, 0.1);
  border-color: rgba(162, 91, 255, 0.5);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  background: rgba(162, 91, 255, 0.2);
  border-color: var(--violet);
}

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 120% at 18% 0%, rgba(46, 95, 168, 0.5), transparent 60%),
    radial-gradient(100% 100% at 92% 100%, rgba(162, 91, 255, 0.42), transparent 64%),
    var(--nebula);
}
.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(242, 245, 247, 0.07);
  pointer-events: none;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }

/* ---------- 横向主题带 ---------- */
.band {
  display: flex;
  gap: 12px;
  padding-block: 18px;
  overflow-x: auto;
  border-block: 1px solid var(--line);
  scrollbar-width: thin;
}
.band__item {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(242, 245, 247, 0.8);
  background: rgba(36, 26, 70, 0.4);
}

/* ---------- 编号锚点索引 ---------- */
.anchor-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.anchor-index a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(242, 245, 247, 0.82);
  transition: border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.anchor-index a:hover { border-color: var(--line-strong); color: var(--cyan); }

/* ---------- 显现 ---------- */
[data-reveal][data-reveal-ready] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   头部
   ============================================================ */
.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: #04121A;
  font-size: 0.85rem;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(7, 10, 20, 0.97), rgba(7, 10, 20, 0.84));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 180% at 6% -60%, rgba(46, 95, 168, 0.34), transparent 58%),
    radial-gradient(90% 160% at 92% -70%, rgba(162, 91, 255, 0.3), transparent 62%);
  opacity: 0.7;
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  z-index: 2;
  background: rgba(242, 245, 247, 0.06);
}
.read-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--flag-yellow));
  transition: width 0.12s linear;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 10px var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}
.brand__mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: conic-gradient(from 210deg, var(--cyan), var(--violet), var(--flag-yellow), var(--flag-blue), var(--cyan));
  box-shadow: 0 0 0 1px rgba(242, 245, 247, 0.16), 0 0 18px -5px rgba(53, 224, 214, 0.6);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: var(--ink);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name {
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}
.brand__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
}
.brand__site { color: var(--mist); }
.version-badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px dashed rgba(232, 184, 75, 0.55);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--flag-yellow);
  white-space: nowrap;
}

/* 命令栏导航 */
.header-drawer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.cmd-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.cmd-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--mist);
  transition: color 0.24s var(--ease), background 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease);
}
.cmd-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(154, 164, 178, 0.7);
}
.cmd-nav__link:hover {
  color: var(--paper);
  border-color: var(--line);
  transform: translateY(-1px);
}
.cmd-nav__link[aria-current="page"] {
  color: #04121A;
  background: linear-gradient(120deg, var(--cyan), #7AF2E8);
  border-color: transparent;
  box-shadow: 0 0 22px -8px rgba(53, 224, 214, 0.9);
}
.cmd-nav__link[aria-current="page"] .cmd-nav__idx { color: rgba(7, 10, 20, 0.62); }

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 38px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(36, 26, 70, 0.55);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 16px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 10vw, 140px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(36, 26, 70, 0) 0%, rgba(36, 26, 70, 0.5) 38%, rgba(7, 10, 20, 1) 100%);
  color: var(--paper);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), var(--flag-yellow), transparent);
  opacity: 0.7;
}
.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 7vw, 76px) var(--gutter) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 20px;
}
.footer-brand { grid-column: 1 / -1; }
.footer-brand__name {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--paper);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .footer-brand__name {
    background: linear-gradient(100deg, var(--paper) 28%, var(--cyan) 68%, var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.footer-brand__line {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--mist);
}
.footer-closing {
  margin-top: 14px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.ftr-col__title {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--mist);
}
.ftr-col__list { display: flex; flex-direction: column; gap: 9px; }
.ftr-link {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(242, 245, 247, 0.82);
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}
.ftr-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.ftr-col__note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(154, 164, 178, 0.72);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  margin-top: clamp(34px, 5vw, 56px);
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(36, 26, 70, 0.42);
}
.footer-contact__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--flag-yellow);
}
.ftr-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}
.ftr-contact__item {
  font-size: 0.82rem;
  color: var(--mist);
}
.ftr-contact__val {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.ftr-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.ftr-legal .ftr-link { font-size: 0.82rem; }
.ftr-icp,
.ftr-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ============================================================
   响应式
   ============================================================ */
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1080px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }

  .header-drawer {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-left: 0;
    padding: 6px 0 16px;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }
  .header-drawer[data-open] { display: flex; }

  .cmd-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .cmd-nav__link {
    justify-content: flex-start;
    padding: 11px 14px;
    border-radius: 14px;
    border-color: var(--line);
    background: rgba(36, 26, 70, 0.4);
  }
  .hdr-actions { flex-direction: column; align-items: stretch; }
  .hdr-actions .btn { width: 100%; padding-block: 12px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand__sub { font-size: 10px; letter-spacing: 0.1em; }
  .footer-contact { padding: 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* 打印 */
@media print {
  .site-header, .skip-link, .read-progress { display: none; }
  body { background: #fff; color: #000; }
}

/* 减少动效 */
@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;
  }
  [data-reveal][data-reveal-ready] { opacity: 1; transform: none; }
  .card:hover, .btn:hover, .cmd-nav__link:hover { transform: none; }
}
