/* ==========================================================================
   乐游体育 · 夜场大屏 —— 共享样式 /assets/site.css
   深海蓝暗场 + 电光青绿数据 + 珊瑚橙关键事件 + 奶油纸面批注
   ========================================================================== */

:root {
  /* 色彩 */
  --ink-abyss: #06121F;
  --ink-deep: #0C1F33;
  --ink-glass: rgba(12, 31, 51, 0.62);
  --volt: #35F2C0;
  --volt-dim: #1FA98A;
  --coral: #FF6B4A;
  --amber: #FFC24B;
  --paper: #F4EFE6;
  --paper-dim: #C9C3B8;
  --cream: #EFE6D8;
  --ink-print: #16110C;
  --line-hair: rgba(244, 239, 230, 0.16);

  /* 字体 */
  --font-cjk: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 尺度 */
  --header-h: 64px;
  --rail-w: 104px;
  --wrap-max: 1440px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
  --radius-sm: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.6s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background-color: var(--ink-abyss);
  background-image:
    radial-gradient(120% 80% at 82% -10%, rgba(53, 242, 192, 0.09), transparent 60%),
    radial-gradient(90% 60% at -10% 30%, rgba(255, 107, 74, 0.07), transparent 62%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-cjk);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(28px, 5.2vw, 76px); }
h2 { font-size: clamp(24px, 3.2vw, 44px); }
h3 { font-size: clamp(19px, 2vw, 26px); font-weight: 700; }
p { margin: 0 0 1.1em; }

a {
  color: var(--volt);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover { color: var(--paper); }

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

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

ul, ol { margin: 0; padding: 0; }

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

::selection {
  background: var(--volt);
  color: #04231B;
}

/* ---------- 通用工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section--flush { padding-block: 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--volt-dim);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--volt-dim);
}

.lead {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.7;
  color: var(--paper-dim);
  max-width: 62ch;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.02;
}

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

/* ---------- 跳至正文 ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 90;
  padding: 9px 16px;
  background: var(--volt);
  color: #04231B;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 10px;
  color: #04231B;
}

/* ---------- 顶部命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 18, 31, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line-hair);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header[data-scrolled] {
  background: rgba(6, 18, 31, 0.96);
  border-bottom-color: rgba(53, 242, 192, 0.26);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--volt) 0%, var(--volt-dim) 55%, var(--coral) 100%);
  pointer-events: none;
  z-index: 2;
}

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

/* 品牌署名 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: var(--paper);
}

.brand:hover { color: var(--paper); }

.brand-mark {
  width: 11px;
  height: 11px;
  flex: none;
  background: var(--coral);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 14px rgba(255, 107, 74, 0.55);
}

.brand-name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-sub {
  padding-left: 9px;
  border-left: 1px solid var(--line-hair);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--volt-dim);
}

/* 索引式栏目导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px 12px;
  color: var(--paper-dim);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(244, 239, 230, 0.05);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--volt-dim);
  opacity: 0.7;
}

.nav-link[aria-current="page"] {
  color: var(--paper);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  background: var(--volt);
  box-shadow: 0 0 12px rgba(53, 242, 192, 0.6);
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--volt);
  opacity: 1;
}

/* 右侧动作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-cjk);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--volt);
  border-color: var(--volt);
  color: #04231B;
}

.btn-primary:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink-abyss);
}

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

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

.btn-coral {
  background: var(--coral);
  border-color: var(--coral);
  color: #2A0B03;
}

.btn-coral:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #2A0B03;
}

/* ---------- 移动导航开关 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-hair);
  border-radius: var(--radius-sm);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle-bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--volt);
  transition: transform 0.25s var(--ease);
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] {
  border-color: var(--volt-dim);
}

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

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

/* ---------- 面板体系 ---------- */
.glass-panel {
  background: var(--ink-glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line-hair);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
}

.solid-panel {
  background: var(--ink-deep);
  border: 1px solid var(--line-hair);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
}

.paper-panel {
  background: var(--cream);
  background-image: repeating-linear-gradient(0deg, rgba(22, 17, 12, 0.035) 0 1px, transparent 1px 26px);
  color: var(--ink-print);
  border-radius: var(--radius-sm);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
  padding: clamp(20px, 3vw, 40px);
}

.paper-panel h2,
.paper-panel h3,
.paper-panel a { color: var(--ink-print); }

.paper-panel a { border-bottom: 1px solid rgba(22, 17, 12, 0.35); }

/* ---------- 状态灯与芯片 ---------- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--volt);
  animation: dot-breathe 2.8s ease-in-out infinite;
}

.status-dot--coral {
  background: var(--coral);
  animation-name: dot-breathe-coral;
}

.status-dot--amber {
  background: var(--amber);
  animation-name: dot-breathe-amber;
}

@keyframes dot-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 242, 192, 0.5); opacity: 0.72; }
  50% { box-shadow: 0 0 0 7px rgba(53, 242, 192, 0); opacity: 1; }
}

@keyframes dot-breathe-coral {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0.5); opacity: 0.78; }
  50% { box-shadow: 0 0 0 7px rgba(255, 107, 74, 0); opacity: 1; }
}

@keyframes dot-breathe-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 194, 75, 0.5); opacity: 0.8; }
  50% { box-shadow: 0 0 0 7px rgba(255, 194, 75, 0); opacity: 1; }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line-hair);
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.04);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  color: var(--paper);
  border-color: var(--volt-dim);
}

.chip.is-active,
.chip[data-active] {
  background: var(--volt);
  border-color: var(--volt);
  color: #04231B;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 16px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
}

.breadcrumb a {
  color: var(--paper-dim);
  border-bottom: 1px solid transparent;
}

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

.breadcrumb-sep {
  color: rgba(244, 239, 230, 0.32);
}

/* ---------- 左侧常驻索引窄栏 ---------- */
.rail {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  width: var(--rail-w);
  flex: none;
  align-self: start;
  padding-right: 18px;
  border-right: 1px solid var(--line-hair);
}

.rail-list {
  list-style: none;
  display: grid;
  gap: 2px;
}

.rail-item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
}

