/* ============================================================
   乐鱼赛事 · V2.0 中文站 — 共享站点样式 /assets/site.css
   夜间球场数据边框：深海蓝 + 墨绿渐变 + 电光青细线 + 珊瑚橙行动
   ============================================================ */

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

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

body,
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, picture, svg, video { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --deep: #071C2F;
  --moss: #0B2A24;
  --cyan: #35E6E0;
  --coral: #FF6B4A;
  --pitch: #0E1720;
  --blueprint-line: #2B5263;
  --ice: #F3F8F6;
  --mist: #9CB5B1;
  --sand: #E7D6BD;
  --state-green: #5BE49B;

  --radius-panel: 24px;
  --radius-card: 20px;
  --radius-pill: 999px;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --bp: 900px;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基础排版与底色 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ice);
  background-color: var(--deep);
  background-image:
    radial-gradient(120% 78% at 88% -12%, rgba(53, 230, 224, .10), rgba(7, 28, 47, 0) 62%),
    radial-gradient(96% 72% at -6% 104%, rgba(11, 42, 36, .92), rgba(7, 28, 47, 0) 68%),
    linear-gradient(178deg, #071C2F 0%, #08202B 46%, #0B2A24 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.012em;
  color: var(--ice);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); }
h2 { font-size: clamp(1.5rem, 2.9vw, 2.15rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
h4 { font-size: 1.02rem; }

p {
  margin-bottom: 1em;
  color: rgba(243, 248, 246, .84);
}

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

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }

strong, b { font-weight: 800; color: var(--ice); }

small { font-size: .82rem; }

::selection {
  background: rgba(53, 230, 224, .28);
  color: var(--ice);
}

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

#main-content {
  display: block;
  padding-block-start: clamp(18px, 3.5vw, 40px);
}

#main-content:focus { outline: none; }

/* ---------- 4. 文字工具 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.serif-label {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--sand);
  letter-spacing: .02em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

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

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}

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

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

.grid--sidebar { grid-template-columns: minmax(230px, 320px) minmax(0, 1fr); }

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

@media (min-width: 901px) {
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: 1 / -1; }
}

.blueprint-bg {
  background-image:
    linear-gradient(rgba(43, 82, 99, .30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 82, 99, .30) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
}

.slant {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 48px), 0 100%);
}

/* ---------- 6. 按钮 / 胶囊标签 / 面板 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: .94rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease);
}

.btn-primary {
  background: var(--coral);
  color: #2A0D06;
  box-shadow: 0 14px 28px -18px rgba(255, 107, 74, .95);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -18px rgba(255, 107, 74, 1);
}

.btn-ghost {
  background: rgba(53, 230, 224, .04);
  border-color: rgba(53, 230, 224, .5);
  color: var(--cyan);
}

.btn-ghost:hover {
  background: rgba(53, 230, 224, .12);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(43, 82, 99, .95);
  border-radius: var(--radius-pill);
  background: rgba(14, 23, 32, .72);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip--cyan {
  border-color: rgba(53, 230, 224, .55);
  color: var(--cyan);
}

.chip--accent {
  border-color: rgba(255, 107, 74, .62);
  color: var(--coral);
}

.chip--state {
  border-color: rgba(91, 228, 155, .6);
  color: var(--state-green);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 30px);
  border: 1px solid rgba(43, 82, 99, .85);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(158deg, rgba(14, 23, 32, .96) 0%, rgba(11, 42, 36, .78) 100%);
  transition: border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease);
}

.panel:hover {
  border-color: rgba(53, 230, 224, .58);
  transform: translateY(-3px);
  box-shadow: 0 26px 48px -34px rgba(0, 0, 0, .95);
}

/* ---------- 7. 章节编号 ---------- */
.sec-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(12px, 2vw, 22px);
  align-items: baseline;
}

.sec-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.02em;
  color: rgba(53, 230, 224, .16);
  -webkit-text-stroke: 1px rgba(53, 230, 224, .5);
  transition: color .3s var(--ease), -webkit-text-stroke-color .3s var(--ease);
}

[data-chapter].is-current .sec-num {
  color: var(--cyan);
  -webkit-text-stroke-color: transparent;
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(18px, 3vw, 30px);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mist);
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(43, 82, 99, 1);
}

.breadcrumbs a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.breadcrumbs a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(53, 230, 224, .7);
}

.breadcrumbs [aria-current="page"] { color: var(--ice); }

