/* ============================================================
   乐鱼赛场 · 共享样式表  /assets/site.css
   夜间球场控制台：深海蓝底 / 荧光青数据 / 珊瑚橙动势 / 电光紫入口
   ============================================================ */

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, dl, dt, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --abyss: #061320;
  --panel: #0C2338;
  --grid: #16374F;
  --cyan: #2BE8C8;
  --coral: #FF6B4A;
  --violet: #9B7BFF;
  --ice: #EAF6FF;
  --mist: #8FA9BE;
  --amber: #FFC24B;
  --online: #24D07A;

  --rail-w: 104px;
  --mast-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1360px;

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

  --scroll-progress: 0;
}

/* ---------- 3. 基础排版 ---------- */
html { background: var(--abyss); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-height: 100vh;
  padding-top: var(--mast-h);
  padding-bottom: 88px;
  background-color: var(--abyss);
  background-image:
    linear-gradient(rgba(22, 55, 79, .5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 55, 79, .5) 1px, transparent 1px);
  background-size: 128px 128px;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 900; letter-spacing: -.02em; line-height: 1.15; }
p { max-width: 62ch; }

.num, .rail-nav__num, .rail-foot__chapter-num, .card__score, .section__index {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

#main-content { scroll-margin-top: 20px; }
[data-section] { scroll-margin-top: 84px; }

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

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 300;
  transform: translateY(-180%);
  background: var(--cyan); color: #03231d;
  padding: 12px 18px; font-size: 14px; font-weight: 800; letter-spacing: .06em;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 4. 头部：左侧轨道 / 移动抽屉 ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  height: var(--mast-h);
  background: #071826;
  border-bottom: 1px solid var(--grid);
}

.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 var(--gutter);
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__cn { font-family: var(--font-head); font-size: 19px; font-weight: 900; letter-spacing: .08em; color: var(--ice); }
.brand__en { font-family: var(--font-num); font-size: 10px; letter-spacing: .3em; color: var(--cyan); text-transform: uppercase; }

/* 移动菜单按钮：右下角拇指区 */
.nav-toggle {
  position: fixed; right: 14px; bottom: 14px; z-index: 131;
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 52px; min-height: 52px; padding: 0 16px;
  background: var(--panel);
  border: 1px solid var(--cyan);
  color: var(--ice);
  font-size: 13px; letter-spacing: .16em;
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; justify-content: space-between; width: 18px; height: 12px; }
.nav-toggle__bars i { display: block; height: 1.5px; background: var(--cyan); transition: transform .22s ease, opacity .22s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] { border-color: var(--coral); }

/* 抽屉本体 */
[data-nav] {
  position: fixed; left: 10px; right: 10px; bottom: 80px; z-index: 121;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--panel) 0%, #08192b 100%);
  border: 1px solid var(--grid);
  border-top: 2px solid var(--cyan);
  opacity: 0; visibility: hidden;
  transform: translateY(calc(100% + 24px));
  transition: transform .34s cubic-bezier(.2,.8,.2,1), opacity .22s ease, visibility .34s linear;
}
[data-nav][data-open] { opacity: 1; visibility: visible; transform: translateY(0); }

.rail-nav__list { display: flex; flex-direction: column; }
.rail-nav__item + .rail-nav__item { border-top: 1px solid var(--grid); }
.rail-nav__link {
  display: flex; align-items: center; gap: 14px;
  min-height: 52px; padding: 6px 4px;
  color: var(--ice); font-size: 16px;
}
.rail-nav__num { font-size: 12px; letter-spacing: .1em; color: var(--mist); }
.rail-nav__label { letter-spacing: .04em; }
.rail-nav__link[aria-current="page"] { color: var(--cyan); }
.rail-nav__link[aria-current="page"] .rail-nav__num { color: var(--cyan); }
.rail-nav__link[aria-current="page"]::after { content: ""; margin-left: auto; width: 26px; height: 1px; background: var(--cyan); }

