/* =============================================================
   BET9 官方版 — 全站共享样式
   Deep Space Coordinate System
   ============================================================= */

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

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

body {
  font-family: "Inter", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 18% -6%, rgba(123, 44, 191, 0.20) 0%, transparent 52%),
    linear-gradient(180deg, #0b1e3a 0%, #0a0a1a 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 80px 80px;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* ---------- 2. CSS 变量 ---------- */
:root {
  --color-primary: #0b1e3a;
  --color-primary-light: #16294d;
  --color-accent: #ff6b35;
  --color-accent-light: #ff8f5e;
  --color-purple: #7b2cbf;
  --color-purple-light: #9d4edd;
  --color-black: #0a0a1a;
  --color-white: #ffffff;
  --color-text-secondary: #b0b7c3;
  --color-border: #2a3b5c;
  --color-ok: #00d47e;
  --color-warning: #ffd166;

  --font-display: "Poppins", "Inter", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --container-width: 1200px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.28);
}

/* ---------- 3. 排版 ---------- */
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-white);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
}

p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.text-accent {
  color: var(--color-accent);
}

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

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.mono {
  font-family: var(--font-mono);
}

::selection {
  background: rgba(255, 107, 53, 0.35);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 4. 容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.3;
}

.section-subtitle {
  color: var(--color-text-secondary);
  max-width: 520px;
}

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

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

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

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

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

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

/* ---------- 5. 无障碍与滚动进度 ---------- */
.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 1200;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
  transition: top 0.3s ease;
}

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

.scroll-progress {
  --progress: 0%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.scroll-progress::before {
  content: "";
  display: block;
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-purple-light));
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.45);
  transition: width 0.08s ease-out;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-header[data-scrolled] {
  background: rgba(10, 10, 26, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
}

/* ---------- 7. 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand__logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--color-white);
  position: relative;
}

.brand__logo::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 14px rgba(255, 107, 53, 0.65);
  margin-left: 2px;
  transform: translateY(-4px);
}

.brand__badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--color-accent);
  border: 1px solid rgba(255, 107, 53, 0.42);
  background: rgba(255, 107, 53, 0.08);
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- 8. 主导航 ---------- */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease;
}

.site-nav__link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.07);
}

.site-nav__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-accent);
  opacity: 0.85;
}

.site-nav__label {
  font-family: var(--font-body);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-white);
  background: rgba(255, 107, 53, 0.14);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.site-nav__link[aria-current="page"] .site-nav__num {
  opacity: 1;
}

/* ---------- 9. 汉堡按钮 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* ---------- 10. 移动导航 ---------- */
@media (max-width: 767px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 3;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #0b1e3a 0%, #0a0a1a 68%, #12082a 100%);
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    -webkit-transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .site-nav__link {
    font-size: 1.25rem;
    padding: 13px 32px;
    justify-content: center;
    border-radius: 16px;
  }

  .site-nav__num {
    font-size: 0.8rem;
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(255, 107, 53, 0.12);
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  background: linear-gradient(180deg, #0a0a1a 0%, #05060d 100%);
  border-top: 1px solid var(--color-border);
  margin-top: 80px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 0.85fr 1.2fr;
  gap: 40px 32px;
  padding: 64px 0 48px;
}

.site-footer__brand-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.01em;
}

.site-footer__brand-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-accent);
  border: 1px solid rgba(255, 107, 53, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer__brand-desc {
  margin-top: 14px;
  max-width: 380px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(176, 183, 195, 0.9);
}

.site-footer__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__list a {
  display: inline-block;
  color: rgba(176, 183, 195, 0.88);
  font-size: 0.9rem;
  transition: color 0.25s ease, padding-left 0.25s ease, transform 0.25s ease;
}

.site-footer__list a:hover {
  color: var(--color-accent);
  padding-left: 4px;
}

.site-footer__list--quiet li {
  color: rgba(176, 183, 195, 0.88);
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer__value {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  word-break: break-all;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: rgba(176, 183, 195, 0.6);
}

.site-footer__copy,
.site-footer__icp {
  color: inherit;
  font-size: inherit;
}

@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__brand {
    grid-column: auto;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: #0a0a1a;
  box-shadow: 0 4px 22px rgba(255, 107, 53, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.42);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--color-border);
  color: var(--color-white);
}

.btn--ghost:hover {
  border-color: rgba(255, 107, 53, 0.5);
  background: rgba(255, 107, 53, 0.08);
  transform: translateY(-2px);
}

/* ---------- 13. 卡片与徽章 ---------- */
.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 53, 0.36);
  box-shadow: var(--shadow-card);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

.badge__dot--ok {
  background: var(--color-ok);
  box-shadow: 0 0 8px rgba(0, 212, 126, 0.55);
}

.badge__dot--live {
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.55);
}

/* ---------- 14. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 18px 0;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: rgba(176, 183, 195, 0.5);
  font-family: var(--font-mono);
}

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

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

/* ---------- 15. 地图隐喻组件 ---------- */
.coordinate {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.index-list {
  list-style: none;
}

.index-list__item + .index-list__item {
  border-top: 1px solid var(--color-border);
}

.index-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 4px;
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.index-list__link:hover {
  color: var(--color-accent);
  padding-left: 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--color-text-secondary);
}

.legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ---------- 16. 首屏与倾斜 ---------- */
.page-hero {
  position: relative;
  min-height: 44vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 48px) 0 64px;
  overflow: hidden;
}

.page-hero__tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.14;
  margin-top: 12px;
  color: var(--color-white);
}

.page-hero__lede {
  max-width: 440px;
  margin-top: 16px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.tilt {
  transform: perspective(1000px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.tilt:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* ---------- 17. 氛围光效与显现 ---------- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js [data-reveal][data-shown] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 18. 响应式细节 ---------- */
@media (max-width: 1024px) {
  .site-header__inner {
    padding: 0 20px;
  }

  .section {
    padding: 56px 0;
  }
}

@media (max-width: 767px) {
  .site-header__inner {
    padding: 0 16px;
  }

  .section {
    padding: 44px 0;
  }

  .page-hero {
    padding: calc(var(--header-height) + 32px) 0 48px;
  }
}

/* ---------- 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;
  }

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

  .scroll-progress::before {
    transition: none;
  }

  .card,
  .btn,
  .tilt {
    transition: none;
  }

  .card:hover,
  .btn:hover,
  .tilt:hover {
    transform: none;
  }
}
