/* ========================================
   星空竞界 - 全站共享样式 /assets/site.css
   ======================================== */

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

/* ---------- Design Tokens ---------- */
:root {
  --c-primary: #0A1E3C;
  --c-secondary: #152B55;
  --c-nebula: #7B5EA7;
  --c-neon: #00FF9F;
  --c-text: #E6EDF5;
  --c-muted: #8E9EBB;
  --c-border: #1F3A6B;
  --c-warning: #FFB74D;
  --c-success: #4CAF50;

  --font-display: "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --content-max: 1240px;
  --content-pad: clamp(18px, 4vw, 32px);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 12px 48px rgba(0, 0, 0, 0.5);
  --glow-neon: 0 0 14px rgba(0, 255, 159, 0.35);
  --glow-nebula: 0 0 18px rgba(123, 94, 167, 0.3);

  --z-skip: 3000;
  --z-progress: 2600;
  --z-backtop: 2200;
  --z-header: 900;

  --brandbar-h: 72px;
  --navbar-h: 52px;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--c-primary);
  color: var(--c-text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 43, 85, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 43, 85, 0.10) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: rgba(0, 255, 159, 0.25);
  color: #ffffff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #071530; }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-nebula); }

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

a {
  color: var(--c-neon);
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

a:hover { color: #66ffc4; }

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

ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--c-neon);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.2;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin-bottom: 1em; }

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

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

.prose {
  line-height: 1.8;
  color: var(--c-text);
}

.prose p { margin-bottom: 1.2em; }

.prose a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

.section {
  padding-block: 56px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  color: #061428;
  background: var(--c-neon);
  box-shadow: 0 0 16px rgba(0, 255, 159, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  color: #061428;
  box-shadow: 0 0 30px rgba(0, 255, 159, 0.4);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--c-neon);
  border-color: var(--c-neon);
}

.btn-secondary {
  background: transparent;
  color: var(--c-neon);
  border-color: rgba(0, 255, 159, 0.5);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(0, 255, 159, 0.08);
  border-color: var(--c-neon);
  color: var(--c-neon);
  box-shadow: none;
}

.btn-dark {
  background: var(--c-secondary);
  color: var(--c-text);
  border-color: var(--c-border);
  box-shadow: none;
}

.btn-dark:hover {
  border-color: var(--c-nebula);
  color: var(--c-neon);
  box-shadow: none;
}

.btn-sm {
  padding: 6px 15px;
  font-size: 13px;
  border-radius: 4px;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  font-size: 13px;
  color: var(--c-muted);
}

.breadcrumbs a {
  color: var(--c-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--c-neon);
}

.breadcrumb-sep {
  color: var(--c-border);
  font-family: var(--font-mono);
  font-size: 12px;
}

.breadcrumbs [aria-current="page"] {
  color: var(--c-text);
  font-weight: 600;
}

/* ---------- Image Frames ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  background:
    radial-gradient(ellipse at 22% 28%, rgba(123, 94, 167, 0.18), transparent 55%),
    linear-gradient(150deg, rgba(21, 43, 85, 0.9), rgba(10, 30, 60, 0.88));
  box-shadow: var(--shadow-card);
  color: var(--c-muted);
}

.img-frame::after {
  content: attr(data-label) " // IMG_FRAME";
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-muted);
  padding: 14px;
  text-align: center;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.img-frame--4-5 { aspect-ratio: 4 / 5; }
.img-frame--1-1 { aspect-ratio: 1 / 1; }
.img-frame--free { aspect-ratio: auto; min-height: 220px; }
.img-frame--free::after { white-space: normal; }

.img-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* ---------- Data Chip ---------- */
.data-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: rgba(21, 43, 85, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: var(--glow-neon);
  flex-shrink: 0;
}

.data-chip--purple::before {
  background: var(--c-nebula);
  box-shadow: var(--glow-nebula);
}

.data-chip--amber::before {
  background: var(--c-warning);
  box-shadow: 0 0 10px rgba(255, 183, 77, 0.4);
}

/* ---------- Logo Stars (shared) ---------- */
.logo-star-1 { fill: var(--c-neon); }
.logo-star-2 { fill: var(--c-nebula); }
.logo-star-3 { fill: var(--c-text); }
.logo-star-4 { fill: var(--c-nebula); }
.logo-star-5 { fill: var(--c-neon); }

.logo-line {
  stroke: var(--c-border);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  padding-top: 3px;
  background: rgba(10, 30, 60, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* Skip Link */
.skip-link {
  position: fixed;
  top: 8px;
  left: -9999px;
  z-index: var(--z-skip);
  background: var(--c-neon);
  color: #061428;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-float);
}

.skip-link:focus {
  left: 16px;
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: var(--z-progress);
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-neon), var(--c-nebula));
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.4);
  transition: width 0.12s linear;
}

/* Brand Bar */
.header-brandbar {
  border-bottom: 1px solid rgba(31, 58, 107, 0.45);
}

.header-brandbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--brandbar-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--c-text);
}

.brand:hover {
  color: var(--c-text);
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

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

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.brand-en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: 2px;
}

/* Header Tagline */
.header-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: rgba(21, 43, 85, 0.4);
  color: var(--c-muted);
  font-size: 13px;
  white-space: nowrap;
}

.tagline-icon {
  width: 10px;
  height: 10px;
  color: var(--c-neon);
  flex-shrink: 0;
  animation: pulse-glow 2.4s ease-in-out infinite;
}

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