/* 底部三键簇 */
.rail-foot {
  position: fixed; right: 78px; bottom: 14px; z-index: 130;
  display: flex; flex-direction: row; align-items: center; gap: 8px;
}
.rail-foot__cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 16px;
  background: var(--violet); color: #F4F0FF;
  font-size: 13px; font-weight: 800; letter-spacing: .06em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}
.rail-foot__chapter { display: none; }
.rail-foot__top {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; min-height: 52px;
  border: 1px solid var(--grid); color: var(--mist);
  font-size: 11px; letter-spacing: .16em;
  transition: border-color .2s ease, color .2s ease, opacity .2s ease;
  opacity: .45;
}
.rail-foot__top.is-on { opacity: 1; color: var(--ice); border-color: rgba(43, 232, 200, .5); }
.rail-foot__top-arrow { font-family: var(--font-num); font-size: 16px; }
.rail-foot__top-text { display: none; }

/* 进度线 */
.rail-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 132; background: rgba(22, 55, 79, .8); }
.rail-progress__fill {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--coral));
  transform: scaleX(var(--scroll-progress));
  transform-origin: left center;
}

/* 抽屉打开时锁定滚动 */
body.nav-open { overflow: hidden; }

/* ---------- 5. 桌面：左侧轨道 ---------- */
@media (min-width: 1024px) {
  body { padding-top: 0; padding-bottom: 0; padding-left: var(--rail-w); }
  [data-section] { scroll-margin-top: 24px; }

  .site-header {
    top: 0; left: 0; right: auto; bottom: 0;
    width: var(--rail-w); height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; align-items: stretch;
    border-bottom: 0; border-right: 1px solid var(--grid);
    background: linear-gradient(180deg, #08192b 0%, var(--abyss) 58%);
  }

  .site-header__bar {
    flex-direction: column; align-items: center; justify-content: flex-start;
    gap: 14px; height: auto; padding: 24px 6px 18px;
    border-bottom: 1px solid var(--grid);
  }
  .brand { flex-direction: column; gap: 12px; }
  .brand__cn { writing-mode: vertical-rl; font-size: 21px; letter-spacing: .3em; }
  .brand__en { writing-mode: vertical-rl; font-size: 9px; letter-spacing: .36em; }

  .nav-toggle { display: none; }

  [data-nav] {
    position: static; left: auto; right: auto; bottom: auto;
    flex: 1 1 auto;
    max-height: none; overflow-y: auto;
    padding: 14px 9px;
    background: none; border: 0;
    opacity: 1; visibility: visible; transform: none;
    transition: none;
  }

  .rail-nav__list { gap: 2px; }
  .rail-nav__item + .rail-nav__item { border-top: 0; }
  .rail-nav__link {
    flex-direction: column; gap: 4px;
    min-height: 0; padding: 10px 4px;
    border-left: 2px solid transparent;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
  }
  .rail-nav__link::after { display: none; }
  .rail-nav__link:hover { background: rgba(43, 232, 200, .07); }
  .rail-nav__link[aria-current="page"] {
    border-left-color: var(--cyan);
    background: linear-gradient(90deg, rgba(43, 232, 200, .16), rgba(43, 232, 200, 0));
  }
  .rail-nav__num { font-size: 10px; letter-spacing: .12em; }
  .rail-nav__label { font-size: 12.5px; line-height: 1.3; text-align: center; }

  .rail-foot {
    position: static; right: auto; bottom: auto;
    flex-direction: column; align-items: stretch; gap: 10px;
    padding: 14px 10px 18px;
    border-top: 1px solid var(--grid);
  }
  .rail-foot__cta { min-height: 0; padding: 11px 8px; font-size: 12.5px; text-align: center; line-height: 1.3; }
  .rail-foot__chapter {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding-top: 4px;
  }
  .rail-foot__chapter-label { font-size: 10px; letter-spacing: .2em; color: var(--mist); }
  .rail-foot__chapter-num { font-size: 20px; font-weight: 700; color: var(--cyan); line-height: 1; }
  .rail-foot__top { min-height: 38px; min-width: 0; width: 100%; border-color: var(--grid); }
  .rail-foot__top-arrow { display: none; }
  .rail-foot__top-text { display: inline; }

  .rail-progress {
    position: absolute; top: 0; left: auto; right: 0; bottom: auto;
    width: 2px; height: 100%;
    background: rgba(22, 55, 79, .7);
  }
  .rail-progress__fill {
    background: linear-gradient(180deg, var(--cyan), var(--violet));
    transform: scaleY(var(--scroll-progress));
    transform-origin: center top;
  }
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 128px);
  padding-top: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--grid);
  background: linear-gradient(180deg, #071726 0%, #040D17 100%);
  font-size: 14px;
}
.site-footer__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr; gap: 34px;
}
.site-footer__mark { font-family: var(--font-head); font-size: 22px; font-weight: 900; letter-spacing: .1em; color: var(--ice); }
.site-footer__mark-en { margin-top: 6px; font-family: var(--font-num); font-size: 10px; letter-spacing: .38em; color: var(--cyan); }
.site-footer__note {
  margin-top: 16px; max-width: 30ch;
  padding-left: 12px; border-left: 1px solid var(--grid);
  font-size: 12.5px; line-height: 1.8; color: var(--mist);
}
.site-footer__nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.site-footer__col { padding-left: 14px; border-left: 1px solid var(--grid); }
.site-footer__heading {
  margin-bottom: 10px;
  font-family: var(--font-num); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; color: var(--cyan); text-transform: uppercase;
}
.site-footer__list { display: flex; flex-direction: column; }
.site-footer__link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 13.5px; color: #C9DCED;
  transition: color .18s ease, transform .18s ease;
}
.site-footer__link:hover { color: var(--cyan); transform: translateX(3px); }
.site-footer__contact { padding-top: 20px; border-top: 1px solid var(--grid); }
.site-footer__meta { display: grid; gap: 14px; }
.site-footer__meta dt { font-family: var(--font-num); font-size: 10px; letter-spacing: .2em; color: var(--mist); }
.site-footer__meta dd { margin-top: 2px; font-size: 13.5px; line-height: 1.7; color: var(--ice); overflow-wrap: anywhere; }
.site-footer__tip {
  margin-top: 18px; padding-left: 10px; border-left: 2px solid var(--coral);
  font-size: 12px; line-height: 1.75; color: var(--mist);
}
.site-footer__legal {
  margin: clamp(28px, 4vw, 48px) auto 0;
  max-width: var(--maxw);
  padding: 18px var(--gutter) 26px;
  border-top: 1px solid var(--grid);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  font-family: var(--font-num); font-size: 11px; letter-spacing: .12em; color: var(--mist);
}

