/* ============ 星门看台 / 全站共享样式 ============ */

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

html {
  scroll-behavior: smooth;
}

body {
  background: #0B1E3A;
  color: #F2F6FC;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: #00E5FF;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #FFC94A;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

main {
  min-height: 60vh;
}

/* ---------- CSS 变量 ---------- */
:root {
  --bg: #0B1E3A;
  --bg-deep: #050A13;
  --bg-card: #10294D;
  --gold: #FFC94A;
  --cyan: #00E5FF;
  --text: #F2F6FC;
  --text-sec: #C4D0E0;
  --success: #51D88A;
  --error: #FF5C5C;
  --divider: rgba(255, 201, 74, 0.2);
  --font-head: 'Orbitron', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --content-max: 1280px;
  --transition: 0.2s ease;
}

/* ---------- 通用布局 ---------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 599.98px) {
  .container {
    padding: 0 16px;
  }
}

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

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

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

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

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

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

/* ---------- 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 3px;
}

h2 {
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 2px;
}

h3 {
  font-size: 18px;
  letter-spacing: 1px;
}

p {
  margin-bottom: 1em;
}

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

::selection {
  background: var(--gold);
  color: var(--bg-deep);
}

hr {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 32px 0;
}

/* ---------- 滚动条 ---------- */
html {
  scrollbar-color: var(--gold) rgba(16, 41, 77, 0.6);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
}

::-webkit-scrollbar-track {
  background: var(--bg-card);
}

/* ---------- 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 600;
  letter-spacing: 2px;
  padding: 10px 20px;
  min-height: 40px;
}

.skip-link:focus {
  left: 0;
  color: var(--bg-deep);
}

body.scroll-locked {
  overflow: hidden;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 30, 58, 0.94);
  border-bottom: 1px solid var(--divider);
  overflow: visible;
}

.header-inner {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 599.98px) {
  .header-inner {
    padding: 0 16px;
  }
}

.header-masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 16px 12px;
}

.header-masthead::before,
.header-masthead::after {
  content: '';
  position: absolute;
  top: 50%;
  width: clamp(30px, 8vw, 140px);
  height: 1px;
  transform: translateY(-50%);
}

.header-masthead::before {
  left: calc(50% - clamp(90px, 16vw, 260px));
  background: linear-gradient(90deg, transparent, var(--gold));
  opacity: 0.7;
}

.header-masthead::after {
  right: calc(50% - clamp(90px, 16vw, 260px));
  background: linear-gradient(270deg, transparent, var(--gold));
  opacity: 0.7;
}

@media (max-width: 899.98px) {
  .header-masthead::before,
  .header-masthead::after {
    display: none;
  }
}

/* ---------- 品牌 ---------- */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 44px;
  flex: none;
}

.brand-mark::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  border-radius: 2px;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 12px;
  background: var(--cyan);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--text);
  white-space: nowrap;
}

.brand-name-en {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-top: 2px;
}

/* ---------- 汉堡按钮 ---------- */
.nav-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--gold);
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
}

/* ---------- 主导航 ---------- */
.header-nav {
  display: flex;
  align-items: center;
}

@media (max-width: 899.98px) {
  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 400;
    width: min(320px, 88vw);
    flex-direction: column;
    align-items: stretch;
    padding: 36px 28px 28px;
    background:
      radial-gradient(circle at 82% 12%, rgba(0, 229, 255, 0.14), transparent 120px),
      linear-gradient(180deg, rgba(255, 201, 74, 0.07), transparent 220px),
      var(--bg-deep);
    border-left: 1px solid var(--divider);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.32s ease, visibility 0.32s ease;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
  }

  .header-nav.is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.32s ease, visibility 0s 0s;
  }
}

@media (min-width: 900px) {
  .header-nav {
    justify-content: center;
    padding: 10px 0 14px;
    border-top: 1px solid var(--divider);
    position: relative;
  }
}

/* ---------- 导航抽屉头部 ---------- */
.nav-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--divider);
}

.nav-head-mark {
  color: var(--cyan);
  font-size: 14px;
}

.nav-head-label {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--text-sec);
}

.nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--divider);
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
}

@media (min-width: 900px) {
  .nav-head {
    display: none;
  }
}

/* ---------- 导航列表 ---------- */
.nav-list {
  display: flex;
}

@media (max-width: 899.98px) {
  .nav-list {
    flex-direction: column;
    margin-bottom: 24px;
  }

  .nav-item {
    border-bottom: 1px solid var(--divider);
  }
}

