/* ============================================================
   乐鱼体育主站 — 共享样式 /assets/site.css
   结构：变量 → reset → 排版 → 顶部信息条 → 侧边轨道 → 通用件 → 页脚 → 响应式
   ============================================================ */

:root {
  --ink: #04121F;
  --ink-2: #08243B;
  --ink-3: #0B2E49;
  --line: #0E3A5C;
  --cyan: #00E5D0;
  --cyan-soft: #6CF6E8;
  --orange: #FF6B1A;
  --orange-soft: #FFB27A;
  --paper: #F4F7F8;
  --black: #0A1017;
  --gray: #6B7C8A;

  --rail-w: 104px;
  --topbar-h: 68px;
  --gutter: 24px;
  --maxw: 1320px;
  --pad-x: clamp(16px, 3vw, 32px);

  --font-cn: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --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;
}

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

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

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

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

/* ---------- 排版与页面骨架 ---------- */
body {
  margin: 0;
  padding-left: var(--rail-w);
  padding-top: var(--topbar-h);
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.display {
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.012em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: clamp(48px, 7vw, 96px); }

.section--paper {
  background: var(--paper);
  color: var(--black);
}

.section--paper .eyebrow { color: #0B7F8C; }
.section--paper .eyebrow::after { opacity: 0.35; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: currentColor;
  opacity: 0.28;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ---------- 焦点 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.section--paper :focus-visible { outline-color: #0B7F8C; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 999;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transform: translate(-50%, -180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- 顶部信息条 ---------- */
.site-header { position: relative; z-index: 60; }

.topbar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: var(--pad-x);
  background: rgba(4, 18, 31, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--paper);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan) 0 72px, var(--line) 72px 100%);
  opacity: 0.55;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--paper);
  text-decoration: none;
}

.brand__mark {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--cyan);
  border-radius: 7px;
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease), border-color 0.2s var(--ease);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 2px;
  background: var(--cyan);
}

.brand:hover .brand__mark { transform: rotate(135deg); }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--cyan-soft);
  opacity: 0.66;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 快捷动作 */
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.btn--accent:hover { background: var(--orange-soft); border-color: var(--orange-soft); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--cyan-soft);
}

.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--cyan-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), top 0.24s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle.is-active .nav-toggle__bars { background: transparent; }
.nav-toggle.is-active .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-active .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 侧边轨道 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 10px 18px;
  background-color: var(--ink-2);
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 36px;
  border-right: 1px solid var(--line);
  color: var(--paper);
}

.rail__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.rail__index {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--cyan);
}

.rail__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--cyan-soft);
  opacity: 0.62;
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-height: 0;
}

.rail__item { min-width: 0; }

.rail__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 10px 10px 0;
  color: var(--paper);
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.rail__num {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: var(--cyan);
  opacity: 0.72;
}

.rail__text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.rail__link:hover {
  background: rgba(0, 229, 208, 0.08);
  border-left-color: var(--cyan);
}

.rail__link[aria-current="page"] {
  background: rgba(0, 229, 208, 0.14);
  border-left-color: var(--cyan);
  color: var(--cyan);
}

.rail__link[aria-current="page"] .rail__num { opacity: 1; }

.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rail__track {
  position: relative;
  width: 2px;
  height: 56px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.rail__fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  transform: scaleY(var(--progress, 0));
  transform-origin: bottom center;
  transition: transform 0.14s linear;
}

.rail__pct {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cyan-soft);
  opacity: 0.72;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

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

.breadcrumb li + li::before {
  content: "/";
  opacity: 0.5;
}

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

.breadcrumb a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- 标签、数据条、对比表 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 229, 208, 0.06);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--cyan-soft);
}

.stat-bar {
  position: relative;
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(14, 58, 92, 0.9);
  overflow: hidden;
}

.stat-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-soft));
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.compare th,
.compare td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cyan-soft);
}

.compare tbody tr { transition: background 0.18s var(--ease); }
.compare tbody tr:hover { background: rgba(0, 229, 208, 0.07); }

.compare .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.section--paper .compare th,
.section--paper .compare td { border-bottom-color: rgba(4, 18, 31, 0.14); }

