/* ============================================
   体育网页BAPP — 全站共享样式
   /assets/site.css
   ============================================ */

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

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

body {
  background: var(--color-bg);
  color: var(--color-paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

ul,
ol {
  list-style: none;
}

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-height) + 12px);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* ---------- CSS Variables ---------- */
:root {
  --color-bg: #121212;
  --color-surface: #2a2a2a;
  --color-border: #3a3a3a;
  --color-paper: #f5f0e8;
  --color-muted: #888888;
  --color-accent: #c6ff00;
  --color-accent-2: #ff7a00;
  --color-success: #00c853;
  --color-warning: #ffb300;
  --color-error: #ff3b30;

  --font-title: "Anton", "Impact", "Noto Sans SC", sans-serif;
  --font-body: "Roboto", "Noto Sans SC", sans-serif;

  --container: 1280px;
  --header-height: 64px;
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 32px;
  --radius-full: 999px;
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 861px) {
  :root {
    --header-height: 76px;
  }
}

/* ---------- Basic Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-title);
  color: var(--color-paper);
  line-height: 1.2;
  font-weight: 900;
}

p {
  overflow-wrap: break-word;
}

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

/* ---------- Container & Content ---------- */
.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.content {
  width: min(100% - 40px, 960px);
  margin-inline: auto;
}

.content--wide {
  width: min(100% - 48px, var(--container));
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translate(-50%, -200%);
  z-index: 1300;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  transition: transform 0.3s ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  border-radius: 0 999px 999px 0;
  z-index: 1200;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.site-header[data-scrolled] {
  background: rgba(18, 18, 18, 0.92);
  border-bottom-color: var(--color-border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
}

/* ---------- Brand ---------- */
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-brand__mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--color-accent);
  transform: rotate(-8deg);
  box-shadow: 0 4px 18px rgba(198, 255, 0, 0.35);
  flex-shrink: 0;
}

.site-brand__mark::after {
  content: "B";
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  color: var(--color-bg);
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.site-brand__logo {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--color-paper);
  white-space: nowrap;
}

.site-brand__sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--color-accent);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Navigation Base ---------- */
.site-nav__list {
  counter-reset: nav-index;
}

.site-nav__item {
  counter-increment: nav-index;
}

.site-nav__link::before {
  content: "0" counter(nav-index);
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--color-accent-2);
  flex-shrink: 0;
}

/* ---------- Header Actions ---------- */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-header__cta {
  padding: 10px 22px;
  position: relative;
}

.site-header__cta::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.site-header__cta:hover::after {
  transform: translateX(4px);
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color 0.25s, background-color 0.25s;
}

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

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-paper);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  gap: 0;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

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

/* ---------- Overlay ---------- */
.site-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 990;
  transition: opacity 0.3s ease;
}

.site-overlay[data-open] {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 4px 20px rgba(198, 255, 0, 0.22);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(198, 255, 0, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-paper);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: #0d0d0d;
  margin-top: auto;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-2) 45%, transparent 90%);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.4fr;
  gap: 48px;
  padding-block: 56px 40px;
  border-bottom: 1px solid var(--color-border);
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.site-footer__logo {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--color-paper);
  line-height: 1.2;
}

.site-footer__sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.site-footer__desc {
  font-size: 15px;
  color: var(--color-paper);
  border-left: 3px solid var(--color-accent-2);
  padding-left: 14px;
  line-height: 1.6;
  margin-top: 4px;
}

.site-footer__trust {
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-muted);
  max-width: 320px;
  margin-top: 12px;
  opacity: 0.8;
}

.site-footer__heading {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--color-paper);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.site-footer__heading::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 8px;
}

.site-footer__link,
.site-footer__contact-link {
  display: inline-block;
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  color: rgba(245, 240, 232, 0.72);
  transition: color 0.25s, padding-left 0.25s;
}

.site-footer__link::before,
.site-footer__contact-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent-2);
  transform: translateY(-50%);
  transition: width 0.25s;
}

.site-footer__link:hover,
.site-footer__contact-link:hover {
  color: var(--color-accent);
  padding-left: 18px;
}

.site-footer__link:hover::before,
.site-footer__contact-link:hover::before {
  width: 12px;
}

.site-footer__contact-link {
  color: var(--color-accent);
}

.site-footer__contact-line {
  display: block;
  font-size: 14px;
  color: rgba(245, 240, 232, 0.72);
  padding: 4px 0;
}

.site-footer__contact-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-muted);
  margin-top: 10px;
  max-width: 280px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 24px 28px;
}

.site-footer__copyright {
  font-size: 13px;
  color: var(--color-muted);
}

