:root {
  --bg-dark: #0b0f19;
  --text-main: #f3f4f6;
  /* 次要文字：原来 #9ca3af 压在深色背景上偏灰，提亮增强对比 */
  --text-muted: #b9c0ce;
  /* 正文段落：比次要文字再亮一档 */
  --text-soft: #ccd2dd;
  --primary-gradient: linear-gradient(135deg, #c084fc, #3b82f6);
  --card-bg: rgba(8, 12, 20, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);

  /* 全站固定背景图（银河夜景）。注意：路径相对 css 目录，必须带 ../ */
  --page-bg-image: url('../images/hero-bg.webp');
  /* 手机端专用小图：窄屏不需要 1920px 的贴图，省一半以上流量 */
  --page-bg-image-mobile: url('../images/hero-bg-960.webp');
  /* 压暗层：背景贴图已在高光处做过压缩，这里只补一层轻渐变 */
  --bg-scrim: linear-gradient(180deg,
      rgba(5, 9, 16, 0.58) 0%,
      rgba(5, 9, 16, 0.44) 20%,
      rgba(5, 9, 16, 0.34) 45%,
      rgba(5, 9, 16, 0.32) 62%,
      rgba(5, 9, 16, 0.42) 82%,
      rgba(5, 9, 16, 0.58) 100%);
}

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

/* ================= 1. 全局背景：地球图固定在最底层 ================= */
html {
  background-color: #05070c; /* 视口底色（地球图加载前 / 边缘兜底） */
  /* 滚动条也做成暗色细条，避免浅色滚动条在暗色页面上很突兀 */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); background-clip: padding-box; }

body {
  color: var(--text-main);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;

  /* 背景统一交由 ::before 绘制，避免与压暗层叠加 */
  background: transparent;

  /* 满幅布局：去除外边距，避免视口边缘出现留白带 */
  margin: 0;
  border: none;
  border-radius: 0;
  min-height: 100vh;
}

/* 背景层：固定在视口底层（z-index: -1），不随页面滚动 */
body::before {
  content: "";
  position: fixed;
  inset: 0; /* 铺满整个视口，左右不再留黑边 */
  z-index: -1;
  border-radius: 0;
  pointer-events: none;

  background-image: var(--bg-scrim), var(--page-bg-image);
  background-repeat: no-repeat, no-repeat;
  /* 居中取景：宽屏下也能同时保留银河、山脊线与前景 */
  background-position: center center, center center;
  background-size: cover, cover;
}

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

/* 顶部导航：贴住窗口上沿 + 透明磨砂玻璃 */
header {
  position: fixed; top: 0; left: 0; right: 0; padding: 15px 42px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  /* 磨砂玻璃：半透明底色 + 背景模糊 + 顶部高光，兼顾透视与可读性 */
  background-color: rgba(10, 16, 28, 0.42);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  -webkit-backdrop-filter: blur(23px) saturate(160%);
  backdrop-filter: blur(23px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.35);
  z-index: 100;
}
.logo-area {
  justify-self: start; display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: bold; white-space: nowrap;
}
/* 导航菜单：grid 中间列，天然严格居中（不受左右宽度影响） */
nav { justify-self: center; }
.logo-icon {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 8px;
  background: var(--primary-gradient);
  display: flex; justify-content: center; align-items: center;
  color: white; font-size: 15px; white-space: nowrap;
}
/* 透明底 logo（images/logo.png），等比缩放，不加底框 */
#site-logo-img {
  height: 40px; width: auto; border-radius: 0; display: none; object-fit: contain;
  /* 中文字形的视觉重心略低于外框中心，logo 下移 2px 才和右侧公司名真正平齐 */
  transform: translateY(2px);
}
nav > ul { display: flex; list-style: none; gap: 38px; }
nav a { color: var(--text-muted); font-size: 15px; transition: color 0.3s; }
nav a:hover, nav a.is-active { color: var(--text-main); }

/* 带下拉的菜单项 */
.nav-item { position: relative; }
.nav-item--has-children > a { display: inline-flex; align-items: center; gap: 5px; }
/* 下拉指示符：用 CSS 三角形绘制，避免字体差异带来的对齐偏差 */
.nav-caret {
  font-size: 0; line-height: 0; width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6; margin-top: 3px;
  transition: transform 0.3s;
}
.nav-item--has-children:hover .nav-caret { transform: rotate(180deg); }

