/* ================================================================
   欧亿体育官方 — sync-ouyi.com.cn
   共享 Site Kit
   ================================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --bg-primary: #0B1D2E;
  --bg-secondary: #11243A;
  --accent-green: #00FF88;
  --accent-orange: #FF8C00;
  --text-primary: #EAF2F8;
  --text-secondary: #8AA0B0;
  --border: #1E3A4F;
  --data-highlight: #00D8FF;
  --font-heading: Oswald, "Noto Sans SC", sans-serif;
  --font-body: Inter, "Noto Sans SC", sans-serif;
  --font-mono: "Roboto Mono", monospace;
  --header-w: 248px;
  --header-h: 64px;
  --content-w: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  min-height: 100vh;
  padding-top: var(--header-h);
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

ul,
ol {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  max-width: 65ch;
}

::selection {
  background: rgba(0, 255, 136, 0.28);
  color: var(--text-primary);
}

/* ---------- 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--accent-green);
  color: #062719;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: top 0.24s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--header-h);
  padding: 0 14px 0 16px;
  background: rgba(11, 29, 46, 0.97);
  border-bottom: 1px solid var(--border);
}

.brand {
  position: relative;
  z-index: 116;
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-cn {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-tag {
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* 移动导航按钮 */
.nav-toggle {
  position: relative;
  z-index: 116;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 64px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  transition: border-color 0.3s ease;
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  transition: background 0.3s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s ease, top 0.3s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-toggle-label {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- 导航（移动抽屉） ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 112;
  display: flex;
  flex-direction: column;
  width: min(320px, 84vw);
  padding: calc(var(--header-h) + 16px) 20px 24px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0.35s var(--ease);
}

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

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-left: 3px solid transparent;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, padding-left 0.3s ease;
}

.nav-link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--border);
  transform: rotate(45deg);
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
  color: var(--accent-green);
  padding-left: 18px;
}

.nav-link:hover::before,
.nav-link[aria-current="page"]::before {
  background: var(--accent-green);
  transform: rotate(0deg);
}

.nav-link[aria-current="page"] {
  color: var(--accent-green);
  border-left-color: var(--accent-green);
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.08), rgba(0, 255, 136, 0) 72%);
}

.nav-quick-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.nav-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 111;
  background: rgba(3, 10, 18, 0.66);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.nav-open .nav-backdrop {
  opacity: 1;
  visibility: visible;
}

/* ---------- 实时状态与滚动进度 ---------- */
.header-meta {
  display: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  animation: livePulse 1.8s var(--ease) infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.55);
  }
  75%,
  100% {
    box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
  }
}

.header-meta-version {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  pointer-events: none;
  z-index: 5;
}

.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), var(--data-highlight));
}

/* ---------- 桌面侧边轨道 ---------- */
@media (min-width: 1024px) {
  body {
    padding-top: 0;
    padding-left: var(--header-w);
  }

  body.nav-open {
    overflow: auto;
  }

  .site-header {
    right: auto;
    bottom: 0;
    width: var(--header-w);
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    background: var(--bg-secondary);
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .brand {
    padding: 28px 20px 22px;
    border-bottom: 1px solid var(--border);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .site-nav {
    position: static;
    flex: 1;
    width: auto;
    padding: 18px 0 28px;
    background: transparent;
    border-right: 0;
    overflow: visible;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .nav-list {
    gap: 2px;
  }

  .nav-link {
    padding: 10px 20px;
    font-size: 15px;
  }

  .nav-quick-contact {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .nav-backdrop {
    display: none;
  }

  .header-meta {
    display: block;
    padding: 18px 20px 24px;
    border-top: 1px solid var(--border);
  }

  .scroll-progress {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 2px;
    height: auto;
  }

  .scroll-progress span {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-green), var(--data-highlight), var(--accent-orange));
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 48px 20px 32px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
}

.footer-accent-line {
  height: 2px;
  margin-bottom: 36px;
  background: linear-gradient(90deg, var(--accent-green), var(--data-highlight), var(--accent-orange));
}

.footer-grid {
  display: grid;
  gap: 32px;
  width: calc(100% - 32px);
  max-width: var(--content-w);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

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

.footer-head {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

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

.footer-link {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-primary);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-link:hover {
  color: var(--accent-green);
  padding-left: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-service-note {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--data-highlight);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  width: calc(100% - 32px);
  max-width: var(--content-w);
  margin: 36px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.3fr;
    gap: 48px;
  }
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  clip-path: polygon(0 0, 100% 10px, 100% 100%, 10px 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.back-to-top:hover {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.back-to-top:hover svg {
  color: #062719;
}

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

@media (max-width: 639px) {
  .back-to-top {
    right: 12px;
    bottom: 16px;
  }
}

/* ---------- 内容容器、展区与栅格 ---------- */
#main-content {
  display: block;
}

.container {
  width: calc(100% - 32px);
  max-width: var(--content-w);
  margin-inline: auto;
}

.container-narrow {
  width: calc(100% - 32px);
  max-width: 760px;
  margin-inline: auto;
}

.section {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 36px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 5px 12px;
  background: rgba(0, 255, 136, 0.06);
  border-left: 2px solid var(--accent-green);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
}

.section-desc {
  margin-top: 10px;
  color: var(--text-secondary);
}

.grid {
  display: grid;
  gap: 24px;
}

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

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- 卡片 ---------- */
.card {
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: var(--data-highlight);
  transform: translateY(-3px);
}

.card-title {
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 18px;
}

.card-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn-primary {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #062719;
}

.btn-primary:hover {
  background: rgba(0, 255, 136, 0.85);
  border-color: var(--accent-green);
  color: #041A10;
}

.btn-ghost {
  background: rgba(0, 255, 136, 0.05);
  border-color: rgba(0, 255, 136, 0.35);
  color: var(--accent-green);
}

.btn-ghost:hover {
  background: var(--accent-green);
  color: #062719;
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

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

.breadcrumbs a:hover {
  color: var(--accent-green);
}

.breadcrumbs-sep {
  color: var(--border);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text-primary);
}

/* ---------- 媒体占位容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--bg-secondary), var(--bg-primary));
  border: 1px solid var(--border);
}

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

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

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

.media::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40px;
  height: 40px;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, 0.04) 6px 12px);
  pointer-events: none;
}

/* ---------- 减弱动效 ---------- */
@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;
  }
}