@media (min-width: 640px) {
  .site-footer__nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: 1.15fr 2.1fr 1.35fr; gap: clamp(24px, 4vw, 56px); }
  .site-footer__contact { padding-top: 0; padding-left: 20px; border-top: 0; border-left: 1px solid var(--grid); }
}

/* ---------- 7. 容器 / 网格 ---------- */
.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.shell--narrow { max-width: 860px; }
.shell--wide { max-width: 1560px; }

.grid { display: grid; gap: clamp(14px, 2.4vw, 24px); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--12 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1100px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
}

.divider { height: 1px; margin: 0; border: 0; background: var(--grid); }

/* ---------- 8. 编号章节 ---------- */
.section { position: relative; padding: clamp(46px, 7vw, 96px) 0; }
.section__head { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: clamp(24px, 3vw, 40px); }
.section__index {
  font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 700; line-height: .9;
  color: transparent; -webkit-text-stroke: 1px rgba(43, 232, 200, .5);
}
@supports not (-webkit-text-stroke: 1px #000) {
  .section__index { color: var(--cyan); }
}
.section__title { font-size: clamp(1.7rem, 4vw, 3rem); color: var(--ice); }
.section__note {
  padding-top: 8px; border-top: 1px solid var(--grid);
  font-size: 12px; line-height: 1.75; letter-spacing: .1em; color: var(--mist);
}
.section__note--vertical { writing-mode: vertical-rl; border-top: 0; border-left: 1px solid var(--grid); padding: 0 0 0 8px; }
.section__body { display: grid; gap: clamp(16px, 2.4vw, 28px); }