/* 下拉小列表：与导航栏同一款磨砂玻璃材质，展开时轻微下沉 + 缩放 + 淡入 */
.dropdown {
  position: absolute; top: calc(100% + 23px); left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(0.965);
  transform-origin: top center;
  display: block; min-width: 178px; padding: 8px; margin: 0;
  list-style: none;
  background: rgba(10, 16, 28, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  /* 三层阴影叠出厚度：贴边近影 + 主体投影 + 远处扩散光，再补一条内高光 */
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 12px 26px rgba(0, 0, 0, 0.34),
    0 30px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(139, 92, 246, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition:
    opacity 0.3s cubic-bezier(0.22, 0.8, 0.3, 1),
    transform 0.34s cubic-bezier(0.22, 0.8, 0.3, 1),
    visibility 0.34s;
  z-index: 120;
}
/* 面板顶部的小尖角，指向「关于我们」 */
.dropdown::before {
  content: "";
  position: absolute; top: -6px; left: 50%;
  width: 11px; height: 11px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(16, 23, 37, 0.9);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px 0 0 0;
}
.nav-item--has-children:hover .dropdown,
.nav-item--has-children:focus-within .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
/* 透明过渡区：填补触发区与面板之间的空隙，避免指针下移时丢失 hover 状态 */
.nav-item--has-children::after {
  content: ""; position: absolute; left: -14px; right: -14px; top: 100%; height: 26px;
}
.dropdown li { margin: 0; }
.dropdown a {
  display: block; padding: 10px 15px; border-radius: 10px;
  font-size: 14px; color: var(--text-muted); white-space: nowrap;
  transform: translateX(0);
  transition: background 0.25s, color 0.25s, transform 0.25s cubic-bezier(0.22, 0.8, 0.3, 1);
}
.dropdown a:hover, .dropdown a.is-active {
  background: rgba(139, 92, 246, 0.16);
  color: var(--text-main);
  transform: translateX(3px);
}
.btn-outline {
  justify-self: end; white-space: nowrap;
  border: 1px solid var(--card-border); padding: 8px 21px; border-radius: 6px;
  font-size: 15px; transition: background 0.3s;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ================= 2. 首屏（纯排版，去掉外框） ================= */
#hero {
  width: 100%;
  max-width: 1470px;
  margin: 105px auto 0; /* 顶部留出导航栏位置 */
  min-height: 80vh;          
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative;
  background: transparent;
}

/* 首屏柔光遮罩：中心压暗、边缘完全透明，
   在银河亮部与地平线暖光后托住标题对比度 */
#hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 62% 44% at 50% 46%,
    rgba(5, 9, 16, 0.52) 0%,
    rgba(5, 9, 16, 0.30) 52%,
    rgba(5, 9, 16, 0) 82%);
}

