/* ========== 1. RESET & VARIABLES ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 85% 0%, rgba(255, 107, 53, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(44, 95, 138, 0.14) 0%, transparent 50%),
    linear-gradient(180deg, #0A1F44 0%, #071129 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Archivo Black', 'Arial Black', 'PingFang SC', 'Microsoft YaHei', Impact, sans-serif;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

:root {
  --bg-primary: #0A1F44;
  --bg-secondary: #102B54;
  --bg-surface: #1B3A6B;
  --bg-deep: #060F28;
  --accent: #FF6B35;
  --accent-hover: #FF8558;
  --accent-soft: rgba(255, 107, 53, 0.14);
  --text-primary: #FFFFFF;
  --text-secondary: #B8C4D9;
  --data-vis: #2C5F8A;
  --success: #36C5A1;
  --warning: #F7C948;
  --font-display: 'Archivo Black', 'Arial Black', 'PingFang SC', 'Microsoft YaHei', Impact, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --header-h: 72px;
  --container-w: 1200px;
  --radius: 8px;
  --border: rgba(255, 255, 255, 0.1);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.34);
  --ease: 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ========== 2. LAYOUT UTILITIES ========== */
.container {
  width: min(100% - 48px, var(--container-w));
  margin-inline: auto;
}

.page-main {
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
}

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

.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;
}

/* ========== 3. ACCESSIBILITY ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 2000;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

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

/* ========== 4. HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(8, 20, 45, 0.96);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(8, 20, 45, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 42%);
  opacity: 0.5;
  pointer-events: none;
}

.header-inner {
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-mark__flame {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FF8558 0%, #FF6B35 100%);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  border-radius: 10px 4px 10px 4px;
  transform: skewX(-4deg) rotate(-2deg);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.4);
}

.brand-mark__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-mark__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.brand-mark__slogan {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.nav-command__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}

.nav-command__link::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-command__link:hover {
  color: var(--text-primary);
}

.nav-command__link:hover::after {
  transform: scaleX(1);
}

.nav-command__link[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.nav-command__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-command__index {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  opacity: 0.7;
}

.nav-command__link[aria-current="page"] .nav-command__index {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-actions__search,
.header-actions__toggle {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-actions__search:hover,
.header-actions__search:focus-visible,
.header-actions__toggle:hover,
.header-actions__toggle:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.icon-search {
  width: 14px;
  height: 14px;
  border: 2px solid var(--text-primary);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: border-color 0.2s ease;
}

.icon-search::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 7px;
  bottom: -5px;
  right: -3px;
  background: var(--text-primary);
  transform: rotate(-45deg);
  border-radius: 1px;
  transition: background 0.2s ease;
}

.header-actions__search:hover .icon-search,
.header-actions__search:focus-visible .icon-search {
  border-color: var(--accent);
}

.header-actions__search:hover .icon-search::after,
.header-actions__search:focus-visible .icon-search::after {
  background: var(--accent);
}

.header-actions__toggle {
  display: none;
  position: relative;
}

.header-actions__toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transform: translateX(-50%);
  transition: top 0.25s var(--ease), transform 0.25s var(--ease), opacity 0.2s ease;
}

.header-actions__toggle span:nth-child(1) {
  top: calc(50% - 7px);
}

.header-actions__toggle span:nth-child(2) {
  top: calc(50% - 1px);
}

.header-actions__toggle span:nth-child(3) {
  top: calc(50% + 5px);
}

.header-actions__toggle[aria-expanded="true"] span:nth-child(1) {
  top: calc(50% - 1px);
  transform: translateX(-50%) rotate(45deg);
}

.header-actions__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header-actions__toggle[aria-expanded="true"] span:nth-child(3) {
  top: calc(50% - 1px);
  transform: translateX(-50%) rotate(-45deg);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  pointer-events: none;
  z-index: 5;
}

.header-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, #FFA76B 100%);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.6);
}

/* ========== 5. QUICK SEARCH ========== */
.quick-search {
  position: absolute;
  top: calc(100% + 8px);
  right: max(24px, calc((100vw - var(--container-w)) / 2));
  width: min(360px, calc(100vw - 32px));
  z-index: 1002;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}

.quick-search[aria-hidden="true"] {
  display: none;
}

.quick-search__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.quick-search__input:focus {
  border-color: var(--accent);
}

.quick-search__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.quick-search__list {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.quick-search__list a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.quick-search__list a:hover,
.quick-search__list a:focus {
  background: var(--accent-soft);
  color: var(--accent);
}

.quick-search__empty {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* ========== 6. FOOTER ========== */
.site-footer {
  position: relative;
  margin-top: 80px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-deep) 100%);
  border-top: 4px solid var(--accent);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 180px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.footer-core {
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}

.footer-brand,
.footer-contact,
.footer-links {
  min-width: 0;
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-brand__mark:hover {
  color: var(--accent);
}

.footer-brand__mark-dot {
  color: var(--accent);
}

.footer-brand__desc {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.footer-brand__trust {
  max-width: 300px;
  margin-top: 16px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-heading::before {
  content: '';
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.footer-contact__list,
.footer-links__list {
  display: grid;
  gap: 10px;
}

.footer-contact__list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.footer-contact__label {
  width: 32px;
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--data-vis);
}

.footer-contact__list span:last-child {
  word-break: break-word;
}

.footer-links__list a {
  display: inline-block;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links__list a::before {
  content: '→';
  margin-right: 8px;
  color: var(--accent);
  opacity: 0.7;
}

.footer-links__list a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-bottom {
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 20px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.footer-bottom p {
  margin: 0;
}

/* ========== 7. SHARED COMPONENTS ========== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 640px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.35);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.45);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

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

.btn--sm {
  padding: 8px 16px;
  font-size: 14px;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.data-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.data-card__value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
}

.data-card__label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.breadcrumb li {
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline,
.update-log {
  position: relative;
  padding-left: 28px;
  list-style: none;
}

.timeline::before,
.update-log::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline li,
.update-log li {
  position: relative;
  padding: 0 0 28px 18px;
}

.timeline li::before,
.update-log li::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent);
}

.timeline time,
.update-log time {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-secondary);
}

.table-wrap table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-wrap th {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.table-wrap tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ========== 8. RESPONSIVE ========== */
@media (max-width: 1024px) {
  .header-inner {
    gap: 20px;
  }

  .nav-command__link {
    padding: 10px 12px;
  }

  .footer-core {
    gap: 32px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    padding: 0 16px;
    gap: 16px;
  }

  .header-actions__toggle {
    display: block;
  }

  .nav-command {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: rgba(8, 20, 45, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }

  .nav-command[data-open] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-command__list {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
  }

  .nav-command__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-command__link::after {
    left: 8px;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 3px;
    height: 20px;
    transform: translateY(-50%) scaleY(0);
    transform-origin: center;
  }

  .nav-command__link[aria-current="page"]::after,
  .nav-command__link:hover::after {
    transform: translateY(-50%) scaleY(1);
  }

  .nav-command__index {
    font-size: 11px;
  }

  .quick-search {
    right: 12px;
    left: 12px;
    width: auto;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

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

@media (max-width: 560px) {
  :root {
    --header-h: 60px;
  }

  .brand-mark__flame {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand-mark__name {
    font-size: 17px;
  }

  .brand-mark__slogan {
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions__search,
  .header-actions__toggle {
    width: 38px;
    height: 38px;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  .container {
    width: min(100% - 32px, var(--container-w));
  }

  .section-title {
    font-size: 26px;
  }
}

/* ========== 9. REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== 10. MOBILE BODY BACKGROUND FIX ========== */
@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }
}
