/* =========================================================
   site.css — 易倍体育首页平台 全局共享样式
   ========================================================= */

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

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

body {
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #F5F7FA;
  background-color: #0B0F19;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: #2AF5FF;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: #39FF14;
}

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

::selection {
  background: rgba(57, 255, 20, 0.25);
  color: #F5F7FA;
}

:focus-visible {
  outline: 2px solid #2AF5FF;
  outline-offset: 3px;
}

/* ---------- Design tokens ---------- */
:root {
  --bg-deep: #0B0F19;
  --bg-panel: #0A2E3D;
  --bg-wine: #5E2B3D;
  --bg-indigo: #3D2B5E;
  --accent-green: #39FF14;
  --accent-blue: #2AF5FF;
  --text-light: #F5F7FA;
  --text-mid: #A0A5B0;
  --num-yellow: #FFC107;
  --line-white: rgba(255, 255, 255, 0.1);

  --font-head: "Roboto Condensed", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Roboto Mono", Consolas, "Courier New", monospace;

  --header-h: 96px;
  --page-max: 1560px;
  --page-gutter: 32px;
  --rail-width: 30%;
}

/* ---------- Base layout ---------- */
.container {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.page-main {
  min-height: calc(100vh - var(--header-h));
  padding-top: calc(var(--header-h) + 24px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 16px;
  pointer-events: none;
}

.site-header__skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1002;
  padding: 8px 20px;
  background: var(--accent-green);
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 4px;
  pointer-events: auto;
  transition: top 0.2s ease;
}

.site-header__skip:focus-visible {
  top: 12px;
  color: var(--bg-deep);
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.site-header__progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  pointer-events: none;
  transition: width 0.12s ease-out;
}

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 10px 16px;
  background: rgba(11, 15, 25, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  flex-shrink: 0;
}

.site-header__brand-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.8);
  animation: header-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.site-header__brand-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-header__brand-text {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-header__brand-mark {
  color: var(--accent-green);
}

.site-header__brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 1px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header__nav {
  position: fixed;
  top: calc(var(--header-h) - 12px);
  left: 16px;
  right: 16px;
  z-index: 1003;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  background: rgba(11, 15, 25, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 2px solid var(--accent-green);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

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

.site-header__nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-header__nav-link:hover,
.site-header__nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-light);
}

.site-header__nav-link[aria-current="page"] {
  background: rgba(57, 255, 20, 0.12);
  color: var(--accent-green);
  font-weight: 700;
}

.site-header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: transparent;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.site-header__toggle:hover,
.site-header__toggle:focus-visible {
  border-color: var(--accent-green);
}

.site-header__toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header__toggle[aria-expanded="true"] .site-header__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

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

/* ---------- Header desktop ---------- */
@media (min-width: 1024px) {
  .site-header {
    padding: 16px 32px;
  }

  .site-header__bar {
    padding: 8px 12px 8px 20px;
    border-radius: 999px;
  }

  .site-header__brand {
    gap: 12px;
  }

  .site-header__brand-live {
    width: 8px;
    height: 8px;
  }

  .site-header__brand-text {
    font-size: 1.15rem;
  }

  .site-header__brand-sub {
    font-size: 0.7rem;
  }

  .site-header__nav {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 2px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    pointer-events: auto;
  }

  .site-header__nav[data-open] {
    transform: none;
  }

  .site-header__nav-link {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    text-align: center;
  }

  .site-header__nav-link[aria-current="page"] {
    background: var(--accent-green);
    color: var(--bg-deep);
  }

  .site-header__toggle {
    display: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, rgba(10, 46, 61, 0.4), rgba(10, 46, 61, 0.7)), var(--bg-deep);
  border-top: 1px solid var(--line-white);
  margin-top: 64px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green) 0%, transparent 80%);
  pointer-events: none;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px var(--page-gutter) 40px;
}

.site-footer__section {
  min-width: 0;
}

.site-footer__brand-text {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.2;
}

.site-footer__brand-mark {
  color: var(--accent-green);
}

.site-footer__trust {
  color: var(--text-mid);
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 420px;
}

.site-footer__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  word-break: break-all;
}

.site-footer__list a {
  color: var(--text-mid);
  transition: color 0.2s ease;
}

.site-footer__list a:hover,
.site-footer__list a:focus-visible {
  color: var(--accent-green);
}

.site-footer__meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 20px var(--page-gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-mid);
}

.site-footer__meta p {
  margin: 0;
}

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

@media (max-width: 640px) {
  .site-footer__meta {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- Back to top ---------- */
.site-footer__backtop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 25, 0.92);
  border: 1px solid rgba(57, 255, 20, 0.5);
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}

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

.site-footer__backtop:hover,
.site-footer__backtop:focus-visible {
  border-color: var(--accent-blue);
}

.site-footer__backtop-text {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  transition: color 0.2s ease;
  text-align: center;
}

.site-footer__backtop-text::before {
  content: "↑";
  display: block;
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 4px;
  text-align: center;
}

.site-footer__backtop:hover .site-footer__backtop-text,
.site-footer__backtop:focus-visible .site-footer__backtop-text {
  color: var(--accent-blue);
}

/* ---------- Split layout ---------- */
.page-shell {
  display: grid;
  grid-template-columns: minmax(240px, var(--rail-width)) 1fr;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter) 80px;
}