.tag {
  display: inline-block; padding: 6px 17px; border-radius: 21px;
  /* 提高底色不透明度：保证紫色小字压在深空背景上也有足够对比度 */
  background: rgba(88, 52, 170, 0.42); border: 1px solid rgba(160, 120, 255, 0.45);
  color: #dcc3ff; font-size: 15px; margin-bottom: 25px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
#hero h1 { font-size: 59px; line-height: 1.2; margin-bottom: 25px; font-weight: 800; letter-spacing: 2px; }
#hero h1 span {
  background: var(--primary-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}
#hero p { max-width: 735px; color: var(--text-muted); font-size: 19px; margin-bottom: 42px; }
.action-btns { display: flex; gap: 21px; margin-bottom: 63px; }
.btn-primary {
  background: var(--primary-gradient); color: white; font-weight: bold;
  padding: 13px 34px; border-radius: 8px; transition: opacity 0.3s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: var(--card-bg); border: 1px solid var(--card-border);
  padding: 13px 34px; border-radius: 8px; transition: background 0.3s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* 数据面板 */
.metrics-container {
  display: flex; gap: 21px; flex-wrap: wrap; justify-content: center;
  max-width: 945px; width: 100%;
}
.metric-card {
  flex: 1; min-width: 210px; padding: 25px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 13px; backdrop-filter: blur(10px);
}
.metric-value {
  font-size: 34px; font-weight: bold; margin-bottom: 8px;
  background: var(--primary-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.metric-label { color: var(--text-muted); font-size: 15px; }

/* ================= 3. 下方所有区块（透明化） ================= */
section { 
  padding: 84px 21px; 
  max-width: 1155px; 
  margin: 0 auto; 
  background: transparent;
}
.section-title { font-size: 38px; margin-bottom: 42px; font-weight: bold; text-align: center;}
.section-sub {
  text-align: center; color: var(--text-muted); font-size: 16px;
  max-width: 798px; margin: -27px auto 38px;
}

/* 关于我们 */
#about-content { display: flex; gap: 42px; align-items: center; }
.about-text { flex: 1; color: var(--text-muted); font-size: 17px; line-height: 1.85; }
.about-text p + p { margin-top: 15px; }
.about-img { flex: 1; border-radius: 17px; overflow: hidden; border: 1px solid var(--card-border); }
.about-img img { width: 100%; height: 100%; min-height: 368px; object-fit: cover; display: block; }

/* 核心技术手段：编号卡片布局，不使用配图 */
.tech-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(315px, 1fr)); gap: 25px; }
.tech-card {
  position: relative; padding: 29px 25px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 15px; transition: transform 0.3s, border-color 0.3s;
}
.tech-card::after { /* 右上角微弱光晕 */
  content: ""; position: absolute; top: -74px; right: -74px; width: 189px; height: 189px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.26), transparent 70%);
  pointer-events: none;
}
.tech-card:hover { transform: translateY(-5px); border-color: rgba(139, 92, 246, 0.5); }
.tech-num {
  font-size: 36px; font-weight: 800; line-height: 1; margin-bottom: 15px;
  background: var(--primary-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.tech-card h3 { font-size: 20px; margin-bottom: 13px; }
.tech-highlight {
  display: inline-block; margin-bottom: 15px; padding: 4px 10px; border-radius: 6px;
  font-size: 14px; color: #c084fc;
  background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.28);
}
.tech-card p { color: var(--text-muted); font-size: 16px; line-height: 1.75; }

/* 业务场景 */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: 21px; }
.scenario-card {
  padding: 27px 23px; border-radius: 15px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  transition: transform 0.3s, border-color 0.3s;
}
.scenario-card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.5); }
.scenario-icon {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 17px;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.25);
}
.scenario-card h3 { font-size: 18px; margin-bottom: 10px; }
.scenario-card p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* 研发与现场 */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(294px, 1fr)); gap: 21px; }
.gallery-card {
  margin: 0; border-radius: 15px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--card-border);
  transition: transform 0.3s, border-color 0.3s;
}
.gallery-card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.5); }
.gallery-card img { display: block; width: 100%; height: 200px; object-fit: cover; }
.gallery-card figcaption { padding: 15px 19px 19px; display: flex; flex-direction: column; gap: 4px; }
.gallery-card strong { font-size: 16px; font-weight: 600; }
.gallery-card span { color: var(--text-muted); font-size: 14px; }
.gallery-card.img-missing img { display: none; }

