/* ============================================================= */
/* 江南竞界 JN Sports Hub — 全站共享样式 /assets/site.css           */
/* ============================================================= */

/* ---- CSS Variables ---- */
:root {
  --bg-deep: #0B1D3A;
  --bg-mid: #1A3A5C;
  --bg-card: rgba(26, 58, 92, 0.55);
  --primary: #E63946;
  --primary-dark: #C12230;
  --navy: #1D3557;
  --gold: #FFD700;
  --text-light: #F1FAEE;
  --text-secondary: #A8DADC;
  --border: #457B9D;
  --font-heading: 'Archivo Black', Impact, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Arial Black', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  --content-max: 1200px;
  --content-pad: clamp(16px, 4vw, 32px);
}

/* ---- Reset ---- */
*, *::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: 16px;
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 80% 10%, rgba(26, 58, 92, 0.45) 0%, transparent 55%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-deep) 45%, var(--bg-mid) 100%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul, ol {
  list-style: none;
}

/* ---- 中文排版 ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--text-light);
  margin-bottom: 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(40px, 7vw, 72px); }
h2 { font-size: clamp(28px, 4.5vw, 44px); }
h3 { font-size: clamp(21px, 3vw, 28px); }
h4 { font-size: 20px; }
h5 { font-size: 17px; }
h6 { font-size: 15px; }

p {
  margin-bottom: 1em;
  color: var(--text-light);
}

small {
  font-size: 0.85em;
  color: var(--text-secondary);
}

strong, b {
  font-weight: 600;
  color: var(--gold);
}

a {
  transition: color 0.2s ease;
}

/* ---- 焦点可见性 ---- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---- 布局容器 ---- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

.main-content,
#main-content {
  flex: 1;
  width: 100%;
  outline: none;
  scroll-margin-top: 20px;
  padding-block: 0 60px;
}

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  top: -56px;
  left: 16px;
  z-index: 1200;
  display: inline-block;
  padding: 10px 22px;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 15px;
  border-radius: 0 0 4px 4px;
  transition: top 0.22s ease;
}

.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--primary);
  outline-offset: 0;
  border-radius: 0 0 4px 4px;
}

/* ---- 滚动进度条 ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1200;
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---- Header 整体 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 29, 58, 0.97);
  border-bottom: 1px solid rgba(69, 123, 157, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

/* ---- Header 上层：品牌信息 ---- */
.header-top {
  background: rgba(11, 29, 58, 0.85);
  border-bottom: 1px solid rgba(69, 123, 157, 0.25);
  background-image:
    linear-gradient(to right, rgba(69, 123, 157, 0.065) 1px, transparent 1px);
  background-size: 80px 100%;
}

.header-top__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 58px;
}

.header-top__right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ---- 品牌标 ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__cn {
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand__jin {
  color: var(--gold);
}

.brand__jie {
  color: var(--primary);
}

.brand__en {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 6px 2px;
  line-height: 1.4;
  align-self: center;
  transition: color 0.22s ease, border-color 0.22s ease;
}

.brand:hover .brand__en {
  color: var(--gold);
  border-color: var(--gold);
}

.brand--footer .brand__cn {
  font-size: 32px;
}

.brand--footer .brand__en {
  font-size: 12px;
  padding: 3px 7px 2px;
}

/* ---- 副标题说明 ---- */
.header-tagline {
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ---- 信任词 ---- */
.header-trust {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ---- 汉堡按钮 ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(26, 58, 92, 0.4);
  transition: border-color 0.22s ease, background 0.22s ease;
  flex-shrink: 0;
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(230, 57, 70, 0.15);
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
}

.nav-toggle:hover .nav-toggle__bar {
  background: var(--gold);
}

.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);
}

/* ---- Header 下层：主栏目 ---- */
.header-bottom {
  position: relative;
  background: rgba(13, 34, 66, 0.85);
  background-image:
    linear-gradient(to right, rgba(69, 123, 157, 0.05) 1px, transparent 1px);
  background-size: 72px 100%;
  border-top: 1px solid rgba(69, 123, 157, 0.18);
}

.header-bottom::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--gold) 100%);
  z-index: 1;
}

.header-bottom::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 160px;
  height: 100%;
  background: repeating-linear-gradient(
    135deg,
    transparent 0px,
    transparent 10px,
    rgba(230, 57, 70, 0.28) 10px,
    rgba(230, 57, 70, 0.28) 11px,
    transparent 11px,
    transparent 16px,
    rgba(255, 215, 0, 0.18) 16px,
    rgba(255, 215, 0, 0.18) 17px,
    transparent 17px,
    transparent 22px
  );
  clip-path: polygon(85% 0, 100% 0, 100% 100%, 65% 100%);
  pointer-events: none;
  opacity: 0.55;
}

.header-bottom__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 52px;
}

/* ---- 导航 ---- */
.site-nav {
  width: 100%;
}

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

.nav-list__item {
  flex-shrink: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-light);
  transition: color 0.22s ease, background 0.22s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--gold);
  background: rgba(230, 57, 70, 0.08);
}

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

