/* =========================================================
   乐鱼赛场 · 共享样式表 /assets/site.css
   深海蓝底 · 荧光青脉冲 · 热橙落点 · 细线网格
   ========================================================= */

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

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

body { margin: 0; }

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

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

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

button { font: inherit; color: inherit; background: none; border: 0; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

/* ---------------- 变量 ---------------- */
:root {
  --deep-sea: #06182B;
  --panel-blue: #0C2740;
  --graphite: #2C333B;
  --cyan: #2BE3D2;
  --orange: #FF6B2C;
  --ice: #E9F4FB;
  --mist: #9AB0C4;
  --grid: #1C3A56;
  --mint: #57D9A3;
  --amber: #FFC24B;
  --ink: #04131F;

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

  --shell-max: 1280px;
  --gutter: 20px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
    --header-h: 60px;
  }
}

/* ---------------- 基础排版 ---------------- */
body {
  min-height: 100%;
  background-color: var(--deep-sea);
  background-image:
    linear-gradient(to right, rgba(28, 58, 86, 0.34) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28, 58, 86, 0.16) 1px, transparent 1px);
  background-size: 96px 100%, 100% 96px;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4 {
  font-weight: 900;
  font-stretch: condensed;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ice);
}

h1 { font-size: clamp(40px, 6.6vw, 96px); }
h2 { font-size: clamp(28px, 3.4vw, 52px); }
h3 { font-size: clamp(20px, 2vw, 28px); }

p { max-width: 40em; }

strong { color: var(--ice); font-weight: 700; }

::selection {
  background: var(--cyan);
  color: var(--ink);
}

/* ---------------- 焦点与可达性 ---------------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 400;
  padding: 12px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------------- 布局工具 ---------------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

main { padding-top: var(--header-h); }

main.main--flush { padding-top: 0; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin-bottom: 14px;
}

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

.link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  --cut: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ice);
  cursor: pointer;
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.btn--signal {
  background: var(--cyan);
  color: var(--ink);
  font-weight: 700;
}

.btn--signal:hover { background: #6BF0E3; }

.btn--ghost {
  border-color: var(--grid);
  color: var(--ice);
}

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

.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.btn--signal:focus-visible {
  box-shadow: inset 0 0 0 2px var(--ink);
}

/* ---------------- 标签 / 胶囊 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--grid);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.tag--live {
  color: var(--mint);
  border-color: rgba(87, 217, 163, 0.45);
}

.tag--alert {
  color: var(--amber);
  border-color: rgba(255, 194, 75, 0.45);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--grid);
  background: var(--panel-blue);
  color: var(--mist);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.chip:hover {
  color: var(--ice);
  border-color: var(--cyan);
}

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
  font-weight: 700;
}

/* ---------------- 面板 ---------------- */
.panel {
  background: var(--panel-blue);
  border: 1px solid var(--grid);
  padding: clamp(20px, 3vw, 32px);
}

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

/* ---------------- 面包屑 ---------------- */
.crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumb-link { color: var(--mist); }
.crumb-link:hover { color: var(--cyan); }
.crumb-sep { color: var(--grid); }

/* ---------------- 图片容器 ---------------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--grid);
  background-color: var(--panel-blue);
  background-image:
    linear-gradient(135deg, rgba(43, 227, 210, 0.09), rgba(255, 107, 44, 0.06)),
    repeating-linear-gradient(90deg, rgba(28, 58, 86, 0.6) 0 1px, transparent 1px 40px);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--21x9 { aspect-ratio: 21 / 9; }

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

.media__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 5px 10px;
  background: var(--deep-sea);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ---------------- 页头 ---------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: transparent;
  color: var(--ice);
  transition: background-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(43, 227, 210, 0.6) 32%,
    rgba(255, 107, 44, 0.45) 68%,
    transparent
  );
}

.site-header.is-solid,
.site-header[data-open] {
  background-color: #06182B;
  box-shadow: 0 1px 0 var(--grid), 0 22px 44px -30px rgba(0, 0, 0, 0.95);
}

.header-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
}

.brand-mark {
  font-size: 20px;
  font-weight: 900;
  font-stretch: condensed;
  letter-spacing: -0.02em;
  color: var(--ice);
  white-space: nowrap;
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  border: 1px solid rgba(43, 227, 210, 0.4);
  padding: 1px 6px;
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-index { display: none; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--mist);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.nav-link:hover { color: var(--ice); }

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

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

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

/* 抽屉里才出现的部分 */
.drawer-feed { display: none; }
.drawer-cta { display: none; }

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex: none;
  border: 1px solid var(--grid);
  color: var(--ice);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.2s var(--ease);
}

