/* ==========================================================================
   【风格 03 · 星图天穹】深夜观星台 - 品牌「云图」纯原生极简高质感样式表
   配色：深藏青底 (#10152B) · 米白主字 (#E8E4D8) · 鎏金点缀 (#D4B16A)
   特性：卡片半透明深蓝细金描边、圆角 12px、主按钮金色描线幽灵款
   ========================================================================== */

:root {
  --bg-primary: #10152B;
  --bg-secondary: #0B0F20;
  --bg-card: rgba(16, 21, 43, 0.72);
  --bg-card-hover: rgba(25, 33, 64, 0.85);

  --border-gold: rgba(212, 177, 106, 0.28);
  --border-gold-hover: rgba(212, 177, 106, 0.65);
  --border-subtle: rgba(232, 228, 216, 0.08);

  --text-main: #E8E4D8;
  --text-secondary: #A6ADC4;
  --text-muted: #6C7491;

  --gold: #D4B16A;
  --gold-light: #F3E0A2;
  --gold-glow: rgba(212, 177, 106, 0.35);

  --radius-sm: 6px;
  --radius-card: 12px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px rgba(5, 8, 18, 0.6), inset 0 1px 0 rgba(212, 177, 106, 0.12);
  --shadow-glow: 0 0 25px rgba(212, 177, 106, 0.3);
  --container-max: 1180px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  background: radial-gradient(circle at 50% -10%, rgba(212, 177, 106, 0.08), transparent 60%),
              radial-gradient(circle at 85% 35%, rgba(24, 32, 61, 0.5), transparent 50%),
              var(--bg-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  vertical-align: middle;
}

/* 容器规范 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* 页眉 (Header) */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 21, 43, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-gold);
  padding: 16px 0;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-main);
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
  background: rgba(212, 177, 106, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  box-shadow: 0 0 14px rgba(212, 177, 106, 0.15);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--gold);
}

/* 按钮规范：金色描线幽灵款，悬停填充金色、文字转深蓝 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.04em;
  min-height: 44px; /* 满足 WCAG 2.1 移动端安全触控尺寸规范 */
}

.btn-primary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: 0 0 14px rgba(212, 177, 106, 0.15);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--bg-primary);
  box-shadow: 0 0 25px rgba(212, 177, 106, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(232, 228, 216, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
  background: rgba(212, 177, 106, 0.12);
  border-color: var(--gold-light);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 13px 32px;
  font-size: 1.05rem;
}

/* 页面通用标题与区块 */
.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background: rgba(11, 15, 32, 0.65);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 50px;
}

.section-tag {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* 子页面规范排版 (关于我们、服务条款、隐私政策、网站地图、文章详情) */
.subpage-container {
  max-width: 880px;
  margin: 50px auto 80px;
  padding: 42px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.subpage-title {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.subpage-meta {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-gold);
}

.content-block {
  margin-bottom: 36px;
}

.content-block h2 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-block p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

.content-block ul {
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-block li {
  margin-bottom: 8px;
}

.notice-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  color: #fca5a5;
  margin: 20px 0;
  font-size: 0.92rem;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
  transition: var(--transition);
}

.back-home-btn:hover {
  color: var(--gold);
  transform: translateX(-3px);
}

/* FAQ 常见问题手风琴组件 */
.faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0 30px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.faq-item[open] {
  border-color: var(--border-gold-hover);
  background: var(--bg-card-hover);
}

.faq-question {
  padding: 16px 20px;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.8;
  border-top: 1px solid rgba(212, 177, 106, 0.12);
  margin-top: 4px;
  padding-top: 12px;
}

.faq-answer a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.faq-answer a:hover {
  color: var(--gold-light);
}

/* 页脚 (Footer) */
.footer {
  background: #080B17;
  border-top: 1px solid var(--border-gold);
  padding: 40px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: center;
}

@media (max-width: 768px) {
  .subpage-container {
    padding: 26px 20px;
    margin: 20px auto 40px;
  }
  .subpage-title {
    font-size: 1.65rem;
  }
}

/* ==========================================================================
   无障碍访问支持 (Accessibility & WCAG 2.1 规范)
   ========================================================================== */

/* 1. 跳转到主要内容快捷锚点 (Skip Link) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--gold);
  color: var(--bg-primary);
  padding: 10px 18px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.skip-link:focus {
  top: 15px;
  outline: 3px solid var(--gold-light);
}

/* 2. 全局键盘聚焦环样式 (:focus-visible) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* 3. 锚点跳转平滑偏移量，确保固定吸顶页眉不遮挡内容标题 */
section[id],
h1[id],
h2[id],
h3[id],
[id] {
  scroll-margin-top: 85px;
}

/* 4. 长文本安全换行，杜绝移动端横向溢出 */
p, h1, h2, h3, h4, span, li, a {
  overflow-wrap: break-word;
}

/* 5. 遵守系统减少动态效果偏好 (prefers-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;
  }
  #star-canvas {
    display: none !important;
  }
}