.section--paper .compare th { color: #0B7F8C; }
.section--paper .compare tbody tr:hover { background: rgba(255, 107, 26, 0.08); }

.section--paper .tag {
  color: #0B5E6B;
  border-color: rgba(4, 18, 31, 0.18);
  background: rgba(255, 107, 26, 0.12);
}

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--ink-2);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img,
.media-frame > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(4, 18, 31, 0.6), transparent 58%);
  pointer-events: none;
}

.media-frame--cut {
  border-radius: var(--radius-l) 0 var(--radius-m) 0;
  clip-path: polygon(0 0, 100% 0, 100% 84%, 88% 100%, 0 100%);
}

.media-frame--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image:
    linear-gradient(to right, rgba(0, 229, 208, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 229, 208, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.55;
  pointer-events: none;
}

.media-frame__caption {
  position: relative;
  z-index: 4;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--cyan-soft);
  border-top: 1px solid var(--line);
}

/* ---------- 入场显现 ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(14, 58, 92, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 58, 92, 0.55) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.5;
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -100px;
  z-index: 0;
  width: 380px;
  height: 380px;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  background: radial-gradient(circle at 42% 42%, rgba(0, 229, 208, 0.16), transparent 70%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 80px) var(--pad-x) 0;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(4, minmax(0, 0.85fr));
  gap: clamp(24px, 3vw, 48px);
  padding-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.footer__brand { min-width: 0; }

.brand--footer {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--paper);
  text-decoration: none;
}

.brand--footer .brand__name { font-size: 18px; }

.footer__pitch {
  margin-top: 18px;
  max-width: 32ch;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(244, 247, 248, 0.72);
}

.footer__contact {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: rgba(8, 36, 59, 0.6);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.footer__contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__key {
  flex: 0 0 64px;
  color: rgba(108, 246, 232, 0.58);
  letter-spacing: 0.06em;
}

.footer__value {
  flex: 1 1 140px;
  min-width: 0;
  color: var(--paper);
  word-break: break-word;
}

.footer__col { min-width: 0; }

.footer__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
  color: var(--cyan);
}

.footer__list {
  display: grid;
  gap: 11px;
}

.footer__link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(244, 247, 248, 0.76);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer__link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__link--sm { font-size: 12.5px; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(244, 247, 248, 0.58);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
}

.footer__icp { white-space: nowrap; }

.footer__meta,
.footer__icp { color: rgba(244, 247, 248, 0.58); }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1100px) {
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .topbar { left: 0; }

  .nav-toggle { display: inline-flex; }

  .btn--ghost { display: none; }

  .rail {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 var(--pad-x);
    border-right: 0;
    border-bottom: 0;
    background-image: none;
    transition: max-height 0.34s var(--ease), padding 0.34s var(--ease);
  }

  .rail[data-open="true"] {
    max-height: calc(100vh - var(--topbar-h));
    max-height: calc(100dvh - var(--topbar-h));
    overflow-y: auto;
    padding: 18px var(--pad-x) 24px;
    border-bottom: 1px solid var(--line);
  }

  .rail__head { display: none; }

  .rail__list {
    flex: 0 0 auto;
    gap: 2px;
  }

  .rail__link {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 13px 12px;
    border-left-width: 2px;
    border-radius: 0 10px 10px 0;
  }

  .rail__text { font-size: 16px; }
  .rail__num { font-size: 12px; }

  .rail__foot {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 14px;
  }

  .rail__track {
    flex: 1 1 auto;
    width: 100%;
    height: 2px;
  }

  .rail__fill {
    transform: scaleX(var(--progress, 0));
    transform-origin: left center;
    transition: transform 0.14s linear;
  }

  .rail__pct { order: 2; }

  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-9 { grid-column: span 6; }

  .footer__legal { margin-left: 0; }
}

@media (max-width: 600px) {
  .footer__top { grid-template-columns: minmax(0, 1fr); }
  .brand__tag { display: none; }
  .brand__name { font-size: 15px; }
  .btn { padding: 10px 15px; font-size: 13px; }
  .footer__base { font-size: 11px; }
  .footer__contact { font-size: 12px; }
}

@media (max-width: 380px) {
  .nav-toggle__label { display: none; }
}

/* ---------- 动效降级 ---------- */
@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;
  }

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