/* ===== NG体育 全站共享样式 ===== */

/* 1. Reset 与变量 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(rgba(216, 205, 184, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 205, 184, 0.16) 1px, transparent 1px),
    #F5EFE1;
  background-size: 40px 40px;
  color: #1D1D1B;
  font-family: "Noto Serif SC", "Source Han Serif CN", serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body {
    font-size: 18px;
  }
}

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

button {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

:root {
  --c-bg: #F5EFE1;
  --c-green: #1F5C4A;
  --c-blue: #142B4C;
  --c-gold: #C49B2E;
  --c-red: #E2552D;
  --c-ink: #1D1D1B;
  --c-gray: #6D6960;
  --c-line: #D8CDB8;
  --c-deep-green: #0E3B2E;
  --c-deep-blue: #0B1A2E;
  --font-title: "Noto Sans SC", "Source Han Sans CN", sans-serif;
  --font-body: "Noto Serif SC", "Source Han Serif CN", serif;
  --shadow-soft: 0 10px 30px rgba(20, 43, 76, 0.08);
  --radius-pill: 999px;
}

/* 2. 基础排版 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  font-weight: 900;
  line-height: 1.18;
  color: var(--c-ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
h4,
h5,
h6 { font-size: 1rem; }

p { margin: 0 0 1.25em; }

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

h2[id],
h3[id] {
  scroll-margin-top: 110px;
}

/* 3. 通用工具 */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* 4. 跳转链接与阅读进度 */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--c-green);
  color: var(--c-bg);
  border-radius: 0 0 14px 14px;
  font-family: var(--font-title);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 200;
  background: linear-gradient(90deg, var(--c-green), var(--c-gold));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* 5. 悬浮胶囊页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 16px 0;
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 12px 0 20px;
  background: rgba(245, 239, 225, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo__mark {
  display: block;
  width: 30px;
  height: 34px;
  background: linear-gradient(135deg, var(--c-green) 0 50%, var(--c-blue) 50% 100%);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: filter 0.2s ease;
}

.site-logo:hover .site-logo__mark {
  filter: drop-shadow(0 0 6px rgba(196, 155, 46, 0.7));
}

.site-logo__name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--c-green);
}

.site-nav__list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.site-nav__link {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--c-ink);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.site-nav__link:hover {
  background: var(--c-green);
  color: var(--c-bg);
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: var(--c-bg);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle__bar {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-green);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

/* 6. 桌面状态侧栏 */
.site-sidebar {
  position: fixed;
  left: 14px;
  top: 96px;
  width: 92px;
  z-index: 40;
}

.site-sidebar__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  background: var(--c-deep-blue);
  border: 1px solid rgba(196, 155, 46, 0.4);
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(11, 26, 46, 0.28);
}

.fav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 10px 4px;
  border: 1px solid rgba(245, 239, 225, 0.28);
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-bg);
  transition: border-color 0.18s, color 0.18s, background-color 0.18s;
}

.fav-toggle:hover,
.fav-toggle[aria-expanded="true"] {
  border-color: var(--c-gold);
  color: var(--c-gold);
  background: rgba(196, 155, 46, 0.1);
}

.fav-toggle__icon {
  font-size: 16px;
  line-height: 1;
  color: var(--c-gold);
}

.fav-toggle__text {
  line-height: 1.2;
}

.fav-panel {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  width: 176px;
  padding: 10px 8px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(20, 43, 76, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.fav-panel[data-open] {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.fav-panel__label {
  margin: 0 0 4px;
  padding: 0 6px;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-gray);
}

.fav-panel__link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  transition: background-color 0.16s, color 0.16s;
}

.fav-panel__link:hover {
  background: var(--c-green);
  color: var(--c-bg);
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 10px 4px;
  border-top: 1px solid rgba(245, 239, 225, 0.14);
  border-bottom: 1px solid rgba(245, 239, 225, 0.14);
}

.status-block__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-gold);
  box-shadow: 0 0 0 4px rgba(196, 155, 46, 0.2);
}

.status-block__label {
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  color: rgba(245, 239, 225, 0.72);
}

.status-block__time {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-gold);
  font-variant-numeric: tabular-nums;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(226, 85, 45, 0.55);
  background: rgba(226, 85, 45, 0.12);
  color: var(--c-bg);
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.update-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-red);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  max-height: 190px;
  overflow: auto;
  padding: 8px 2px 0;
  border-top: 1px solid rgba(245, 239, 225, 0.14);
}

.toc__link {
  display: block;
  padding: 3px 4px;
  border-radius: 6px;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(245, 239, 225, 0.7);
  text-decoration: none;
  transition: color 0.16s, background-color 0.16s;
}

