/* 乐宝体育（CN）共享样式 /assets/site.css
   设计体系：赛事数据编辑部 · 深空蓝 + 活力橙 + 荧光绿 */

/* ===== 设计令牌 ===== */
:root {
  --c-navy: #0A1F44;
  --c-navy-light: #1A3A6B;
  --c-orange: #FF6B35;
  --c-neon: #C6FF00;
  --c-gray: #6B7280;
  --c-moss: #4B7F52;
  --c-clay: #C4785A;
  --c-cream: #F7F3E8;
  --c-white: #FFFFFF;
  --c-ink: #0D1B2A;

  --font-heading: Impact, Anton, "Arial Black", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", sans-serif;

  --header-w: 260px;
  --header-h-mobile: 64px;
  --container-max: 1200px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== 重置与基础 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-ink);
  background: var(--c-navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.12;
  font-weight: 700;
  color: inherit;
}

p {
  max-width: 68ch;
}

a {
  color: var(--c-orange);
  text-underline-offset: 3px;
}

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

button {
  font-family: inherit;
}

::selection {
  background: var(--c-neon);
  color: var(--c-navy);
}

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

.site-header :focus-visible,
.site-footer :focus-visible,
.section--dark :focus-visible {
  outline-color: var(--c-neon);
}

/* ===== 布局基础 ===== */
.container {
  width: min(var(--container-max), 100% - 48px);
  margin-inline: auto;
}

.page-shell {
  min-height: 100dvh;
  padding-top: var(--header-h-mobile);
  background: var(--c-cream);
}

#main-content {
  outline: none;
}

section[id] {
  scroll-margin-top: 88px;
}

/* ===== 章节 ===== */
.section {
  position: relative;
  padding-block: clamp(48px, 8vw, 96px);
}

.section--dark {
  background: var(--c-navy);
  color: var(--c-cream);
}

.section--light {
  background: var(--c-cream);
  color: var(--c-ink);
}

.section--ink {
  background: var(--c-ink);
  color: var(--c-cream);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.section-head__index {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  color: var(--c-orange);
}

.section-head__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.section-head__lead {
  max-width: 46ch;
  color: var(--c-gray);
  line-height: 1.85;
}

.section--dark .section-head__lead {
  color: rgba(247, 243, 232, 0.62);
}

.display {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--c-gray);
  max-width: 48ch;
}

/* ===== 头部：侧边轨道 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: var(--header-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--c-navy);
  background-image: linear-gradient(180deg, rgba(26, 58, 107, 0.35), transparent 180px);
  color: var(--c-white);
  border-right: 1px solid rgba(247, 243, 232, 0.08);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 3000;
  padding: 10px 18px;
  background: var(--c-neon);
  color: var(--c-navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-neon));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 2200;
  pointer-events: none;
}

.site-header__brand {
  padding: 28px 22px 18px;
  border-bottom: 1px solid rgba(247, 243, 232, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-white);
  text-decoration: none;
}

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

.brand__mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  background: var(--c-orange);
  color: var(--c-navy);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}

.brand__text {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.brand__cn {
  color: var(--c-orange);
}

.nav-toggle {
  display: none;
}

.nav-toggle__box {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 16px;
}

.nav-toggle__line {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out);
}

.nav-toggle__label {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}

.nav-toggle__label-close {
  display: none;
}

/* ===== 导航轨道 ===== */
.site-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 22px 14px 14px;
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav__item {
  list-style: none;
}

.site-nav__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  color: rgba(247, 243, 232, 0.68);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 0 0 var(--c-orange);
}

.site-nav__link:hover {
  color: var(--c-white);
  background: rgba(247, 243, 232, 0.06);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-white);
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.16), rgba(255, 107, 53, 0) 72%);
  box-shadow: inset 3px 0 0 var(--c-orange);
}

.site-nav__index {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: rgba(247, 243, 232, 0.36);
}

.site-nav__link[aria-current="page"] .site-nav__index {
  color: var(--c-orange);
}

