/* ==========================================================
   DCHOS 子页面样式
   · 复用 style.css 的变量 / 主题 / 玻璃质感 / 粒子 / 进度环
   · 单栏流式布局，不使用左右分栏
   ========================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}
html[data-theme="dark"] { background: #0b1220; }

/* 覆盖主页 body 的 flex 居中，改为单栏流式 */
body {
  display: block;
  padding: 24px 20px 44px;
}

/* 暗色主题下压暗固定背景图，保证文字可读 */
html[data-theme="dark"] body::before {
  filter: brightness(.42) saturate(.85);
}

/* ---------------- 页面容器 ---------------- */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------------- 玻璃卡片 ---------------- */
.card {
  position: relative;
  padding: 34px 38px;
  border-radius: 26px;
  background: var(--overlay-bg);
  border: 1px solid var(--overlay-border);
  box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
html[data-theme="dark"] .card {
  box-shadow: 0 20px 60px rgba(0, 0, 0, .42);
}

/* ---------------- 导航 ---------------- */
.nav {
  position: sticky;
  top: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 14px 12px 20px;
  border-radius: var(--radius-full);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
  white-space: nowrap;
  color: var(--main-text-color);
}
.nav-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .25);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--footer-text-color);
  white-space: nowrap;
  transition: color .25s ease, background .25s ease;
}
.nav-links a:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, .1);
}
.nav-switch {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 4px;
}

/* ---------------- Hero ---------------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 36px;
  align-items: center;
  padding: 44px 40px;
}
.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1.2px;
  color: var(--main-text-color);
}
.hero-desc {
  max-width: 520px;
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--footer-text-color);
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Hero 右侧预览卡 */
.preview {
  padding: 30px 22px;
  text-align: center;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(99, 102, 241, .14), rgba(236, 72, 153, .10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
html[data-theme="dark"] .preview {
  background: linear-gradient(160deg, rgba(99, 102, 241, .22), rgba(236, 72, 153, .14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.preview-icon {
  font-size: 64px;
  color: var(--primary);
  filter: drop-shadow(0 10px 16px rgba(99, 102, 241, .35));
}
.preview h3 {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 800;
  color: var(--main-text-color);
}
.preview p {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--footer-text-color);
}
.preview-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.preview-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-dark);
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .18);
}
html[data-theme="dark"] .preview-chips span { color: var(--primary-light); }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 20px rgba(99, 102, 241, .32);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .42);
}
.btn-ghost {
  color: var(--main-text-color);
  background: var(--glass-bg);
  border-color: var(--glass-border);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  color: var(--primary);
  border-color: var(--primary-light);
  box-shadow: var(--card-hover-shadow);
}

/* ---------------- 设备板块 ---------------- */
.device-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--main-text-color);
}
.section-title i {
  color: var(--primary);
  font-size: 18px;
}
.section-title.center {
  justify-content: center;
  margin-bottom: 8px;
}
.device-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--footer-text-color);
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  list-style: none;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--main-text-color);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.feature-list i {
  color: var(--primary);
  font-size: 15px;
}
.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* 轮播 */
.device-media { min-width: 0; }
.swiper {
  width: 100%;
  height: 230px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(99, 102, 241, .08);
  border: 1px solid var(--glass-border);
}
.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.swiper-pagination-bullet {
  background: var(--primary);
  opacity: .3;
}
.swiper-pagination-bullet-active { opacity: 1; }
.media-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--footer-text-color);
}

/* ---------------- 固件下载 ---------------- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 22px;
  text-align: center;
  border-radius: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.download-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--card-hover-shadow);
}
.download-card > i {
  margin-bottom: 14px;
  font-size: 38px;
  color: var(--primary);
}
.download-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--main-text-color);
}
.download-version {
  margin-top: 6px;
  font-size: 12px;
  color: var(--footer-text-color);
}
.download-card p {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--footer-text-color);
}
.download-card .btn {
  width: 100%;
  margin-top: 18px;
}

/* ---------------- 最新动态 ---------------- */
.news-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.news-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--main-text-color);
  background: linear-gradient(135deg, rgba(250, 204, 21, .16), rgba(99, 102, 241, .10));
  border: 1px solid rgba(250, 204, 21, .4);
}
.news-badge i {
  color: #eab308;
  font-size: 18px;
}

/* ---------------- 页脚（带玻璃遮罩） ---------------- */
footer {
  position: relative;
  padding: 26px 32px 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--footer-text-color);
  border-radius: 22px;
  background: var(--overlay-bg);
  border: 1px solid var(--overlay-border);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .10);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
html[data-theme="dark"] footer {
  box-shadow: 0 12px 36px rgba(0, 0, 0, .42);
}
.footer-divider {
  width: 56px;
  height: 2px;
  margin: 0 auto 16px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent2));
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  color: var(--main-text-color);
  opacity: .9;
}
.footer-meta i {
  margin-right: 6px;
  color: var(--primary);
  opacity: .85;
}
.footer-motto {
  margin-top: 10px;
  font-size: 12px;
  color: var(--primary);
  font-style: italic;
  opacity: .9;
}
html[data-theme="dark"] .footer-motto {
  color: var(--primary-light);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 32px 26px;
  }
  .device-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .device.card { padding: 28px 24px; }
}

@media (max-width: 640px) {
  body { padding: 14px 12px 30px; }
  .page { gap: 16px; }
  .card { border-radius: 20px; padding: 24px 20px; }

  .nav {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
  }
  .nav-links {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .nav-switch { margin-left: auto; }

  .hero { padding: 26px 20px; }
  .hero h1 { font-size: clamp(26px, 8vw, 34px); }
  .swiper { height: 180px; }
  .device-actions .btn { flex: 1; }
  .download-card .btn { width: 100%; }
}

/* ================= 功能网格（SmartCube） ================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.feature-item {
  padding: 24px 22px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.feature-item:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--card-hover-shadow);
}
.feature-item > i {
  font-size: 26px;
  color: var(--primary);
}
.feature-item h3 {
  margin: 14px 0 8px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--main-text-color);
}
.feature-item p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--footer-text-color);
}

/* ================= 更新日志入口 ================= */
.update-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 22px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.update-card span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--main-text-color);
}
.update-card span i { color: var(--primary); }
.update-card .btn { flex-shrink: 0; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr; }
}