/* ==========================================================
   浩瀚体育平台 Site Kit · 全站共享样式
   文件：/assets/site.css
   ========================================================== */

/* ---------- 1. CSS 变量 ---------- */
:root {
  --c-bg-dark: #0B1D3A;
  --c-bg-ink: #0A1128;
  --c-paper: #F5E9D7;
  --c-accent: #FF6B35;
  --c-accent-soft: rgba(255, 107, 53, 0.14);
  --c-neon: #39FF14;
  --c-white: #FFFFFF;
  --c-body: #E8EFF7;
  --c-muted: #8A9BB5;
  --c-link: #A3C6FF;
  --c-border: rgba(245, 233, 215, 0.12);
  --c-border-strong: rgba(245, 233, 215, 0.24);

  --font-display: Impact, '思源黑体 ExtraBold', 'Noto Sans CJK SC ExtraBold', sans-serif;
  --font-body: 'Roboto', '思源黑体', 'Noto Sans CJK SC', sans-serif;

  --container-max: 1200px;
  --radius-pill: 999px;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --header-z: 200;
  --nav-breakpoint: 900px;
}

/* ---------- 2. Reset 与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--c-body);
  background-color: var(--c-bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--c-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.5em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.08;
  color: var(--c-white);
}

h1 {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.04;
}

h3 {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.1;
}

h4 {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.25;
}

p {
  margin: 0 0 16px;
}

strong,
b {
  font-weight: 700;
}

hr {
  margin: 32px 0;
  border: none;
  border-top: 1px solid var(--c-border);
}

/* ---------- 3. 工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

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

.text-muted {
  color: var(--c-muted);
}

#main-content {
  min-height: 62vh;
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition-fast);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--c-accent);
  color: #0B1D3A;
}

.btn-primary:hover {
  background: #FF8555;
  color: #0B1D3A;
}

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

.btn-ghost:hover {
  background: var(--c-accent-soft);
  color: var(--c-accent);
}

/* ---------- 5. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 13px;
  color: var(--c-muted);
}

.breadcrumb a {
  color: var(--c-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.breadcrumb-sep {
  color: var(--c-muted);
  opacity: 0.45;
}

/* ---------- 6. 面板与章节头 ---------- */
.section-panel {
  padding: clamp(56px, 8vw, 96px) 0;
}

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

.section-panel--ink {
  background-color: var(--c-bg-ink);
  color: var(--c-body);
}

.section-panel--paper {
  background-color: var(--c-paper);
  color: #1A2440;
}

.section-panel--paper h1,
.section-panel--paper h2,
.section-panel--paper h3,
.section-panel--paper h4 {
  color: var(--c-bg-ink);
}

.section-panel--paper .text-muted {
  color: rgba(11, 29, 58, 0.65);
}

.section-panel--paper .eyebrow {
  color: var(--c-accent);
}

.section-panel--paper .eyebrow::before {
  background: var(--c-accent);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-neon);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* ---------- 7. 卡片 ---------- */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  background: rgba(245, 233, 215, 0.04);
  padding: clamp(20px, 3vw, 32px);
}

.card--paper {
  background: var(--c-paper);
  border-color: transparent;
  color: #1A2440;
}

.card--ink {
  background: var(--c-bg-ink);
  border-color: transparent;
}

/* ---------- 8. 图片容器 ---------- */
.media-box {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--c-bg-ink) 0%, rgba(11, 29, 58, 0.82) 100%);
  border: 1px solid var(--c-border);
  aspect-ratio: 16 / 9;
}

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

.media-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(57, 255, 20, 0.08);
  pointer-events: none;
}

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

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

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

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

/* ---------- 9. 数据表格基础 ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
}

.table-wrap table {
  min-width: 640px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-body);
}

th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--c-paper);
  border-bottom: 2px solid var(--c-border-strong);
  background: rgba(11, 29, 58, 0.4);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  font-variant-numeric: tabular-nums;
}

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

tr:hover td {
  background: rgba(163, 198, 255, 0.04);
}

/* ---------- 10. 品牌 ---------- */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--c-accent);
  box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.1);
}

.brand-mark::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.55);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--c-paper);
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--c-muted);
  white-space: nowrap;
}

/* ---------- 11. 无障碍跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--c-accent);
  color: #0B1D3A;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.skip-link:focus {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  text-decoration: none;
}

/* ---------- 12. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--header-z);
  background-color: var(--c-bg-dark);
  background-image:
    linear-gradient(rgba(163, 198, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 198, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--c-neon) 24%, var(--c-neon) 76%, transparent 100%);
  opacity: 0.72;
  pointer-events: none;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(57, 255, 20, 0.35);
  background: rgba(57, 255, 20, 0.07);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.72);
  }
}

.live-text {
  font-weight: 600;
}

/* ---------- 13. 主导航 ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 10px;
}

.site-nav-link {
  position: relative;
  display: inline-block;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--c-paper);
  border-radius: 10px 10px 0 0;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-nav-link:hover {
  color: var(--c-neon);
  background: rgba(57, 255, 20, 0.05);
  text-decoration: none;
}

.site-nav-link[aria-current="page"] {
  color: var(--c-accent);
  font-weight: 700;
}

.site-nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 48%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--c-accent);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
}

/* ---------- 14. 移动端菜单按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-pill);
  background: rgba(245, 233, 215, 0.03);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

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

.nav-toggle-label {
  display: inline-block;
  font-weight: 600;
}

.nav-toggle-icon {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  height: 14px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

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

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

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

/* ---------- 15. 页脚 ---------- */
.site-footer {
  position: relative;
  background-color: var(--c-bg-ink);
  background-image:
    linear-gradient(rgba(163, 198, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 198, 255, 0.028) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border);
}

.site-footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent) 0%, var(--c-neon) 42%, transparent 100%);
  opacity: 0.65;
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.footer-brand-col {
  min-width: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-brand:hover {
  text-decoration: none;
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.footer-brand .brand-name {
  font-size: 20px;
}

.footer-brand .brand-tagline {
  font-size: 10px;
}

.footer-trust {
  max-width: 360px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-muted);
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-paper);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  display: inline-block;
  font-size: 14px;
  color: var(--c-muted);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--c-accent);
  transform: translateX(4px);
}

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--c-muted);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--c-border);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--c-muted);
}

.footer-copy {
  margin: 0;
}

.footer-icp {
  margin: 0;
}

/* ---------- 16. 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--c-border-strong);
  background: rgba(11, 29, 58, 0.88);
  color: var(--c-paper);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition), color var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.back-top:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

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

/* ---------- 17. 滚动显现 ---------- */
html.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

html.js-enabled [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 18. 焦点状态 ---------- */
:focus-visible {
  outline: 3px solid var(--c-neon);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 19. 减少动效 ---------- */
@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;
    transition-delay: 0ms !important;
  }

  html.js-enabled [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .live-dot {
    animation: none;
  }

  .skip-link {
    transition: none;
  }
}

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

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 4px 0 20px;
  }

  .site-nav[data-open] {
    display: flex;
  }

  .site-nav-link {
    border-radius: var(--radius-md);
    padding: 12px 18px;
  }

  .site-nav-link[aria-current="page"] {
    background: var(--c-accent-soft);
  }

  .site-nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    width: 4px;
    height: 55%;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 6px rgba(255, 107, 53, 0.35);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding: 52px 0 40px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .live-badge {
    display: none;
  }

  .header-top {
    padding: 14px 0 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: auto;
  }

  .back-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 400px) {
  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-mark::before {
    width: 10px;
    height: 10px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .nav-toggle {
    padding: 8px 14px;
  }
}