.toc__link:hover {
  color: var(--c-gold);
  background: rgba(196, 155, 46, 0.1);
}

.toc__link--sub {
  padding-left: 12px;
  opacity: 0.85;
}

.toc__link--active {
  color: var(--c-gold);
  background: rgba(196, 155, 46, 0.12);
}

@media (min-width: 1024px) {
  .site-sidebar {
    display: block;
  }
  #main-content {
    margin-left: 122px;
  }
}

@media (max-width: 1023px) {
  .site-sidebar {
    display: none;
  }
}

#main-content {
  min-height: 70vh;
  padding-top: 32px;
  scroll-margin-top: 96px;
}

/* 7. 深绿页脚 */
.site-footer {
  position: relative;
  margin-top: 80px;
  background: var(--c-deep-green);
  color: rgba(245, 239, 225, 0.85);
}

.site-footer::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--c-gold) 0 8px, rgba(245, 239, 225, 0.28) 8px 16px);
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 40px;
}

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

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-footer__logo-mark {
  display: block;
  width: 26px;
  height: 30px;
  background: linear-gradient(135deg, var(--c-green) 0 50%, var(--c-blue) 50% 100%);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  transition: filter 0.2s ease;
}

.site-footer__logo:hover .site-footer__logo-mark {
  filter: drop-shadow(0 0 6px rgba(196, 155, 46, 0.7));
}

.site-footer__logo-name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 20px;
  color: var(--c-bg);
  letter-spacing: 0.02em;
}

.site-footer__about {
  margin: 0;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-bg);
}

.site-footer__trust {
  margin: 0;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 239, 225, 0.6);
}

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

.site-footer__heading {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-gold);
}

.site-footer__nav a {
  position: relative;
  width: fit-content;
  padding: 4px 0;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: rgba(245, 239, 225, 0.75);
  text-decoration: none;
  transition: color 0.16s;
}

.site-footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-footer__nav a:hover {
  color: var(--c-gold);
}

.site-footer__nav a:hover::after {
  transform: scaleX(1);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.site-footer__contact p {
  margin: 0;
}

.site-footer__bar {
  border-top: 1px solid rgba(245, 239, 225, 0.14);
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  font-size: 13px;
  color: rgba(245, 239, 225, 0.55);
}

.site-footer__bar p {
  margin: 0;
}

@media (max-width: 899px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px 24px;
  }
}

/* 8. 移动端导航状态 */
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 88px;
    left: 16px;
    right: 16px;
    z-index: 45;
    padding: 10px;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(20, 43, 76, 0.16);
    max-height: calc(100vh - 110px);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__link {
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 12px;
  }
}

/* 9. 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.btn--primary {
  background: var(--c-green);
  color: var(--c-bg);
}

.btn--primary:hover {
  background: var(--c-blue);
  color: var(--c-bg);
  box-shadow: 0 8px 18px rgba(20, 43, 76, 0.24);
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-green);
  color: var(--c-green);
}

.btn--ghost:hover {
  background: var(--c-green);
  color: var(--c-bg);
}

.btn--accent {
  background: var(--c-gold);
  color: var(--c-bg);
}

.btn--accent:hover {
  background: var(--c-red);
  color: var(--c-bg);
}

.btn--small {
  padding: 8px 14px;
  font-size: 13px;
}

/* 10. 面包屑 */
.breadcrumbs {
  padding: 18px 0;
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs__link {
  color: var(--c-green);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  color: var(--c-red);
}

.breadcrumbs__sep {
  color: var(--c-gray);
  padding: 0 2px;
}

.breadcrumbs__current {
  color: var(--c-gray);
}

/* 11. 版式容器 */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}

.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-ink);
}

.prose p {
  margin: 0 0 1.25em;
}

.prose a {
  color: var(--c-green);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0 2px;
  background-position: left 100%;
  transition: background-size 0.2s ease, color 0.2s ease;
}

.prose a:hover {
  color: var(--c-red);
  background-size: 100% 2px;
}

/* 12. 图片容器与标签 */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--c-line);
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(-45deg, rgba(31, 92, 74, 0.08) 0 10px, rgba(216, 205, 184, 0.35) 10px 20px);
}

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

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(transparent, rgba(11, 26, 46, 0.8));
  color: var(--c-bg);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-line);
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-gray);
  background: transparent;
}

.tag--hot {
  border-color: rgba(226, 85, 45, 0.5);
  color: var(--c-red);
  background: rgba(226, 85, 45, 0.06);
}

.tag--gold {
  border-color: rgba(196, 155, 46, 0.6);
  color: #8A6A14;
  background: rgba(196, 155, 46, 0.08);
}

/* 13. 焦点与动效偏好 */
:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