.site-header[data-open] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header[data-open] .nav-toggle-bar:nth-child(2) { opacity: 0; }

.site-header[data-open] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 128px);
  background-color: #161D24;
  background-image: linear-gradient(180deg, #161D24 0%, #2C333B 145%);
  color: var(--mist);
}

.footer-band {
  height: 26px;
  border-top: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
  background-image:
    repeating-linear-gradient(90deg, rgba(28, 58, 86, 0.95) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(43, 227, 210, 0.45) 0 1px, transparent 1px 96px);
}

.footer-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 52px var(--gutter) 28px;
}

.footer-grid {
  display: grid;
  gap: 36px 32px;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1080px) {
  .footer-grid { grid-template-columns: 1.5fr 0.8fr 0.8fr 0.8fr; }
}

.footer-brand .brand { margin-bottom: 14px; }

.footer-tagline {
  max-width: 30em;
  font-size: 15px;
  line-height: 1.7;
  color: var(--mist);
  margin-bottom: 22px;
}

.footer-contact {
  border-left: 2px solid var(--grid);
  padding-left: 16px;
}

.footer-contact-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 6px;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  padding-top: 4px;
}

.footer-value {
  color: var(--ice);
  word-break: break-word;
}

.footer-note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}

.footer-heading {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ice);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--grid);
}

.footer-list li + li { margin-top: 2px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  color: var(--mist);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  padding-left: 4px;
}

.footer-base {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--grid);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #7F93A6;
}

.footer-region {
  padding: 2px 8px;
  border: 1px solid var(--grid);
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.footer-icp { color: var(--mist); }

.footer-version { color: var(--mist); }

.footer-copy { margin-left: auto; }

@media (max-width: 719px) {
  .footer-copy { margin-left: 0; }
}

/* ---------------- 滚动显现 ---------------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ---------------- 移动端导航 ---------------- */
@media (max-width: 1023px) {
  .header-actions { display: none; }

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

  .site-nav {
    position: fixed;
    z-index: 120;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(90vw, 400px);
    margin-left: 0;
    display: block;
    padding: calc(var(--header-h) + 20px) 22px 36px;
    overflow-y: auto;
    background-image: linear-gradient(180deg, #0A2440 0%, #071E35 100%);
    border-left: 1px solid var(--grid);
    box-shadow: -40px 0 70px -40px #000;
    transform: translateX(102%);
    transition: transform 0.34s var(--ease);
  }

  .site-header[data-open] .site-nav { transform: translateX(0); }

  body.nav-open { overflow: hidden; }

  .nav-index {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--cyan);
    margin: 0 0 12px;
  }

  .nav-list {
    display: block;
    border-top: 1px solid var(--grid);
  }

  .nav-link {
    min-height: 56px;
    padding: 0 6px;
    font-size: 17px;
    border-bottom: 1px solid var(--grid);
    color: var(--ice);
  }

  .nav-link::after {
    left: auto;
    right: 8px;
    top: 50%;
    bottom: auto;
    width: 7px;
    height: 7px;
    transform: translateY(-50%) scale(0);
    transform-origin: center;
  }

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

  .nav-link[aria-current="page"]::after {
    transform: translateY(-50%) scale(1);
  }

  .drawer-feed {
    display: block;
    margin-top: 34px;
  }

  .feed-list {
    border-top: 1px solid var(--grid);
  }

  .feed-link {
    display: block;
    padding: 14px 6px;
    border-bottom: 1px solid var(--grid);
    font-size: 14px;
    line-height: 1.6;
    color: var(--mist);
    transition: color 0.2s var(--ease);
  }

  .feed-link:hover { color: var(--ice); }

  .feed-link::before {
    content: "→";
    color: var(--orange);
    margin-right: 8px;
    font-family: var(--font-mono);
  }

  .drawer-cta {
    display: inline-flex;
    width: 100%;
    margin-top: 30px;
  }
}

@media (min-width: 1024px) {
  .site-nav { margin-left: auto; }
}

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

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