/* Header Hotline */
.header-hotline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s;
}

.header-hotline:hover {
  border-color: var(--c-border);
  background: rgba(21, 43, 85, 0.35);
  color: var(--c-text);
}

.hotline-icon {
  width: 15px;
  height: 15px;
  color: var(--c-nebula);
  flex-shrink: 0;
}

/* Header CTA */
.header-cta {
  flex-shrink: 0;
}

/* Nav Toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: rgba(21, 43, 85, 0.45);
  color: var(--c-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-lines i {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-text {
  white-space: nowrap;
}

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

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

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

/* Nav Wrap */
.header-navwrap {
  background: linear-gradient(180deg, rgba(21, 43, 85, 0.55), rgba(10, 30, 60, 0.35));
}

.header-nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--navbar-h);
}

/* Site Nav */
.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px 16px;
  color: var(--c-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}

.nav-link:hover {
  color: var(--c-neon);
  background: rgba(0, 255, 159, 0.06);
  border-bottom-color: var(--c-neon);
}

.nav-link[aria-current="page"] {
  color: var(--c-neon);
  border-bottom-color: var(--c-neon);
  background: rgba(0, 255, 159, 0.08);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--c-nebula);
  font-weight: 400;
  letter-spacing: 0.06em;
}

/* Nav Data Note */
.nav-data-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  white-space: nowrap;
}

.nav-data-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-neon);
  box-shadow: var(--glow-neon);
  flex-shrink: 0;
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ---------- Header Responsive ---------- */
@media (max-width: 1080px) {
  .header-hotline {
    display: none;
  }
}

@media (max-width: 860px) {
  .header-tagline {
    display: none;
  }

  .header-cta {
    display: none;
  }

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

  .header-navwrap {
    display: none;
    border-top: 1px solid var(--c-border);
    background: rgba(10, 30, 60, 0.97);
  }

  .header-navwrap[data-open="true"] {
    display: block;
    max-height: calc(100vh - 63px);
    overflow-y: auto;
  }

  .header-nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding-block: 8px;
    gap: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: none;
    border-left: 2px solid transparent;
    border-bottom: 1px solid rgba(31, 58, 107, 0.4);
    border-radius: 0;
    font-size: 15px;
  }

  .nav-link:hover {
    border-bottom-color: rgba(31, 58, 107, 0.4);
    border-left-color: var(--c-neon);
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: rgba(31, 58, 107, 0.4);
    border-left-color: var(--c-neon);
  }

  .nav-data-note {
    display: none;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 19px;
  }

  .brand-en {
    font-size: 9px;
  }

  .header-brandbar-inner {
    min-height: 60px;
    gap: 12px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: linear-gradient(180deg, #071530 0%, #091B36 100%);
  border-top: 1px solid var(--c-border);
}

.footer-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--c-neon) 0%, var(--c-nebula) 45%, transparent 80%);
  opacity: 0.6;
}

.footer-main {
  padding-block: 48px 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 3fr 2fr 2fr 2.6fr;
  gap: 40px;
}

/* Footer Brand */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-text);
}

.footer-brand:hover {
  color: var(--c-text);
}

.footer-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.footer-tagline {
  margin-top: 16px;
  color: var(--c-muted);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.footer-trust {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--c-muted);
  max-width: 340px;
}

/* Footer Columns */
.footer-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-text);
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-neon), rgba(0, 255, 159, 0));
  border-radius: 1px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--c-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-links a:hover {
  color: var(--c-neon);
  padding-left: 4px;
}

/* Footer Contact */
.footer-contact li {
  margin-bottom: 10px;
}

.footer-contact-link {
  color: var(--c-muted);
  font-size: 14px;
  text-decoration: none;
  font-family: var(--font-mono);
}

.footer-contact-link:hover {
  color: var(--c-neon);
}

.footer-address {
  color: var(--c-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--c-muted);
  opacity: 0.75;
  line-height: 1.6;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(31, 58, 107, 0.5);
  background: rgba(6, 17, 36, 0.6);
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-block: 18px;
  font-size: 13px;
  color: var(--c-muted);
}

.footer-copy {
  margin: 0;
}

.footer-icp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- Back Top ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: rgba(21, 43, 85, 0.92);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  box-shadow: var(--shadow-float);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, border-color 0.3s, color 0.3s;
  z-index: var(--z-backtop);
  cursor: pointer;
}

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

.back-top:hover {
  border-color: var(--c-neon);
  color: var(--c-neon);
}

.back-top-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.back-top-text {
  white-space: nowrap;
}

/* ---------- Footer Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 640px) {
  .footer-main {
    padding-block: 36px 24px;
  }

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

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 14px;
  }

  .back-top {
    right: 16px;
    bottom: 16px;
    padding: 9px 13px;
  }

  .back-top-text {
    font-size: 11px;
  }
}

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

/* ---------- Utility: Section Title ---------- */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}

.section-title::before {
  content: '';
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--c-neon), var(--c-nebula));
  box-shadow: var(--glow-neon);
}

.section-title .section-title-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  margin-left: auto;
}

/* ---------- Utility: Page Header ---------- */
.page-head {
  padding-block: 42px 8px;
}

.page-head .page-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.page-head .page-desc {
  color: var(--c-muted);
  font-size: 15px;
  max-width: 42em;
  line-height: 1.7;
}