.rail-item a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px 6px 0;
  color: inherit;
  border-left: 2px solid transparent;
  padding-left: 10px;
}

.rail-item a:hover {
  color: var(--paper);
  border-left-color: var(--volt-dim);
}

.rail-item a[aria-current="page"] {
  color: var(--volt);
  border-left-color: var(--volt);
  font-weight: 700;
}

/* ---------- 正文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
}

.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
  list-style: disc;
}

.prose li { margin-bottom: 0.4em; }

.prose blockquote {
  margin: 1.4em 0;
  padding-left: 16px;
  border-left: 2px solid var(--volt-dim);
  color: var(--paper-dim);
}

.prose--note p { text-indent: 2em; }

.prose--note p:first-of-type { text-indent: 0; }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line-hair);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--ink-deep) 0%, #10314F 55%, #0A1B2C 100%);
  aspect-ratio: 16 / 9;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(115deg, rgba(53, 242, 192, 0.11) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, rgba(6, 18, 31, 0) 45%, rgba(6, 18, 31, 0.62) 100%);
  pointer-events: none;
  opacity: 0.85;
}

.media-frame img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.media-stack {
  display: grid;
  gap: 16px;
}

.media-caption {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
}

/* ---------- 滚动显现 ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur) ease, transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  background: linear-gradient(180deg, #04101C 0%, var(--ink-abyss) 100%);
  border-top: 1px solid var(--line-hair);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 160px;
  height: 2px;
  background: var(--volt);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 32px;
}

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

.footer-logo {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.footer-tag {
  margin: 6px 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--volt-dim);
}

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

.footer-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

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

.footer-list li { min-width: 0; }

.footer-list a {
  display: inline-block;
  font-size: 15px;
  color: var(--paper);
  border-bottom: 1px solid transparent;
}

.footer-list a:hover {
  color: var(--volt);
  border-bottom-color: var(--volt-dim);
}

.footer-list--plain a { color: var(--paper-dim); }

.footer-meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper-dim);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding: 18px var(--gutter) 34px;
  border-top: 1px solid var(--line-hair);
}

.footer-legal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--paper-dim);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  :root {
    --header-h: 58px;
    --rail-w: 78px;
  }

  .brand-sub { display: none; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(6, 18, 31, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: max-height 0.3s var(--ease), border-color 0.3s ease;
  }

  .site-nav[data-open] {
    max-height: min(68vh, 520px);
    overflow-y: auto;
    border-bottom-color: var(--line-hair);
  }

  .nav-link {
    padding: 15px var(--gutter);
    font-size: 15px;
    border-bottom: 1px solid var(--line-hair);
    border-radius: 0;
  }

  .nav-link[aria-current="page"]::after {
    left: 0;
    top: 0;
    right: auto;
    bottom: 0;
    width: 3px;
    height: 100%;
  }

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

  .rail {
    position: static;
    width: 100%;
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line-hair);
  }

  .rail-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-list::-webkit-scrollbar { display: none; }

  .rail-item a {
    padding: 6px 12px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .rail-item a[aria-current="page"] {
    border-left-color: transparent;
    border-bottom-color: var(--volt);
  }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .header-actions .btn-primary {
    padding: 8px 12px;
    font-size: 13px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease;
    transition-delay: 0ms;
  }

  .status-dot {
    animation: none;
    opacity: 1;
  }

  .scroll-progress {
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