.nav-link[aria-current="page"]::after {
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
}

/* ---- 页脚 ---- */
.site-footer {
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
  background: rgba(11, 29, 58, 0.97);
  border-top: 1px solid rgba(69, 123, 157, 0.3);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 26%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 70%, var(--gold) 70%, var(--gold) 100%);
  z-index: 2;
}

.site-footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 8px;
  background: repeating-linear-gradient(
    135deg,
    var(--primary) 0px,
    var(--primary) 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: 0.4;
  pointer-events: none;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 40px;
  padding-block: 56px 44px;
}

.footer-brand-col .brand {
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.footer-desc {
  max-width: 34em;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.footer-trust {
  display: inline-block;
  padding: 8px 14px;
  border-left: 3px solid var(--primary);
  background: rgba(230, 57, 70, 0.08);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 18px;
  padding-bottom: 8px;
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--primary);
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-light);
  transition: color 0.22s ease, padding-left 0.22s ease;
}

.footer-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.22s ease;
}

.footer-nav a:hover {
  color: var(--gold);
  padding-left: 16px;
}

.footer-nav a:hover::before {
  width: 10px;
}

/* ---- 联系方式 ---- */
.footer-contact__item {
  margin-bottom: 16px;
}

.footer-contact__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}

.footer-contact__value {
  display: block;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-light);
}

/* ---- 页脚底部 ---- */
.footer-bottom {
  border-top: 1px solid rgba(69, 123, 157, 0.25);
  background: rgba(11, 29, 58, 0.6);
}

.footer-bottom__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px;
}

.footer-copyright {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-icp {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* ---- 通用按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.22s ease, box-shadow 0.25s ease;
  white-space: nowrap;
  text-align: center;
}

.btn--primary {
  background: var(--primary);
  color: #FFFFFF;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.35);
}

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-light);
}

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

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

.btn--gold:hover {
  background: #FFED4A;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* ---- 面包屑 ---- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 20px 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--gold);
}

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

.breadcrumb__current {
  color: var(--text-light);
  font-weight: 500;
}

/* 注意：面包屑可能会根据页面层级使用 a 或 span，页面模板自行决定 */

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

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

/* ---- 信息面板 ---- */
.panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 28px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.22s ease;
}

.panel:hover {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(26, 58, 92, 0.72);
}

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

.panel__title {
  font-family: var(--font-heading);
  font-size: 19px;
  color: var(--text-light);
  margin-bottom: 12px;
}

/* ---- 图片容器（页面阶段使用） ---- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
  border: 1px solid var(--border);
}

.media-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 0%, rgba(230, 57, 70, 0.08) 50%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

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

.media-frame__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 16px 10px;
  background: linear-gradient(0deg, rgba(11, 29, 58, 0.9) 0%, transparent 100%);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  z-index: 2;
}

/* ---- 章节索引标签 ---- */
.section-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.section-index::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--primary);
  flex-shrink: 0;
}

/* ---- 数据展示块 ---- */
.stat-block {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 18px;
}

.stat-block__number {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.15;
  color: var(--gold);
  display: block;
}

.stat-block__label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-top: 4px;
  display: block;
}

/* ---- 响应式 Header ---- */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-trust {
    display: none;
  }

  .header-bottom {
    position: relative;
    z-index: 10;
    min-height: 0;
  }

  .header-bottom__inner {
    min-height: 0;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: rgba(11, 29, 58, 0.98);
    border-bottom: 1px solid rgba(69, 123, 157, 0.35);
    border-top: 1px solid rgba(230, 57, 70, 0.3);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
    transition: max-height 0.4s ease, opacity 0.35s ease;
  }

  .site-nav[data-open] {
    max-height: 440px;
    opacity: 1;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  .nav-list__item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    min-height: 50px;
    padding: 13px 24px 13px 28px;
    font-size: 16px;
    font-weight: 500;
    border-left: 3px solid transparent;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link[aria-current="page"] {
    background: rgba(230, 57, 70, 0.1);
    border-left-color: var(--primary);
  }

  .header-bottom::after {
    opacity: 0.3;
  }
}

@media (max-width: 720px) {
  .header-tagline {
    display: none;
  }

  .header-top__inner {
    min-height: 54px;
  }

  .brand__cn {
    font-size: 24px;
  }

  .brand__en {
    font-size: 11px;
  }
}

/* ---- 响应式 Footer ---- */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding-block: 44px 36px;
  }
}

@media (max-width: 600px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 36px 32px;
  }

  .footer-bottom__inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 6px;
  }
}

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

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ---- 响应式按钮 ---- */
@media (max-width: 640px) {
  .btn {
    width: 100%;
    padding: 14px 24px;
  }
}

/* ---- 减少动态偏好 ---- */
@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;
    scroll-behavior: auto !important;
  }

  .scroll-progress {
    transition: none;
  }

  .nav-link::after {
    transition: none;
  }

  .site-nav {
    transition: none;
  }
}
