/* ============================================================
   三亿竞界 — Shared Site CSS
   core-enter-sanyisports.com.cn /assets/site.css
   ============================================================ */

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

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

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Brand Colors */
  --c-blue: #0A1F44;
  --c-yellow: #FFD700;
  --c-red: #FF3B30;
  --c-cyan: #00E5FF;
  --c-silver: #F5F7FA;
  --c-gray: #2B2F3A;
  --c-white: #FFFFFF;
  --c-frost: #EDF1F7;

  /* Typography */
  --font-headline: Impact, "Arial Black", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Roboto Mono", Consolas, "Courier New", monospace;

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;

  /* Motion */
  --t-fast: 0.18s ease;
  --t-med: 0.32s ease;
  --t-slow: 0.55s cubic-bezier(0.22, 1, 0.36, 1);

  /* Shadows */
  --shadow-header: 0 8px 28px rgba(2, 8, 24, 0.45);
  --shadow-card: 6px 6px 0 rgba(10, 31, 68, 0.12);
  --shadow-raised: 10px 10px 0 rgba(10, 31, 68, 0.16);
}

/* ---------- 2. Base Typography & Links ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-blue);
  background: var(--c-silver);
}

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--c-red);
}

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

#main-content {
  outline: none;
  scroll-margin-top: var(--header-height);
}

:focus-visible {
  outline: 3px solid var(--c-cyan);
  outline-offset: 2px;
}

::selection {
  background: var(--c-yellow);
  color: var(--c-blue);
}

/* ---------- 3. Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.arena-divider {
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  background: linear-gradient(90deg,
    var(--c-yellow) 0% 62%,
    var(--c-red) 62% 84%,
    var(--c-cyan) 84% 100%);
}

.speed-lines {
  position: relative;
}

.speed-lines::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg,
    transparent 0 14px,
    rgba(255, 255, 255, 0.06) 14px 18px);
  pointer-events: none;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 700;
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--t-fast), color var(--t-fast),
    border-color var(--t-fast), transform var(--t-fast),
    box-shadow var(--t-fast);
}

.btn:focus-visible {
  outline: 3px solid var(--c-cyan);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--c-yellow);
  color: var(--c-blue);
  border-color: var(--c-yellow);
  box-shadow: 4px 4px 0 rgba(2, 8, 24, 0.3);
}

.btn--primary:hover {
  background: var(--c-blue);
  color: var(--c-yellow);
  border-color: var(--c-blue);
  box-shadow: 6px 6px 0 rgba(255, 215, 0, 0.35);
  transform: translate(-2px, -2px);
}

.btn--ghost {
  background: transparent;
  color: var(--c-white);
  border-color: var(--c-cyan);
  box-shadow: 4px 4px 0 rgba(0, 229, 255, 0.18);
}

.btn--ghost:hover {
  background: var(--c-cyan);
  color: var(--c-blue);
  box-shadow: 6px 6px 0 rgba(2, 8, 24, 0.3);
  transform: translate(-2px, -2px);
}

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

.btn--outline:hover {
  background: var(--c-blue);
  color: var(--c-yellow);
}

.btn--small {
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ---------- 5. Section ---------- */
.section {
  padding-block: 64px;
  position: relative;
}

.section__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 28px;
}

.section__number {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-red);
}

.section__title {
  font-family: var(--font-headline);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.1;
  color: var(--c-blue);
  letter-spacing: 0.02em;
}

.section__desc {
  width: 100%;
  max-width: 62ch;
  font-size: 15px;
  color: var(--c-gray);
}

/* ---------- 6. Grid ---------- */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

[data-grid="2"],
[data-grid="3"],
[data-grid="4"] {
  display: grid;
  gap: 24px;
}

[data-grid="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-grid="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-grid="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- 7. Card ---------- */
.card {
  background: var(--c-white);
  border: 2px solid var(--c-gray);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: transform var(--t-fast), box-shadow var(--t-fast),
    border-color var(--t-fast);
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-raised);
  border-color: var(--c-yellow);
}

.card__title {
  font-family: var(--font-headline);
  font-size: 20px;
  color: var(--c-blue);
  margin-bottom: 10px;
}

.card__text {
  font-size: 14px;
  color: var(--c-gray);
}

/* ---------- 8. Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  background: var(--c-blue);
  color: var(--c-white);
}

.tag--live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-red);
  animation: pulse 1.6s ease-in-out infinite;
}

.tag--hot {
  background: var(--c-yellow);
  color: var(--c-blue);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

/* ---------- 9. Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: 24px;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
}

.breadcrumb__item {
  color: var(--c-gray);
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.breadcrumb__link {
  color: var(--c-gray);
  text-decoration: none;
}

.breadcrumb__link:hover {
  color: var(--c-red);
}

.breadcrumb__current {
  color: var(--c-blue);
  font-weight: 700;
}

/* ---------- 10. Score Table ---------- */
.score-table {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--c-white);
  border: 2px solid var(--c-gray);
  box-shadow: var(--shadow-card);
}

.score-table thead {
  background: var(--c-blue);
}

.score-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  color: var(--c-yellow);
  border-bottom: 3px solid var(--c-red);
}

.score-table td {
  padding: 12px 16px;
  color: var(--c-gray);
  border-bottom: 1px solid var(--c-frost);
  font-variant-numeric: tabular-nums;
}

.score-table tbody tr:hover td {
  background: var(--c-frost);
  color: var(--c-blue);
}

.score-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- 11. Image Frame ---------- */
.image-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--c-blue);
  background-image: repeating-linear-gradient(-45deg,
    transparent 0 16px,
    rgba(255, 255, 255, 0.05) 16px 20px);
  border: 2px solid var(--c-gray);
}