@media (min-width: 768px) {
  .section__head { grid-template-columns: minmax(96px, 150px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .section__title { grid-column: 2; }
  .section__note { grid-column: 2; max-width: 52ch; }
}

/* ---------- 9. 展览标签 ---------- */
.label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--grid);
  font-family: var(--font-num); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--mist);
}
.label::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.label--cyan { color: var(--cyan); border-color: rgba(43, 232, 200, .42); }
.label--coral { color: var(--coral); border-color: rgba(255, 107, 74, .42); }
.label--amber { color: var(--amber); border-color: rgba(255, 194, 75, .42); }

.state-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px rgba(36, 208, 122, .18); }

/* ---------- 10. 卡片 ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(16px, 2vw, 22px);
  background: var(--panel);
  border: 1px solid var(--grid);
  transition: border-color .22s ease, transform .28s cubic-bezier(.2,.8,.2,1);
}
.card:hover { border-color: rgba(43, 232, 200, .45); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__title { font-size: 18px; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; }
.card__meta { font-family: var(--font-num); font-size: 11.5px; letter-spacing: .12em; color: var(--mist); }
.card__body { font-size: 14px; line-height: 1.75; color: #C9DCED; }
.card__score { font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--cyan); letter-spacing: .02em; }
.card--offset { margin-top: clamp(10px, 4vw, 40px); }
.card--tilt { transform: rotate(-.7deg); }
.card--tilt:hover { transform: rotate(0deg); }

/* ---------- 11. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--grid);
  background: transparent; color: var(--ice);
  font-size: 14px; font-weight: 700; letter-spacing: .06em;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--cyan); border-color: var(--cyan); color: #03231D; }
.btn--accent { background: var(--coral); border-color: var(--coral); color: #1B0803; }
.btn--violet { background: var(--violet); border-color: var(--violet); color: #F4F0FF; }
.btn--ghost { color: var(--ice); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--notch { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
.btn__arrow { font-family: var(--font-num); }

/* ---------- 12. 面包屑 ---------- */
.breadcrumb { padding: 20px 0 0; }
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .08em; color: var(--mist); }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__link { color: var(--mist); border-bottom: 1px solid transparent; transition: color .18s ease, border-color .18s ease; }
.breadcrumb__link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.breadcrumb__sep { font-family: var(--font-num); color: var(--grid); }
.breadcrumb__item--current { color: var(--ice); }

/* ---------- 13. 图片容器基础规则 ---------- */
.figure {
  position: relative; display: block; overflow: hidden;
  background: var(--panel); border: 1px solid var(--grid);
}
.figure__img, .figure img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.06) contrast(1.04); }
.figure--21x9 { aspect-ratio: 21 / 9; }
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3 { aspect-ratio: 4 / 3; }
.figure--1x1 { aspect-ratio: 1 / 1; }
.figure__caption {
  display: block; margin-top: 8px;
  font-size: 12px; line-height: 1.7; letter-spacing: .08em; color: var(--mist);
}
.figure--empty::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(22, 55, 79, .9) 0 1px, transparent 1px 14px);
}

/* ---------- 14. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 15. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::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; }
  .btn:hover, .site-footer__link:hover { transform: none; }
}
