/* ==========================================================================
   十博体育官网 · 共享站点样式
   文件：/assets/site.css
   ========================================================================== */

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

:root {
  --c-bg: #0A1F3C;
  --c-bg-2: #123153;
  --c-gold: #F5B301;
  --c-gold-2: #FFD700;
  --c-red: #E64545;
  --c-light: #F4F6F9;
  --c-white: #FFFFFF;
  --c-sblue: #B0C4DE;
  --c-ink: #1A1A2E;
  --c-border: #334B68;
  --c-border-light: #E5E9F0;
  --c-muted: #6B7280;

  --font-head: 'Noto Serif SC', 'Source Han Serif CN', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'Source Han Sans CN', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  --track-w: 280px;
  --mobile-h: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 10px rgba(10, 31, 60, 0.06);
  --shadow-md: 0 12px 36px rgba(10, 31, 60, 0.14);
  --content-max: 1200px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-ink);
  background: var(--c-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--c-bg-2);
  text-decoration-thickness: 1px;
}

button {
  font-family: inherit;
  font-size: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.3;
}

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

#main-content {
  display: block;
  flex: 1;
  width: 100%;
}

/* ---------- 2. 通用布局 ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding: 56px 0;
}

.section-light {
  background: var(--c-white);
}

.section-tint {
  background: var(--c-light);
}

.section-dark {
  background: var(--c-bg);
  color: var(--c-sblue);
}

.section-dark .section-title,
.section-dark h2,
.section-dark h3 {
  color: var(--c-white);
}

.section-header {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  color: var(--c-ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.7;
  max-width: 660px;
}

.section-body {
  width: 100%;
}

/* ---------- 3. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-gold {
  background: var(--c-gold);
  color: var(--c-bg);
  border-color: var(--c-gold);
  box-shadow: 0 4px 14px rgba(245, 179, 1, 0.28);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: var(--c-gold-2);
  border-color: var(--c-gold-2);
  color: var(--c-bg);
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.32);
}

.btn-outline {
  background: transparent;
  color: var(--c-gold);
  border-color: var(--c-gold);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(245, 179, 1, 0.1);
  border-color: var(--c-gold-2);
  color: var(--c-gold-2);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 5px;
  box-shadow: none;
}

.btn-block {
  display: flex;
  width: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  font-size: 13px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: '/';
  color: var(--c-border-light);
}

.breadcrumb a {
  color: var(--c-bg-2);
  text-decoration: none;
}

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

.card {
  background: var(--c-white);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  border: 1px solid transparent;
}

.badge-gold {
  background: rgba(245, 179, 1, 0.12);
  color: #996F00;
  border-color: rgba(245, 179, 1, 0.4);
}

.badge-red {
  background: rgba(230, 69, 69, 0.1);
  color: var(--c-red);
  border-color: rgba(230, 69, 69, 0.3);
}

.badge-blue {
  background: rgba(18, 49, 83, 0.08);
  color: var(--c-bg-2);
  border-color: rgba(18, 49, 83, 0.2);
}

.divider {
  height: 1px;
  border: none;
  background: linear-gradient(to right, transparent, var(--c-border-light), transparent);
  margin: 24px 0;
}

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

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

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

.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(18, 49, 83, 0.18), rgba(10, 31, 60, 0.1));
  border: 1px solid var(--c-border-light);
}

.img-frame::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.img-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame.is-portrait::before {
  padding-top: 120%;
}

.img-frame.is-square::before {
  padding-top: 100%;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius);
  background: var(--c-white);
  box-shadow: var(--shadow-sm);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-data);
}

.table-wrap th,
.table-wrap td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--c-border-light);
  white-space: nowrap;
}

.table-wrap th {
  background: var(--c-bg);
  color: var(--c-gold);
  font-family: var(--font-body);
  font-weight: 700;
  position: sticky;
  top: 0;
}

.table-wrap tr:last-child td {
  border-bottom: none;
}

.page-hero {
  background: linear-gradient(135deg, var(--c-bg), var(--c-bg-2));
  color: var(--c-white);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 4px;
  background: var(--c-red);
}

.page-hero::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 179, 1, 0.22), transparent 70%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--c-white);
  margin-bottom: 8px;
}

.page-hero-subtitle {
  color: var(--c-sblue);
  font-size: 16px;
  max-width: 640px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--track-w);
  height: 100vh;
  z-index: 100;
  background: var(--c-bg);
  border-right: 1px solid var(--c-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: fixed;
  top: -140px;
  left: 16px;
  z-index: 3000;
  background: var(--c-gold);
  color: var(--c-bg);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}

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

.header-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-2), var(--c-red));
  z-index: 2500;
  pointer-events: none;
  border-radius: 0 3px 3px 0;
}

.header-mobile {
  display: none;
}

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

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-2));
  color: var(--c-bg);
  font-family: var(--font-data);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: 0 3px 14px rgba(245, 179, 1, 0.35);
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--c-white);
}

.brand-name span {
  color: var(--c-gold);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  gap: 5px;
  padding: 0;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-white);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

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

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--c-gold);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--c-gold);
}

.header-track {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px 20px 24px;
  overflow-y: auto;
}

.track-header {
  position: relative;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border);
}

.track-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-gold), transparent);
}

.track-header .brand-name {
  font-size: 22px;
}

.track-section {
  position: relative;
  margin: 18px 0 22px;
  padding: 8px 14px;
  background: rgba(245, 179, 1, 0.08);
  border-left: 3px solid var(--c-gold);
  color: var(--c-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
}

.track-section::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-red);
  margin-right: 10px;
  box-shadow: 0 0 0 2px rgba(230, 69, 69, 0.28);
  flex-shrink: 0;
}

.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--c-sblue);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.nav-link:hover {
  color: var(--c-white);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link[aria-current="page"] {
  background: rgba(245, 179, 1, 0.12);
  border-color: rgba(245, 179, 1, 0.25);
  color: var(--c-gold);
  font-weight: 700;
}

.nav-index {
  font-family: var(--font-data);
  font-size: 12px;
  width: 26px;
  opacity: 0.7;
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover .nav-index {
  color: var(--c-gold);
  transform: translateX(2px);
}

.nav-label {
  flex: 1;
}

.track-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

.track-slogan {
  text-align: center;
  font-size: 12px;
  color: var(--c-sblue);
  letter-spacing: 0.08em;
  margin-top: 12px;
}

/* 桌面端 body 偏移 */
@media (min-width: 1025px) {
  body {
    padding-left: var(--track-w);
  }

  .header-track {
    height: 100%;
  }

  .header-mobile {
    display: none;
  }

  .nav-toggle {
    display: none;
  }
}

