/* ============================================
   JBO竞博 · 全站共享样式
   ============================================ */

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

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

body {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

ul, ol {
  list-style: none;
}

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

/* ---------- Variables ---------- */
:root {
  --space-blue: #0A1F44;
  --ocean-blue: #102A56;
  --gold: #FFD700;
  --neon-green: #39FF14;
  --rock-gray: #6B7280;
  --moss-green: #4A7C59;
  --terracotta: #C77B5A;
  --cream: #F5F0E6;

  --bg-primary: #0A1F44;
  --bg-secondary: #102A56;
  --accent: #FFD700;
  --cta: #39FF14;
  --text-primary: #F5F0E6;
  --text-muted: #6B7280;

  --font-heading: 'Montserrat', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --container-width: 1280px;
  --header-height: 72px;
  --section-gap: 72px;
  --card-border: rgba(255, 215, 0, 0.25);
  --border-thin: rgba(245, 240, 230, 0.08);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1em;
}

::selection {
  background: var(--gold);
  color: var(--space-blue);
}

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

/* ---------- Layout ---------- */
.site-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

.note-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border-thin), rgba(255, 215, 0, 0.25), var(--border-thin));
  border: none;
  margin: 32px 0;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: var(--gold);
  color: var(--space-blue);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: top 0.25s ease;
}

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

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--neon-green));
  z-index: 1100;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 31, 68, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-thin);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s ease;
}

.site-header--hidden {
  transform: translateY(-100%);
}

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

/* ---------- Brand ---------- */
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header__logo-mark {
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 1px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.site-header__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1;
}

.site-header__brand-name {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding-left: 10px;
  border-left: 1px solid rgba(255, 215, 0, 0.3);
  line-height: 1.4;
}

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

.site-nav__link {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.85);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--gold);
  border-bottom-color: rgba(255, 215, 0, 0.4);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------- CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn--cta {
  background: var(--cta);
  color: var(--space-blue);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.25);
}

.btn--cta:hover {
  background: #4DFF2E;
  box-shadow: 0 0 28px rgba(57, 255, 20, 0.4);
}

.btn--gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn--gold:hover {
  background: var(--gold);
  color: var(--space-blue);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(245, 240, 230, 0.2);
}

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

.site-header__cta {
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: 0.8125rem;
}

/* ---------- Nav Toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 4px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: background-color 0.2s ease;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle__icon::before {
  top: -6px;
}

.nav-toggle__icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--section-gap);
  background: #070F24;
  border-top: 1px solid var(--border-thin);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.3) 25%, var(--gold) 50%, rgba(255, 215, 0, 0.3) 75%, transparent 100%);
}

.site-footer__main {
  padding: 56px 0 40px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1.2fr;
  gap: 48px;
}

.site-footer__brand-col .site-footer__logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.site-footer__about {
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.6);
  line-height: 1.6;
  margin-bottom: 16px;
}

.site-footer__trust {
  font-size: 0.8125rem;
  color: rgba(245, 240, 230, 0.35);
  line-height: 1.5;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}

.site-footer__col {
  min-width: 0;
}

.site-footer__heading {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 8px;
  position: relative;
}

.site-footer__heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.site-footer__list li + li {
  margin-top: 10px;
}

.site-footer__list a {
  color: rgba(245, 240, 230, 0.72);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

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

.site-footer__list--contact li {
  color: rgba(245, 240, 230, 0.72);
  font-size: 0.875rem;
  line-height: 1.6;
}

.site-footer__label {
  display: inline-block;
  width: 32px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 2px;
  text-align: center;
  padding: 1px 4px;
  margin-right: 6px;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  vertical-align: 1px;
}

.site-footer__note {
  font-size: 0.8125rem;
  color: rgba(245, 240, 230, 0.4);
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-thin);
}

.site-footer__bottom {
  border-top: 1px solid var(--border-thin);
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.25);
}

.site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer__bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(245, 240, 230, 0.4);
}

.site-footer__icp {
  letter-spacing: 0.08em;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 32px;
  width: 48px;
  height: 48px;
  background: var(--ocean-blue);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 900;
}

.back-to-top:hover {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.25);
}

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

.back-to-top__arrow {
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: 6px;
}

/* ---------- Section Head ---------- */
.chapter-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 5rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 215, 0, 0.6);
  letter-spacing: 0.05em;
  user-select: none;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  position: relative;
}