/* ---------- 9. 图片容器基础 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(43, 82, 99, .85);
  border-radius: var(--radius-panel);
  background: linear-gradient(142deg, var(--pitch) 0%, var(--moss) 100%);
  isolation: isolate;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.06);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(243, 248, 246, .16);
  border-radius: calc(var(--radius-panel) - 10px);
  pointer-events: none;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(200deg, rgba(53, 230, 224, .20) 0%, rgba(7, 28, 47, 0) 44%, rgba(255, 107, 74, .20) 100%),
    radial-gradient(122% 92% at 50% 118%, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0) 62%);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--mist);
}

/* ---------- 10. 阅读进度 ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--coral) 100%);
  pointer-events: none;
  transition: transform .09s linear;
}

/* ---------- 11. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .62s var(--ease), transform .62s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 页头：蓝图导轨 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background:
    linear-gradient(180deg, rgba(7, 28, 47, .98) 0%, rgba(7, 28, 47, .90) 100%);
  border-bottom: 1px solid rgba(43, 82, 99, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header::after {
  content: "";
  display: block;
  height: 9px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(53, 230, 224, .30) 0 1px,
    transparent 1px 32px
  );
  opacity: .72;
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 13px var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -72px;
  z-index: 120;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--cyan);
  color: #04222B;
  font-weight: 800;
  font-size: .9rem;
  text-decoration: none;
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}

/* 品牌锁定 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 4px 6px 4px 4px;
  border-radius: 16px;
  color: var(--ice);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(53, 230, 224, .58);
  border-radius: 14px;
  background:
    radial-gradient(circle at 32% 24%, rgba(53, 230, 224, .26), rgba(7, 28, 47, 0) 72%),
    rgba(14, 23, 32, .9);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mist);
}

/* 导航：框架编号 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  counter-reset: navidx;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  counter-reset: navidx;
}

.site-nav li {
  counter-increment: navidx;
  display: flex;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--mist);
  font-size: .89rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease),
              background-color .18s var(--ease);
}

.site-nav a::before {
  content: counter(navidx, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .08em;
  color: rgba(43, 82, 99, 1);
  transition: color .18s var(--ease);
}

.site-nav a:hover {
  color: var(--ice);
  border-color: rgba(53, 230, 224, .35);
  background: rgba(53, 230, 224, .06);
}

.site-nav a:hover::before { color: var(--cyan); }

.site-nav a[aria-current="page"] {
  color: var(--ice);
  border-color: rgba(53, 230, 224, .72);
  background: rgba(53, 230, 224, .09);
}

.site-nav a[aria-current="page"]::before { color: var(--cyan); }

.header-cta {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: .86rem;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 16px;
  border: 1px solid rgba(53, 230, 224, .45);
  border-radius: var(--radius-pill);
  background: rgba(14, 23, 32, .78);
  color: var(--ice);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: rgba(53, 230, 224, .10);
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.nav-toggle-text { line-height: 1; }

/* 桌面蓝图外框 */
@media (min-width: 1100px) {
  body::before,
  body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 40;
    width: 1px;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(43, 82, 99, 0) 0%,
      rgba(43, 82, 99, .85) 14%,
      rgba(43, 82, 99, .85) 86%,
      rgba(43, 82, 99, 0) 100%
    );
    opacity: .6;
  }

  body::before { left: 16px; }
  body::after { right: 16px; }
}

/* 平板：压缩导航 */
@media (max-width: 1080px) {
  .site-nav a { padding: 9px 10px; font-size: .84rem; }
  .site-nav a::before { display: none; }
  .header-cta { display: none; }
}

/* 移动：导航变边框面板 */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(100% + 8px);
    display: block;
    padding: 12px;
    border: 1px solid rgba(53, 230, 224, .30);
    border-radius: var(--radius-panel);
    background:
      linear-gradient(180deg, rgba(11, 42, 36, .99) 0%, rgba(7, 28, 47, .99) 100%);
    box-shadow: 0 30px 64px -28px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    max-height: min(72vh, 540px);
    overflow-y: auto;
    transition: opacity .2s var(--ease), transform .2s var(--ease),
                visibility .2s var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav a {
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: .95rem;
  }

  .site-nav a::before { display: inline; }
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(52px, 9vw, 104px);
  border-top: 1px solid rgba(43, 82, 99, .95);
  background:
    linear-gradient(180deg, rgba(11, 42, 36, .88) 0%, rgba(7, 28, 47, 1) 100%);
  color: var(--mist);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(53, 230, 224, .26) 0 1px,
    transparent 1px 32px
  );
  opacity: .7;
  pointer-events: none;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(140px, .9fr)) minmax(210px, 1.15fr);
  gap: clamp(26px, 4vw, 48px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(38px, 6vw, 72px) var(--gutter) clamp(26px, 4vw, 40px);
}

.footer-brand .brand { padding-left: 0; }

.footer-note {
  margin-top: 16px;
  max-width: 32ch;
  font-size: .92rem;
  line-height: 1.8;
  color: rgba(156, 181, 177, .94);
}

.footer-stamp {
  margin-top: 14px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(53, 230, 224, .8);
}

.footer-col { min-width: 0; }

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.footer-list a {
  display: inline-block;
  color: var(--ice);
  font-size: .94rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-list a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(53, 230, 224, .7);
}

.footer-list--plain span {
  display: inline-block;
  font-size: .9rem;
  line-height: 1.7;
  color: rgba(243, 248, 246, .82);
  word-break: break-word;
}

.footer-contact .footer-list { gap: 12px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 18px var(--gutter) clamp(26px, 4vw, 38px);
  border-top: 1px solid rgba(43, 82, 99, .62);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: rgba(156, 181, 177, .86);
}

.footer-bottom-item { margin: 0; color: inherit; }

.footer-bottom-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: inherit;
}

.footer-bottom-links a {
  color: rgba(243, 248, 246, .86);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-bottom-links a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(53, 230, 224, .7);
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

/* ---------- 14. 响应式网格收敛 ---------- */
@media (max-width: 900px) {
  .grid--two,
  .grid--three,
  .grid--sidebar,
  .grid--blueprint { grid-template-columns: 1fr; }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 { grid-column: auto; }
}

/* ---------- 15. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .read-progress { transition: none; }

  .panel:hover,
  .btn:hover { transform: none; }
}