/* ---------- 5. 移动端导航 ---------- */
@media (max-width: 1024px) {
  body {
    padding-left: 0;
  }

  .site-header {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    overflow: visible;
  }

  .header-mobile {
    display: block;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--mobile-h);
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
  }

  .header-mobile-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 14px;
  }

  .header-mobile .brand-link {
    text-decoration: none;
  }

  .header-mobile-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-section {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-gold);
    background: rgba(245, 179, 1, 0.1);
    border: 1px solid rgba(245, 179, 1, 0.3);
    border-radius: 100px;
    padding: 3px 10px;
    white-space: nowrap;
  }

  .header-track {
    position: fixed;
    top: var(--mobile-h);
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: var(--c-bg);
    border-right: 1px solid var(--c-border);
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.3);
    z-index: 900;
    padding: 20px 16px 24px;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .header-track.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease;
  }

  .track-header {
    display: none;
  }

  .track-section {
    margin: 0 0 18px;
    padding: 7px 12px;
  }

  .track-footer {
    margin-top: 16px;
  }

  .nav-locked {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .mobile-section {
    display: none;
  }

  .header-mobile-right {
    gap: 6px;
  }
}

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  background: var(--c-bg);
  color: var(--c-sblue);
  flex-shrink: 0;
}

.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--c-gold), transparent 55%);
}

.footer-top {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px 36px;
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.8fr;
  gap: 40px;
}

.footer-brand .brand-link {
  text-decoration: none;
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.75;
  max-width: 360px;
  color: var(--c-sblue);
}

.footer-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  font-family: var(--font-body);
}

.footer-list li {
  margin-bottom: 9px;
}

.footer-list a {
  color: var(--c-sblue);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: var(--c-gold);
}

.footer-contacts p {
  font-size: 14px;
  margin-bottom: 7px;
  line-height: 1.6;
  color: var(--c-sblue);
}

.footer-bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal {
  display: flex;
  gap: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}

.footer-legal a {
  color: var(--c-sblue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--c-gold);
}

.footer-copy {
  font-size: 13px;
  color: var(--c-sblue);
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 1px solid var(--c-gold);
  color: var(--c-gold);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  box-shadow: 0 4px 16px rgba(10, 31, 60, 0.3);
}

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

.back-top:hover {
  background: var(--c-bg-2);
  color: var(--c-gold-2);
}

.back-top-icon {
  display: inline-block;
  line-height: 1;
  transform: scale(1.2);
}

/* ---------- 7. Footer 响应式 ---------- */
@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 20px 28px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 40px 0;
  }

  .container,
  .container-narrow {
    padding-inline: 16px;
  }

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

  .page-hero {
    padding: 40px 0;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 18px 16px;
  }

  .footer-legal {
    justify-content: center;
  }

  .back-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ---------- 8. 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .header-track {
    transition: none;
  }
}