.page-shell__rail {
  border-right: 1px solid var(--line-white);
  padding: 48px 32px 48px 0;
  min-width: 0;
}

.page-shell__content {
  padding: 48px 0 48px 32px;
  min-width: 0;
}

@media (max-width: 1024px) {
  .page-shell {
    grid-template-columns: 1fr;
    padding: 0 20px 64px;
  }

  .page-shell__rail {
    border-right: none;
    border-bottom: 1px solid var(--line-white);
    padding: 24px 0 32px;
  }

  .page-shell__content {
    padding: 32px 0 0;
  }
}

/* ---------- Grid system ---------- */
.grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
}

.col-span-1 {
  grid-column: span 1;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-3 {
  grid-column: span 3;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-5 {
  grid-column: span 5;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-7 {
  grid-column: span 7;
}

.col-span-8 {
  grid-column: span 8;
}

@media (max-width: 1200px) {
  .grid-8 {
    grid-template-columns: repeat(4, 1fr);
  }

  .col-span-1 {
    grid-column: span 1;
  }

  .col-span-2 {
    grid-column: span 2;
  }

  .col-span-3 {
    grid-column: span 3;
  }

  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8 {
    grid-column: span 4;
  }
}

@media (max-width: 640px) {
  .grid-8 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .col-span-1,
  .col-span-2,
  .col-span-3,
  .col-span-4,
  .col-span-5,
  .col-span-6,
  .col-span-7,
  .col-span-8 {
    grid-column: auto;
  }
}

/* ---------- Section head ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-bottom: 28px;
}

.section-head__index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--accent-green);
  text-transform: uppercase;
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.2);
  padding: 2px 10px;
  border-radius: 2px;
  align-self: center;
}

.section-head__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  transform: skewX(-8deg);
  transform-origin: left center;
  color: var(--text-light);
}

.section-head__desc {
  width: 100%;
  color: var(--text-mid);
  font-size: 0.95rem;
  max-width: 640px;
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #4dff36;
  color: var(--bg-deep);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.25);
}

.btn--ghost {
  border-color: rgba(42, 245, 255, 0.5);
  color: var(--accent-blue);
  background: transparent;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(42, 245, 255, 0.08);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn--sm {
  padding: 7px 18px;
  font-size: 0.8rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-mid);
}

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

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent-green);
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-mid);
  opacity: 0.5;
  margin-right: 6px;
}

.breadcrumb__current {
  color: var(--text-mid);
}

/* ---------- Cards ---------- */
.card {
  background: rgba(10, 46, 61, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.card:hover,
.card:focus-within {
  border-color: rgba(42, 245, 255, 0.35);
}

.card--wine {
  background: linear-gradient(135deg, rgba(94, 43, 61, 0.85), rgba(11, 15, 25, 0.9));
  border-color: rgba(255, 255, 255, 0.06);
}

.card--indigo {
  background: linear-gradient(135deg, rgba(61, 43, 94, 0.85), rgba(11, 15, 25, 0.9));
  border-color: rgba(255, 255, 255, 0.06);
}

.card--stat {
  background: rgba(11, 15, 25, 0.7);
  border-color: rgba(57, 255, 20, 0.15);
  position: relative;
  overflow: hidden;
}

.card--stat::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.card__title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
}

.card__desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.card__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--num-yellow);
  line-height: 1.2;
  margin-bottom: 4px;
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-mid);
  background: transparent;
}

.tag--green {
  color: var(--accent-green);
  border-color: rgba(57, 255, 20, 0.35);
  background: rgba(57, 255, 20, 0.06);
}

.tag--blue {
  color: var(--accent-blue);
  border-color: rgba(42, 245, 255, 0.35);
  background: rgba(42, 245, 255, 0.06);
}

/* ---------- Data rows ---------- */
.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-row:last-child {
  border-bottom: none;
}

.data-row__label {
  font-size: 0.85rem;
  color: var(--text-mid);
}

.data-row__value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--num-yellow);
  white-space: nowrap;
}

.mono-num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
  color: var(--num-yellow);
  font-weight: 700;
}

/* ---------- Rail index ---------- */
.rail-index {
  display: flex;
  flex-direction: column;
}

.rail-index__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  color: var(--text-mid);
  font-size: 0.92rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rail-index__item:hover,
.rail-index__item:focus-visible {
  background: rgba(255, 255, 255, 0.03);
  border-left-color: var(--accent-green);
  color: var(--text-light);
}

.rail-index__item.is-active {
  border-left-color: var(--accent-green);
  background: rgba(57, 255, 20, 0.06);
  color: var(--text-light);
  font-weight: 600;
}

.rail-index__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.rail-index__tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

/* ---------- Image containers ---------- */
.img-ratio {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

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

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

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

.img-ratio--3x2 {
  aspect-ratio: 3 / 2;
}

.img-ratio img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-ratio__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  text-transform: uppercase;
  padding: 12px;
  text-align: center;
}

/* ---------- Media ---------- */
@media (max-width: 640px) {
  :root {
    --page-gutter: 20px;
  }

  .page-main {
    padding-top: calc(var(--header-h) + 8px);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

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

  .site-header__brand-live {
    animation: none;
  }
}