/* 资质与荣誉 */
.honor-layout { display: grid; grid-template-columns: 1.25fr 1fr; gap: 34px; align-items: start; }
.honor-list { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.honor-item {
  padding: 17px 19px; border-radius: 13px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-left: 2px solid rgba(139, 92, 246, 0.7);
}
.honor-label { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.honor-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.partner-block { margin-top: 25px; }
.partner-block h3 { font-size: 17px; margin-bottom: 13px; }
.partner-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.partner-list li {
  font-size: 14px; color: var(--text-muted); padding: 6px 13px; border-radius: 21px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--card-border);
}
.honor-imgs { display: grid; gap: 19px; }
.honor-imgs img {
  display: block; width: 100%; max-height: 294px; object-fit: cover;
  border-radius: 13px; border: 1px solid var(--card-border);
}

/* 新闻动态 */
.news-list { display: flex; flex-direction: column; gap: 17px; max-width: 945px; margin: 0 auto; }
.news-item {
  display: flex; align-items: flex-start; gap: 25px; padding: 25px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 13px; text-decoration: none; transition: all 0.3s;
}
.news-item:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(139, 92, 246, 0.5); transform: translateX(10px); }
.news-date { color: #c084fc; font-weight: bold; font-size: 16px; white-space: nowrap; }
.news-content h3 { font-size: 19px; color: var(--text-main); margin-bottom: 8px; }
.news-content p { font-size: 15px; color: var(--text-muted); }

/* 页脚 */
footer {
  text-align: center; padding: 42px; border-top: 1px solid var(--card-border);
  color: var(--text-muted); font-size: 15px; margin-top: 63px;
  background: transparent;
}
/* 页脚：小 logo + 版权信息，整体居中 */
.footer-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.footer-logo {
  height: 26px; width: auto; display: block; opacity: 0.92;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
footer p { margin: 0; }

/* 联系我们 */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 19px; max-width: 1029px; margin: 0 auto;
}
.contact-card {
  padding: 23px 25px; border-radius: 15px;
  background: var(--card-bg); border: 1px solid var(--card-border);
}
.contact-label { font-size: 14px; color: #c084fc; letter-spacing: 1px; margin-bottom: 8px; }
.contact-value { font-size: 16px; line-height: 1.7; word-break: break-word; }
.contact-note { text-align: center; color: var(--text-muted); font-size: 15px; margin-top: 27px; }

/* ================= 4. 栏目底部「查看更多」入口 ================= */
.more-wrap { text-align: center; margin-top: 46px; }
.more-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 26px; border-radius: 32px;
  font-size: 15px; color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.more-link:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}
.more-arrow { transition: transform 0.3s; }
.more-link:hover .more-arrow { transform: translateX(4px); }

/* ================= 5. 栏目详情页（同一套地球背景 + 毛玻璃导航） ================= */
.detail-wrap { max-width: 1040px; margin: 0 auto; padding: 140px 21px 84px; }
.detail-head { text-align: center; margin-bottom: 42px; }
.breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); transition: color 0.3s; }
.breadcrumb a:hover { color: var(--text-main); }
.crumb-sep { margin: 0 8px; opacity: 0.5; }
.detail-title {
  font-size: 42px; font-weight: 800; letter-spacing: 1px; line-height: 1.25;
  background: linear-gradient(135deg, #ffffff 25%, #c6c9ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.detail-sub { color: var(--text-muted); font-size: 16px; margin-top: 14px; line-height: 1.8; }

.detail-block {
  padding: 32px 34px; margin-bottom: 20px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 16px;
}
.detail-block h2 { font-size: 21px; margin-bottom: 16px; }
.detail-block p { color: var(--text-muted); font-size: 16px; line-height: 1.95; }
.detail-block p + p { margin-top: 12px; }
.detail-block p strong { color: var(--text-main); font-weight: 600; }
.detail-icon {
  width: 48px; height: 48px; border-radius: 13px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
  background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.25);
}
.detail-highlight {
  display: inline-block; margin-bottom: 16px; padding: 5px 12px; border-radius: 7px;
  font-size: 14px; color: #c084fc;
  background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.28);
}
.bullet-list { list-style: none; display: grid; gap: 11px; margin-top: 18px; }
.bullet-list li {
  position: relative; padding-left: 20px;
  color: var(--text-muted); font-size: 15px; line-height: 1.8;
}
.bullet-list li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-gradient);
}