.site-footer__icp {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__link {
  color: var(--color-muted);
  transition: color 0.2s;
}

.breadcrumb__link:hover {
  color: var(--color-accent);
}

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

.breadcrumb__sep {
  color: var(--color-border);
}

/* ---------- Section ---------- */
.section {
  padding-block: clamp(56px, 9vw, 110px);
}

.section--tight {
  padding-block: clamp(32px, 5vw, 64px);
}

.section--dark {
  background: var(--color-surface);
  border-radius: var(--radius-l);
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ---------- Section Head ---------- */
.section-head {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 36px;
}

.section-head__index {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 900;
  color: var(--color-accent-2);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0.2em;
  flex-shrink: 0;
}

.section-head__body {
  flex: 1;
}

.section-head__title {
  font-family: var(--font-title);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.12;
  color: var(--color-paper);
}

.section-head__lead {
  margin-top: 8px;
  font-size: 15px;
  color: var(--color-muted);
  max-width: 640px;
}

.section-head__note {
  font-size: 12px;
  color: var(--color-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.3em;
  flex-shrink: 0;
}

/* ---------- Archive Card ---------- */
.archive-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: 24px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.archive-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  border-radius: 0 var(--radius-m) 0 var(--radius-s);
  background: linear-gradient(135deg, transparent 50%, rgba(198, 255, 0, 0.16) 50%);
}

.archive-card:hover {
  border-color: rgba(198, 255, 0, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.archive-card__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.archive-card__title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--color-paper);
  margin-top: 8px;
}

.archive-card__score {
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  color: var(--color-accent);
  margin-top: 14px;
}

.archive-card__desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 240, 232, 0.65);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-paper);
  white-space: nowrap;
}

.badge--accent {
  background: rgba(198, 255, 0, 0.1);
  border-color: rgba(198, 255, 0, 0.35);
  color: var(--color-accent);
}

.badge--warn {
  background: rgba(255, 122, 0, 0.1);
  border-color: rgba(255, 122, 0, 0.4);
  color: var(--color-accent-2);
}

/* ---------- Category Filter ---------- */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-filter__btn {
  padding: 9px 20px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.8);
  transition: border-color 0.25s, color 0.25s, background-color 0.25s, transform 0.2s;
}

.category-filter__btn:hover {
  color: var(--color-paper);
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.category-filter__btn.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 700;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

/* ---------- Media Frame ---------- */
.media-frame {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
}

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

.media-frame--tilt {
  transform: rotate(-1.5deg);
}

.media-frame--tilt-rev {
  transform: rotate(1.5deg);
}

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

.media-frame__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.media-frame__placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198, 255, 0, 0.06) 25%, transparent 25%, transparent 75%, rgba(255, 122, 0, 0.06) 75%);
  background-size: 24px 24px;
}

/* ---------- Vertical Note ---------- */
.v-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--color-muted);
  line-height: 1.6;
}

/* ---------- Diagonal Line ---------- */
.diagonal-line {
  display: block;
  width: 100%;
  max-width: 120px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  transform: skewX(-24deg);
}

/* ---------- Utility ---------- */
.text-accent { color: var(--color-accent); }
.text-orange { color: var(--color-accent-2); }
.text-muted { color: var(--color-muted); }
.text-paper { color: var(--color-paper); }
.font-title { font-family: var(--font-title); }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.mb-lg { margin-bottom: 32px; }

body.nav-locked {
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 32px;
  }

  .site-footer__trust {
    max-width: 260px;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(320px, 85vw);
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background: #0f0f0f;
    border-left: 1px solid var(--color-border);
    padding: 28px 20px 40px;
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1000;
  }

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

  .site-nav::before {
    content: "导航档案 / NAVIGATION";
    display: block;
    font-family: var(--font-title);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--color-muted);
    padding: 4px 16px 24px;
    text-transform: uppercase;
  }

  .site-nav__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border-radius: var(--radius-m);
    font-size: 17px;
    font-weight: 700;
    color: rgba(245, 240, 232, 0.85);
    transition: background-color 0.2s, color 0.2s;
  }

  .site-nav__link::before {
    font-size: 12px;
  }

  .site-nav__link:hover {
    background: var(--color-surface);
    color: var(--color-paper);
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(198, 255, 0, 0.1);
    color: var(--color-accent);
  }

  .site-header__cta {
    padding: 8px 16px;
    font-size: 13px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 48px 32px;
  }

  .site-footer__trust {
    max-width: 420px;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .content {
    width: min(100% - 28px, 960px);
  }

  .site-brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .site-brand__mark::after {
    font-size: 19px;
  }

  .site-brand__logo {
    font-size: 16px;
  }

  .site-brand__sub {
    font-size: 9px;
  }

  .site-header__actions {
    gap: 6px;
  }

  .site-header__cta {
    font-size: 12px;
    padding: 7px 13px;
  }

  .site-header__cta::after {
    margin-left: 3px;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }

  .grid--2col,
  .grid--3col {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .section-head__note {
    display: none;
  }
}

/* ---------- Desktop Nav ---------- */
@media (min-width: 861px) {
  .site-nav {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: rgba(245, 240, 232, 0.78);
    white-space: nowrap;
    position: relative;
    transition: background-color 0.25s, color 0.25s;
  }

  .site-nav__link:hover {
    color: var(--color-paper);
    background: rgba(255, 122, 0, 0.12);
  }

  .site-nav__link[aria-current="page"] {
    color: var(--color-accent);
    background: rgba(198, 255, 0, 0.1);
  }

  .site-nav__link[aria-current="page"]::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
  }

  .site-overlay {
    display: none;
  }
}

/* ---------- Reduced Motion ---------- */
@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;
  }
}