.site-nav__label {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.site-nav__aside {
  margin-top: auto;
  padding: 18px 6px 6px;
  border-top: 1px solid rgba(247, 243, 232, 0.08);
  display: grid;
  gap: 12px;
}

.site-nav__live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--c-neon);
}

.site-nav__live-dot {
  width: 6px;
  height: 6px;
  background: var(--c-neon);
  display: inline-block;
}

.site-nav__cta {
  width: 100%;
}

.site-nav__cta-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
  margin-left: 2px;
}

.site-nav__note {
  font-size: 0.6875rem;
  color: rgba(247, 243, 232, 0.4);
  line-height: 1.6;
  max-width: 24em;
}

/* ===== 页脚：编辑部档案页 ===== */
.site-footer {
  position: relative;
  background: var(--c-navy);
  background-image:
    linear-gradient(rgba(247, 243, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 232, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: rgba(247, 243, 232, 0.66);
  border-top: 1px solid rgba(198, 255, 0, 0.28);
  overflow: hidden;
}

.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-orange) 0 36%, var(--c-neon) 36% 62%, var(--c-clay) 62% 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-block: 56px 48px;
}

.footer-col,
.footer-brand,
.footer-nav,
.footer-contact,
.footer-legal {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  color: var(--c-neon);
  text-transform: uppercase;
}

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

.footer-list a {
  color: rgba(247, 243, 232, 0.7);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-list a:hover {
  color: var(--c-orange);
  padding-left: 5px;
}

.brand--footer .brand__mark {
  background: var(--c-neon);
  color: var(--c-navy);
}

.brand--footer .brand__text {
  color: var(--c-cream);
}

.footer-brand__about {
  margin-top: 2px;
  font-size: 0.875rem;
  line-height: 1.85;
  color: rgba(247, 243, 232, 0.54);
  max-width: 38em;
}

.footer-brand__trust {
  margin-top: 4px;
  padding-left: 10px;
  border-left: 2px solid var(--c-orange);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--c-neon);
  line-height: 1.6;
}

.footer-address {
  display: grid;
  gap: 8px;
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(247, 243, 232, 0.64);
}

.footer-bottom {
  border-top: 1px solid rgba(247, 243, 232, 0.08);
  padding-block: 18px;
}

.footer-bottom__inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom__copy,
.footer-bottom__icp {
  font-size: 0.75rem;
  color: rgba(247, 243, 232, 0.4);
}

/* ===== 返回顶部 ===== */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1500;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--c-navy);
  border: 1px solid rgba(255, 107, 53, 0.65);
  color: var(--c-white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  box-shadow: 4px 4px 0 rgba(10, 31, 68, 0.45);
}

.back-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: var(--c-navy);
}

.back-top__icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* ===== 通用组件 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  border-radius: 0;
}

.btn--primary {
  background: var(--c-orange);
  color: var(--c-white);
  border-color: var(--c-orange);
}

.btn--primary:hover {
  background: #e8551f;
  border-color: #e8551f;
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-cream);
  border-color: rgba(247, 243, 232, 0.3);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--c-cream);
}

.btn--outline {
  background: transparent;
  color: var(--c-ink);
  border-color: rgba(13, 27, 42, 0.35);
}

.btn--outline:hover {
  background: var(--c-navy);
  border-color: var(--c-navy);
  color: var(--c-white);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  background: rgba(10, 31, 68, 0.08);
  color: var(--c-ink);
  border-radius: 0;
}

.badge__dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  display: inline-block;
}

.badge--neon {
  background: var(--c-neon);
  color: var(--c-navy);
}

.badge--orange {
  background: var(--c-orange);
  color: var(--c-white);
}

.badge--moss {
  background: var(--c-moss);
  color: var(--c-white);
}

.breadcrumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--c-gray);
  margin-bottom: 24px;
}

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

.breadcrumbs a:hover {
  color: var(--c-orange);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(107, 114, 128, 0.5);
}

.breadcrumbs li[aria-current="page"] {
  color: var(--c-ink);
  font-weight: 600;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--c-white);
  border: 1px solid rgba(13, 27, 42, 0.12);
  border-radius: 0;
  padding: 24px;
}