/* 发展历程时间线 */
.timeline { position: relative; margin-top: 6px; }
.timeline-item {
  position: relative; padding: 0 0 22px 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -4px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #c084fc; box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}
.timeline-date { font-size: 14px; font-weight: 600; color: #c084fc; margin-bottom: 5px; letter-spacing: 0.5px; }
.timeline-text { font-size: 15px; color: var(--text-muted); line-height: 1.8; }

/* 媒体报道列表 */
.media-list { display: grid; gap: 12px; margin-top: 4px; }
.media-item {
  display: grid; grid-template-columns: 98px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--card-border);
  transition: background 0.3s, border-color 0.3s;
}
.media-item:hover { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.45); }
.media-date { font-size: 13px; color: #c084fc; }
.media-name { font-size: 15px; color: var(--text-main); line-height: 1.6; }
.media-arrow { color: var(--text-muted); font-size: 14px; }

.detail-block--photos .gallery-grid { margin-top: 4px; }
.news-list--detail { max-width: none; }
nav a.is-active { color: var(--text-main); }

/* 平板：菜单压缩间距，避免挤压 logo */
@media (max-width: 1300px) {
  nav > ul { gap: 24px; }
  nav a { font-size: 14px; }
  .logo-area { font-size: 15px; }
  #site-logo-img { height: 34px; }
}
@media (max-width: 900px) {
  nav > ul { display: none; }
  /* 手机端改用 960px 的小背景图，画质在手机上无差别，流量省 78% */
  body::before { background-image: var(--bg-scrim), var(--page-bg-image-mobile); }
}

/* ================= 6. 文字可读性：小字提亮 + 极轻阴影 ================= */
.about-text,
.tech-card p,
.scenario-card p,
.news-content p,
.honor-desc,
.contact-value,
.detail-block p,
.bullet-list li,
.timeline-text,
.media-name,
.gallery-card span,
#hero p,
.section-sub {
  color: var(--text-soft);
}
/* 文字阴影保持极低强度：仅在明亮区域提升可读性，暗部几乎不可见 */
#hero p,
.section-sub,
.about-text,
.news-content p,
.contact-note,
.gallery-card span,
.detail-block p,
.bullet-list li,
.timeline-text,
.honor-desc {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ================= 7. 背景粒子层 ================= */
/* 画布由 js/fx/particles.js 注入，绘制逻辑与降级策略见该文件 */
#particle-layer {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: -1; /* 位于地球背景之上、页面内容之下 */
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

#particle-layer.is-active {
  opacity: 1;
}

/* 手机端适配 */
@media (max-width: 768px) {
  nav > ul { display: none; }
  #hero h1 { font-size: 38px; }
  #about-content { flex-direction: column; }
  .news-item { flex-direction: column; gap: 10px; }
  .honor-layout { grid-template-columns: 1fr; gap: 25px; }
  .honor-list { grid-template-columns: 1fr; }
  section { padding: 63px 21px; }
  .section-sub { margin-top: -21px; margin-bottom: 29px; }
  .btn-outline { font-size: 13px; padding: 7px 12px; }
  .detail-wrap { padding: 112px 18px 61px; }
  .detail-title { font-size: 30px; }
  .detail-block { padding: 24px 20px; }
  .detail-block h2 { font-size: 18px; }
  .media-item { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .media-date { grid-column: 1 / -1; }

  body { 
    margin: 0; /* 手机端为了屏幕利用率，去掉边框留白 */
    border: none;
  } 
  body::before { inset: 0; border-radius: 0; }
  header { top: 0; left: 0; right: 0; padding: 15px 21px; }
  .logo-area { font-size: 16px; gap: 8px; }
  #site-logo-img { height: 34px; }
}

/* ================= 8. 手机端侧边栏导航 ================= */
/* 桌面端完全不参与渲染；≤900px 才出现汉堡按钮与抽屉 */
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 汉堡按钮：与导航栏同款磨砂玻璃，展开时变成 × */
.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 16, 28, 0.45);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  cursor: pointer;
}
.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-main);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.2s;
}
/* 三条线变成 ×：上下两条向中间收拢后旋转 */
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 遮罩：关闭时不拦截点击 */
.side-nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  background: rgba(3, 6, 12, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.side-nav-scrim.is-open { opacity: 1; pointer-events: auto; }

/* 侧边栏本体：右侧抽屉 + 磨砂玻璃，只用 transform 做位移，避免逐帧重绘 */
.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  width: min(84vw, 340px);
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  background: rgba(10, 16, 28, 0.62);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.55), inset 1px 0 0 rgba(255, 255, 255, 0.06);
  transform: translateX(100%);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 打开时 visibility 立即生效（否则刚打开时无法聚焦内部按钮）；
     关闭时延迟到滑动结束再隐藏，避免抽屉提前消失 */
  transition: transform 0.36s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s linear 0.36s;
}
.side-nav.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.36s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0s;
}

.side-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.side-nav__title {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--text-muted);
  opacity: 0.8;
}
.side-nav__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.side-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
}
.side-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 16px;
  color: var(--text-muted);
  transition: background 0.25s, color 0.25s;
}
.side-nav__link:hover,
.side-nav__link.is-active {
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.16);
}
.side-nav__home-arrow { opacity: 0.7; }

.side-nav__row { display: flex; align-items: center; gap: 2px; }
.side-nav__row .side-nav__link { flex: 1; }
.side-nav__expand {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.side-nav__caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-muted);
  transition: transform 0.3s;
}
.side-nav__expand[aria-expanded="true"] .side-nav__caret { transform: rotate(180deg); }

.side-nav__sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.34s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.28s;
}
.side-nav__sub-link {
  display: block;
  padding: 11px 14px 11px 28px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-soft);
}
.side-nav__sub-link:hover,
.side-nav__sub-link.is-active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.side-nav__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-nav__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.side-nav__hint {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  text-align: center;
}

/* 抽屉打开时锁住背后的滚动 */
body.side-nav-open { overflow: hidden; }

@media (max-width: 900px) {
  /* 账号入口收入侧边栏，给汉堡按钮腾出位置 */
  .btn-outline { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .side-nav-scrim { display: block; }
  .side-nav { display: flex; }
}