/* =============================================
   星空赛事中心 · 全站共享样式
   ============================================= */

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

/* 02 CSS Variables */
:root {
  --space-navy: #0B1026;
  --deep-space: #151B33;
  --cosmic-purple: #7B2FF7;
  --star-gold: #FFD700;
  --cloud-white: #F5F7FF;
  --muted-blue: #AAB4D1;
  --starlight-blue: #4DD8FF;
  --orbit-line: #2A3357;
  --warning-orange: #FF9F40;
  --success-green: #37E2A5;

  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;

  --content-max: 1360px;
  --header-h: 76px;
}

/* 03 Base */
html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(123, 47, 247, 0.16), transparent),
    radial-gradient(900px 500px at 10% 110%, rgba(77, 216, 255, 0.08), transparent),
    var(--space-navy);
  color: var(--cloud-white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--cloud-white);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

ul,
ol {
  list-style-position: inside;
}

button {
  font: inherit;
}

/* 04 Focus & Accessibility */
:focus-visible {
  outline: 2px solid var(--star-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 05 Skip Link */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--star-gold);
  color: var(--space-navy);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: top 0.2s ease;
}

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

/* 06 Header */
.site-header {
  background: var(--space-navy);
  border-bottom: 1px solid var(--orbit-line);
  position: relative;
  z-index: 100;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cosmic-purple) 0%, var(--starlight-blue) 50%, rgba(77, 216, 255, 0) 100%);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, var(--cosmic-purple), transparent);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 28px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

/* 06a Brand */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--cosmic-purple);
  color: var(--cloud-white);
  font-size: 18px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.brand-lockup:hover .brand-mark {
  background: #8a3cff;
  transform: translateY(-1px);
}

.brand-text {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--cloud-white);
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--star-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-left: 2px solid var(--star-gold);
  padding-left: 10px;
  white-space: nowrap;
}

.header-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warning-orange);
  border: 1px solid rgba(255, 159, 64, 0.35);
  padding: 5px 12px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--starlight-blue);
  animation: status-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(77, 216, 255, 0.4); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(77, 216, 255, 0); }
}

/* 07 Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted-blue);
  padding: 8px 12px;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--star-gold);
}

.nav-link[aria-current="page"] {
  color: var(--cloud-white);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--cosmic-purple);
}

.nav-sep {
  color: var(--orbit-line);
  font-family: var(--font-mono);
  font-size: 14px;
  user-select: none;
}

/* Nav Toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--orbit-line);
  color: var(--cloud-white);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  margin-left: auto;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--cosmic-purple);
  color: var(--star-gold);
}

.nav-toggle-bar {
  display: block;
  width: 14px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }

.nav-toggle.is-active .nav-toggle-bar {
  background: transparent;
}

.nav-toggle.is-active .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 08 Scroll Progress */
.scroll-progress {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--cosmic-purple), var(--star-gold));
  z-index: 20;
  pointer-events: none;
}

/* 09 Footer */
.site-footer {
  background: var(--deep-space);
  border-top: 1px solid var(--orbit-line);
  margin-top: 96px;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 15%, var(--cosmic-purple) 55%, var(--star-gold) 100%);
}

.footer-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 64px 28px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 56px;
}

.footer-brand {
  display: flex;
  gap: 16px;
}

.footer-brand-mark {
  flex-shrink: 0;
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--star-gold);
  color: var(--space-navy);
  font-size: 16px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.footer-brand-name {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--cloud-white);
  line-height: 1.2;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--star-gold);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.footer-note {
  font-size: 13px;
  color: var(--muted-blue);
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--cloud-white);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--orbit-line);
}

.footer-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

.footer-link-grid a {
  font-size: 14px;
  color: var(--muted-blue);
  padding: 2px 0;
  position: relative;
}

.footer-link-grid a::before {
  content: "→";
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cosmic-purple);
  margin-right: 6px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-link-grid a:hover {
  color: var(--star-gold);
}