.card--dark {
  background: var(--c-navy-light);
  border-color: rgba(247, 243, 232, 0.12);
  color: var(--c-cream);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--c-gray);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.2;
}

.card__desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--c-gray);
  max-width: 52ch;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 28px;
  border-bottom: 1px solid rgba(13, 27, 42, 0.14);
}

.tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-gray);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.tabs__link:hover {
  color: var(--c-orange);
}

.tabs__link[aria-current="page"] {
  background: var(--c-white);
  border-color: rgba(13, 27, 42, 0.14);
  color: var(--c-navy);
  box-shadow: inset 0 3px 0 var(--c-orange);
}

.tabs--dark {
  border-bottom-color: rgba(247, 243, 232, 0.2);
}

.tabs--dark .tabs__link {
  color: rgba(247, 243, 232, 0.6);
}

.tabs--dark .tabs__link:hover {
  color: var(--c-cream);
}

.tabs--dark .tabs__link[aria-current="page"] {
  background: rgba(247, 243, 232, 0.08);
  border-color: rgba(247, 243, 232, 0.2);
  color: var(--c-white);
  box-shadow: inset 0 3px 0 var(--c-neon);
}

/* ===== 图片容器 ===== */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--c-navy-light);
  background-image:
    linear-gradient(rgba(247, 243, 232, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 232, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid rgba(13, 27, 42, 0.08);
}

.media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 6px 12px;
  background: var(--c-navy);
  color: var(--c-cream);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border-top-right-radius: 0;
}

.media--16-9 {
  aspect-ratio: 16 / 9;
}

.media--4-3 {
  aspect-ratio: 4 / 3;
}

.media--3-4 {
  aspect-ratio: 3 / 4;
}

.media--1-1 {
  aspect-ratio: 1 / 1;
}

/* ===== 章节目录 / 旁注 ===== */
.chapter-nav {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 4px;
  padding: 16px;
  background: rgba(247, 243, 232, 0.6);
  border-left: 2px solid var(--c-orange);
}

.chapter-nav__title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  color: var(--c-gray);
  margin-bottom: 8px;
}

.chapter-nav__link {
  display: block;
  padding: 6px 0;
  color: var(--c-gray);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(13, 27, 42, 0.06);
  transition: color 0.2s, padding-left 0.2s, box-shadow 0.2s;
}

.chapter-nav__link:hover {
  color: var(--c-navy);
}

.chapter-nav__link[data-active] {
  color: var(--c-navy);
  padding-left: 8px;
  box-shadow: inset 2px 0 0 var(--c-orange);
}

.margin-note {
  font-size: 0.8125rem;
  color: var(--c-gray);
  border-left: 2px solid var(--c-clay);
  padding-left: 12px;
  margin-block: 8px;
  max-width: 30em;
}

/* ===== 滚动显现 ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ===== 响应式 ===== */
@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-bottom__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 960px) {
  .page-shell {
    padding-top: 0;
    margin-left: var(--header-w);
  }

  section[id] {
    scroll-margin-top: 24px;
  }

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

  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 48px;
  }
}

@media (max-width: 959.98px) {
  .site-header {
    width: 100%;
    height: var(--header-h-mobile);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid rgba(247, 243, 232, 0.08);
    background-image: none;
  }

  .site-header__brand {
    padding: 0 0 0 18px;
    border-bottom: 0;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .brand__text {
    font-size: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 14px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid rgba(247, 243, 232, 0.22);
    color: var(--c-white);
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1;
  }

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

  .nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__label-open {
    display: none;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__label-close {
    display: inline;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h-mobile);
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    margin: 0;
    padding: 24px 18px 28px;
    background: var(--c-navy);
    border-left: 1px solid rgba(247, 243, 232, 0.1);
    transform: translateX(102%);
    transition: transform 0.3s var(--ease-out);
    z-index: 1050;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    box-shadow: -24px 0 48px rgba(0, 0, 0, 0.35);
  }

  .back-top {
    right: 12px;
    bottom: 12px;
  }
}

/* ===== 减少动态偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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