@media (min-width: 900px) {
  .nav-list {
    flex-direction: row;
    justify-content: center;
    gap: 2px;
  }
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-sec);
  transition: color 0.2s ease;
}

.nav-link::before {
  content: '◆';
  width: 14px;
  display: inline-block;
  font-size: 6px;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.nav-link:hover::before,
.nav-link[aria-current="page"]::before {
  opacity: 1;
}

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

@media (max-width: 899.98px) {
  .nav-link {
    padding: 16px 0;
    font-size: 15px;
    width: 100%;
  }
}

@media (min-width: 900px) {
  .nav-link {
    padding: 10px 18px;
    font-size: 14px;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 4px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
  }

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

/* ---------- 订阅按钮 ---------- */
.nav-cta {
  flex: none;
}

@media (max-width: 899.98px) {
  .nav-cta {
    margin-top: auto;
    align-self: stretch;
  }
}

@media (min-width: 900px) {
  .nav-cta {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transform: scaleX(0);
  transform-origin: 0% 50%;
  pointer-events: none;
  z-index: 10;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--bg-deep);
  margin-top: 96px;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--cyan), transparent);
  opacity: 0.7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.9fr 1.3fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 48px;
}

@media (max-width: 899.98px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 599.98px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand .brand-lockup {
  margin-bottom: 16px;
}

.footer-desc {
  color: var(--text-sec);
  font-size: 14px;
  line-height: 1.8;
  margin-top: 14px;
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

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

.footer-links a {
  color: var(--text-sec);
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: var(--cyan);
  padding-left: 6px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-sec);
  font-size: 14px;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid var(--divider);
  padding: 16px 0;
}

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

.footer-bottom-inner p {
  margin: 0;
  color: var(--text-sec);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ---------- 按钮 ---------- */
.btn {
  --btn-pad: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: var(--btn-pad);
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--bg-deep);
}

.btn-gold:hover {
  background: var(--cyan);
  color: var(--bg-deep);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
}

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

.btn-ghost:hover {
  background: var(--gold);
  color: var(--bg-deep);
}

.nav-cta {
  --btn-pad: 0 20px;
  min-height: 34px;
  font-size: 13px;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--text-sec);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li::after {
  content: '/';
  color: var(--gold);
}

.breadcrumb li:last-child::after {
  content: '';
}

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

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

.breadcrumb li:last-child {
  color: var(--gold);
}

/* ---------- 页面标题区 ---------- */
.page-header {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 36px;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: 4px;
  line-height: 1.2;
  margin-top: 12px;
}

/* ---------- 章节标题 ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-head);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 20px;
}

.section-title .count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 2px;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--cyan);
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  line-height: 1;
  padding: 8px 14px;
  border: 1px solid var(--divider);
  color: var(--cyan);
  background: var(--bg-card);
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-gold {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 rgba(255, 201, 74, 0.12);
}

.card-title {
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-sec);
  margin-bottom: 14px;
}

.card-text {
  color: var(--text-sec);
  font-size: 14px;
  line-height: 1.8;
}

/* ---------- 数据表格 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--divider);
  background: rgba(5, 10, 19, 0.4);
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.data-table th {
  text-align: left;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-sec);
}

.data-table tr:hover td {
  background: rgba(16, 41, 77, 0.5);
}

/* ---------- 提示卡 ---------- */
.callout {
  border: 1px solid var(--divider);
  border-left: 3px solid var(--cyan);
  background: var(--bg-card);
  padding: 24px 28px;
  margin: 28px 0;
  color: var(--text-sec);
  line-height: 1.9;
  font-size: 15px;
}

.callout::before {
  content: 'NOTICE';
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 8px;
}

/* ---------- 图片容器 ---------- */
.image-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--divider);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.image-frame::before {
  content: 'IMAGE';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--text-sec);
  opacity: 0.5;
  z-index: 0;
}

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

.image-frame:has(img)::before {
  display: none;
}

.image-frame.is-16-9 {
  aspect-ratio: 16 / 9;
}

.image-frame.is-4-3 {
  aspect-ratio: 4 / 3;
}

.image-frame.is-1-1 {
  aspect-ratio: 1 / 1;
}

.image-frame.is-2-1 {
  aspect-ratio: 2 / 1;
}

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

/* ---------- 显现交互 ---------- */
.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.js-enabled [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 动效降级 ---------- */
@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;
  }

  [data-reveal],
  .js-enabled [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-progress {
    display: none;
  }
}