.section-head__num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 2px;
  padding: 4px 10px;
  flex-shrink: 0;
}

.section-head__title {
  font-size: 1.75rem;
  margin: 0;
  position: relative;
  padding-bottom: 6px;
}

.section-head__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 24px;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 215, 0, 0.5);
}

.card--highlight {
  border-top: 3px solid var(--gold);
}

.card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gold);
}

.card__body {
  font-size: 0.9375rem;
  color: rgba(245, 240, 230, 0.8);
  line-height: 1.7;
}

.card__body p:last-child {
  margin-bottom: 0;
}

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 2px;
  padding: 2px 8px;
  background: rgba(255, 215, 0, 0.04);
  white-space: nowrap;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: 32px;
  font-size: 0.875rem;
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb__item:not(:last-child)::after {
  content: '/';
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.breadcrumb__link {
  color: rgba(245, 240, 230, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.breadcrumb__current {
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Content Section ---------- */
.content-section {
  padding: var(--section-gap) 0;
}

.content-section + .content-section {
  padding-top: 0;
}

/* ---------- Page Hero ---------- */
.page-hero {
  padding: calc(var(--header-height) + 48px) 0 48px;
  position: relative;
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 16px;
  max-width: 720px;
}

.page-hero__lead {
  font-size: 1.0625rem;
  color: rgba(245, 240, 230, 0.75);
  max-width: 560px;
  line-height: 1.7;
}

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

/* ---------- Image Placeholder ---------- */
.image-placeholder {
  position: relative;
  background: linear-gradient(135deg, #162A52 0%, #0E1E3C 50%, #1A3460 100%);
  border: 1px solid var(--border-thin);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 120px;
}

.image-placeholder::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 70%;
  height: 180%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 215, 0, 0.06) 50%, transparent 100%);
  transform: rotate(20deg);
}

.image-placeholder::after {
  content: 'IMG';
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 0.6875rem;
  font-family: 'SFMono-Regular', Consolas, monospace;
  letter-spacing: 0.1em;
  color: rgba(255, 215, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 2px 6px;
  border-radius: 2px;
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.08s;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-header__brand-name {
    display: none;
  }

  .site-nav__link {
    padding: 8px 10px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 992px) {
  .site-header__inner {
    gap: 12px;
  }

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

  .site-header__cta {
    margin-left: auto;
    padding: 10px 16px;
    font-size: 0.75rem;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(8, 18, 42, 0.98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: max-height 0.4s ease;
  }

  .site-nav[data-open] {
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

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

  .site-nav__link {
    display: block;
    padding: 14px 8px;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-thin);
    border-left: 2px solid transparent;
  }

  .site-nav__link:hover {
    border-left-color: var(--gold);
    border-bottom-color: var(--border-thin);
    background: rgba(255, 215, 0, 0.04);
  }

  .site-nav__link[aria-current="page"] {
    border-left-color: var(--gold);
    border-bottom-color: var(--border-thin);
    background: rgba(255, 215, 0, 0.06);
  }

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

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

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

@media (max-width: 640px) {
  .site-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header__cta {
    display: none;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

  .chapter-num {
    font-size: 3.25rem;
  }

  .section-head__title {
    font-size: 1.375rem;
  }

  .back-to-top {
    right: 16px;
    bottom: 20px;
    width: 42px;
    height: 42px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

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

  .site-header--hidden {
    transform: none;
  }

  .scroll-progress {
    transition: none;
  }
}
