/* ==========================================================
   九游竞技 / 全站共享样式 /assets/site.css
   ========================================================== */

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

:root {
  --color-bg: #0A1128;
  --color-bg-deep: #060B1C;
  --color-bg-elev: #101B3C;
  --color-purple: #7B2FBE;
  --color-purple-deep: #581B8E;
  --color-purple-glow: rgba(123, 47, 190, 0.35);
  --color-green: #39FF14;
  --color-green-glow: rgba(57, 255, 20, 0.28);
  --color-text: #F8FAFC;
  --color-text-dim: #94A3B8;
  --color-text-faint: #64748B;
  --glass-surface: rgba(255, 255, 255, 0.08);
  --glass-surface-strong: rgba(255, 255, 255, 0.13);
  --grid-line: rgba(123, 47, 190, 0.12);
  --stroke-glow: rgba(57, 255, 20, 0.3);
  --font-heading: 'Orbitron', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Roboto Mono', 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  --container-w: 1200px;
  --radius-pill: 999px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --z-header: 1000;
  --z-progress: 2000;
  --z-skip: 3000;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--color-bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(22px, 3.5vw, 34px); }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

p { margin-bottom: 1em; }

a {
  color: var(--color-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-text);
}

ul, ol { list-style: none; }

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

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

::selection {
  background: rgba(123, 47, 190, 0.55);
  color: var(--color-text);
}

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

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

.main-content {
  flex: 1 0 auto;
  width: 100%;
}

.main-content:focus {
  outline: none;
}

.content-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: var(--z-skip);
  padding: 12px 22px;
  background: var(--color-green);
  color: var(--color-bg-deep);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px var(--color-green-glow);
  transition: top 0.25s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 16px;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  gap: 20px;
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 16px auto 0;
  padding: 8px 12px 8px 24px;
  background: rgba(10, 17, 40, 0.92);
  border: 1px solid rgba(123, 47, 190, 0.35);
  border-radius: var(--radius-pill);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header:hover {
  border-color: rgba(123, 47, 190, 0.55);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(123, 47, 190, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--color-text);
  padding: 4px 0;
}

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

.header-brand__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}

.header-brand__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(57, 255, 20, 0.07);
  border: 1px solid rgba(57, 255, 20, 0.16);
}

.header-brand__status-text {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: var(--color-green);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 6px var(--color-green), 0 0 12px var(--color-green-glow);
  animation: status-pulse 2.4s ease-in-out infinite;
}

.status-dot--dim {
  background: var(--color-text-faint);
  box-shadow: none;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.site-nav {
  margin-left: auto;
}

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

.site-nav__item {
  list-style: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav__link:hover {
  color: var(--color-text);
  background-color: rgba(123, 47, 190, 0.22);
}

.site-nav__link[aria-current="page"] {
  color: var(--color-text);
  background: linear-gradient(135deg, rgba(123, 47, 190, 0.55), rgba(123, 47, 190, 0.2));
  box-shadow: 0 0 14px rgba(123, 47, 190, 0.35), inset 0 0 0 1px rgba(123, 47, 190, 0.5);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid rgba(123, 47, 190, 0.45);
  border-radius: 14px;
  background: rgba(123, 47, 190, 0.18);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(123, 47, 190, 0.3);
  box-shadow: 0 0 14px rgba(123, 47, 190, 0.3);
}

.nav-toggle:active {
  transform: scale(0.95);
}

.nav-toggle__box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle--active .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle--active .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle--active .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-progress);
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-purple) 0%, var(--color-green) 100%);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.45);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  background-color: var(--color-bg-deep);
  border-top: 1px solid rgba(123, 47, 190, 0.25);
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--color-purple) 30%, var(--color-green) 70%, transparent 100%);
  opacity: 0.7;
}

.site-footer::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(123, 47, 190, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 40px;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.footer-brand__name {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--color-text);
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-brand__name:hover {
  color: var(--color-green);
}

.footer-brand__slogan {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--color-green);
  margin-bottom: 18px;
}

.footer-brand__trust {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-dim);
  max-width: 320px;
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-purple);
  margin-bottom: 16px;
}

.footer-col__title::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  margin-top: 6px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(123, 47, 190, 0.5);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col__list a:hover {
  color: var(--color-green);
  transform: translateX(3px);
}

.footer-col__list li {
  font-size: 14px;
  color: var(--color-text-dim);
  line-height: 1.6;
}

.footer-col__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-top: 8px;
}

.footer-col__label:first-child {
  margin-top: 0;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--color-text-faint);
}

.footer-bottom__copy {
  font-family: var(--font-body);
}

.footer-bottom__icp {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.footer-bottom__links {
  display: flex;
  gap: 20px;
}

.footer-bottom__links a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom__links a:hover {
  color: var(--color-green);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-purple), var(--color-purple-deep));
  color: #fff;
  border-color: rgba(123, 47, 190, 0.6);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #8c38e8, var(--color-purple-deep));
  box-shadow: 0 0 20px rgba(123, 47, 190, 0.4);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-green);
  border-color: rgba(57, 255, 20, 0.4);
}

.btn--ghost:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 16px var(--color-green-glow);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--color-text-faint);
}

.breadcrumbs a {
  color: var(--color-text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.breadcrumbs__sep {
  color: var(--color-purple);
}

/* ---------- Components ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green-glow);
}

.glass-panel {
  background: var(--glass-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-panel:hover {
  border-color: rgba(123, 47, 190, 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.data-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(123, 47, 190, 0.18);
  border: 1px solid rgba(123, 47, 190, 0.32);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
}

.connect-line {
  display: block;
  height: 1px;
  border: none;
  background: linear-gradient(90deg, var(--color-purple), var(--color-green), transparent);
  opacity: 0.5;
  margin: 24px 0;
}

/* ---------- Image Frame ---------- */
.image-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(123, 47, 190, 0.3) 0%, rgba(10, 17, 40, 0.4) 100%),
    repeating-linear-gradient(45deg, transparent 0, transparent 10px, rgba(57, 255, 20, 0.04) 10px, rgba(57, 255, 20, 0.04) 20px);
  border: 1px solid rgba(123, 47, 190, 0.35);
}

.image-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.image-frame:hover > img {
  transform: scale(1.03);
}

.image-frame--16x9 { aspect-ratio: 16 / 9; }
.image-frame--tall { aspect-ratio: 3 / 4; }
.image-frame--wide { aspect-ratio: 21 / 9; }

/* ---------- Grids ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

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

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

@media (max-width: 900px) {
  .site-header {
    top: 8px;
    width: calc(100% - 20px);
    max-width: 720px;
    margin: 8px auto 0;
    border-radius: 18px;
    padding: 10px 12px 10px 18px;
    flex-wrap: wrap;
  }

  .header-brand__status {
    display: none;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(123, 47, 190, 0.2);
  }

  .site-nav[data-open] {
    display: block;
  }

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

  .site-nav__link {
    display: flex;
    justify-content: flex-start;
    border-radius: 12px;
    font-size: 14px;
    padding: 10px 14px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
}

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

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

  .footer-bottom {
    padding: 16px 20px 20px;
  }

  .footer-bottom__icp {
    margin-left: 0;
  }
}

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

  .status-dot {
    animation: none;
  }
}