.footer-link-grid a:hover::before {
  opacity: 1;
  transform: translateX(2px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
}

.footer-contact p {
  font-size: 14px;
  color: var(--muted-blue);
  margin-bottom: 10px;
  line-height: 1.6;
}

.footer-phone,
.footer-email {
  font-family: var(--font-mono);
  color: var(--cloud-white);
  font-size: 14px;
}

.footer-email {
  word-break: break-all;
}

.footer-bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 28px;
  border-top: 1px solid var(--orbit-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--muted-blue);
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-blue);
  letter-spacing: 0.04em;
}

.footer-trust {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 28px 32px;
  font-size: 13px;
  color: var(--muted-blue);
  line-height: 1.7;
  border-top: none;
}

/* 10 Layout & Containers */
.container-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 28px;
}

.page-hero {
  padding: 72px 0 48px;
}

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

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

/* 11 Typography */
.page-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--cloud-white);
  margin-bottom: 16px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--star-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-label::before {
  content: "//";
  color: var(--cosmic-purple);
  font-weight: 700;
}

.lead {
  font-size: 18px;
  color: var(--muted-blue);
  line-height: 1.65;
  max-width: 640px;
}

.prose {
  max-width: 720px;
  font-size: 16px;
  color: var(--muted-blue);
  line-height: 1.8;
}

.prose h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--cloud-white);
  margin: 36px 0 12px;
}

.prose p {
  margin-bottom: 16px;
}

.prose strong {
  color: var(--star-gold);
  font-weight: 600;
}

/* 12 Buttons */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--cosmic-purple);
  color: var(--cloud-white);
  border: none;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: #8a3cff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--cloud-white);
  border: 1px solid var(--orbit-line);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--cosmic-purple);
  color: var(--star-gold);
}

/* 13 Cards & Panels */
.panel-clip {
  background: var(--deep-space);
  border: 1px solid var(--orbit-line);
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  padding: 32px;
}

.card {
  background: var(--deep-space);
  border: 1px solid var(--orbit-line);
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--cosmic-purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(123, 47, 247, 0.15);
}

.card-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--cloud-white);
  margin-bottom: 8px;
}

.card-body {
  font-size: 14px;
  color: var(--muted-blue);
  line-height: 1.7;
}

/* 14 Media Frames */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--deep-space);
  border: 1px solid var(--orbit-line);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  aspect-ratio: 16 / 9;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(200px 120px at 20% 30%, rgba(123, 47, 247, 0.2), transparent),
    linear-gradient(135deg, rgba(123, 47, 247, 0.1), rgba(77, 216, 255, 0.05));
  pointer-events: none;
  z-index: 0;
}

.media-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

/* 15 Breadcrumb & Dividers */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-blue);
  padding: 18px 0;
  border-bottom: 1px solid var(--orbit-line);
  margin-bottom: 40px;
}

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

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

.orbit-divider {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, var(--orbit-line), var(--cosmic-purple), transparent);
  margin: 48px 0;
}

/* 16 Tags & Status */
.data-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--starlight-blue);
  background: rgba(77, 216, 255, 0.08);
  border: 1px solid rgba(77, 216, 255, 0.2);
  padding: 4px 12px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  margin-right: 8px;
}

.section-no {
  font-family: var(--font-mono);
  font-size: 80px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--cosmic-purple);
  opacity: 0.55;
  display: block;
}

/* 17 Responsive */
@media (max-width: 1200px) {
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    gap: 16px;
  }

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

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 18px;
    gap: 8px;
  }

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

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .header-note {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--deep-space);
    border: 1px solid var(--orbit-line);
    clip-path: polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
    padding: 16px;
    margin-top: 10px;
    gap: 2px;
  }

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

  .nav-sep {
    display: none;
  }

  .nav-link {
    padding: 12px 10px;
    font-size: 16px;
    border-bottom: 1px solid rgba(42, 51, 87, 0.6);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-link[aria-current="page"]::after {
    left: 10px;
    right: auto;
    width: 32px;
    bottom: 4px;
  }
}

@media (max-width: 640px) {
  .container-main,
  .header-inner,
  .footer-grid,
  .footer-bottom,
  .footer-trust {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 40px 0 32px;
  }

  .section-no {
    font-size: 56px;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