.image-frame::after {
  content: "IMG · 赛事图片";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.image-frame:has(.image-frame__img)::after {
  display: none;
}

.image-frame__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame--4-3 {
  aspect-ratio: 4 / 3;
}

.image-frame--square {
  aspect-ratio: 1 / 1;
}

.image-frame--tall {
  aspect-ratio: 3 / 4;
}

/* ---------- 12. Skip Link & Progress ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 24px;
  z-index: 2000;
  display: inline-block;
  padding: 12px 20px;
  background: var(--c-yellow);
  color: var(--c-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(2, 8, 24, 0.35);
  transition: top var(--t-med);
}

.skip-link:focus {
  top: 12px;
  color: var(--c-blue);
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg,
    var(--c-yellow) 0% 62%,
    var(--c-red) 62% 84%,
    var(--c-cyan) 84% 100%);
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.35);
  pointer-events: none;
  transition: width 0.15s linear;
}

/* ---------- 13. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom,
    rgba(10, 31, 68, 0.85) 0%,
    rgba(10, 31, 68, 0.4) 70%,
    rgba(10, 31, 68, 0) 100%);
  transition: background var(--t-med), box-shadow var(--t-med);
}

.site-header[data-scrolled] {
  background: var(--c-blue);
  box-shadow: var(--shadow-header);
}

.site-header[data-scrolled]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--c-yellow) 0% 55%,
    var(--c-red) 55% 82%,
    var(--c-cyan) 82% 100%);
}

.site-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--c-white);
  text-decoration: none;
}

.site-header__brand:hover {
  color: var(--c-white);
}

.site-header__logo {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--c-white);
  text-shadow: 0 2px 10px rgba(2, 8, 24, 0.5);
}

.site-header__logo::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  background: var(--c-yellow);
  box-shadow: 4px 0 0 var(--c-red);
  transform: skew(-12deg) translateY(-1px);
}

.site-header__tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--c-white);
  text-decoration: none;
  transition: color var(--t-fast);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 3px;
  background: var(--c-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast);
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--c-yellow);
}

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

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 0 8px 12px;
  color: var(--c-white);
}

.nav-toggle__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--c-white);
  transition: transform var(--t-med), opacity var(--t-med),
    background var(--t-med);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background: var(--c-yellow);
}

.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(-8px) rotate(-45deg);
  background: var(--c-yellow);
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--c-cyan);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  background: var(--c-blue);
  color: var(--c-silver);
  font-size: 14px;
}

.site-footer__ribbon {
  height: 6px;
  background: linear-gradient(90deg,
    var(--c-yellow) 0% 62%,
    var(--c-red) 62% 84%,
    var(--c-cyan) 84% 100%);
}

.site-footer__grid {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr;
  gap: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-headline);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--c-white);
  text-decoration: none;
}

.site-footer__logo::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  background: var(--c-yellow);
  box-shadow: 4px 0 0 var(--c-red);
  transform: skew(-12deg);
}

.site-footer__logo:hover {
  color: var(--c-yellow);
}

.site-footer__slogan {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.site-footer__trust {
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(237, 241, 247, 0.72);
}

.site-footer__nav,
.site-footer__contact,
.site-footer__legal {
  display: flex;
  flex-direction: column;
}

.site-footer__heading {
  margin-bottom: 16px;
  padding-bottom: 8px;
  position: relative;
  font-family: var(--font-headline);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-yellow);
}

.site-footer__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 3px;
  background: var(--c-red);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__links li {
  line-height: 1.6;
  color: rgba(237, 241, 247, 0.72);
}

.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-silver);
  text-decoration: none;
  transition: color var(--t-fast), transform var(--t-fast);
}

.site-footer__link::before {
  content: "»";
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-cyan);
  font-size: 13px;
}

.site-footer__link:hover {
  color: var(--c-yellow);
  transform: translateX(4px);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__bottom-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: rgba(237, 241, 247, 0.55);
}

.site-footer__copyright,
.site-footer__icp {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1024px) {
  :root {
    --header-height: 64px;
  }

  .site-header__inner {
    gap: 14px;
  }

  .site-header__logo {
    font-size: 20px;
  }

  .site-header__logo::before {
    width: 11px;
    height: 11px;
  }

  .site-header__tagline {
    display: none;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex: none;
    display: block;
    background: var(--c-blue);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-slow);
  }

  .site-nav[data-open] {
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    border-top: 3px solid var(--c-yellow);
    box-shadow: 0 18px 40px rgba(2, 8, 24, 0.5);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 2px;
  }

  .site-nav__link {
    padding: 13px 12px;
    font-size: 16px;
    white-space: normal;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav__link::after {
    display: none;
  }

  .site-header__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 20px 20px;
  }

  .site-header__actions .btn {
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }
}

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

  [data-grid="3"],
  [data-grid="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 44px 20px 32px;
  }
}

@media (max-width: 600px) {
  .container {
    padding-inline: 18px;
  }

  .site-header__inner {
    padding-inline: 16px;
  }

  .site-header__logo {
    font-size: 18px;
  }

  .site-header__logo::before {
    width: 10px;
    height: 10px;
    margin-right: 6px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 18px 30px;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }
}

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

  [data-grid="2"],
  [data-grid="3"],
  [data-grid="4"] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 16. Reduced Motion ---------- */
@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;
  }

  .site-nav {
    transition: none;
  }

  .page-progress {
    transition: none;
  }

  .tag--live::before {
    animation: none;
  }
}
