/* dy-s.xyz — 光谱官方风 · 移动端优先 · 与既有站点差异化 */
:root {
  --bg: #030305;
  --bg-raised: #0c0c12;
  --bg-panel: #111118;
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(255, 26, 107, 0.35);
  --text: #f4f4f8;
  --text-mid: #b4b4c4;
  --text-dim: #6a6a7e;
  --pink: #ff1a6b;
  --pink-soft: #ff4d8a;
  --cyan: #00c8ff;
  --cyan-soft: #4ddfff;
  --grad-brand: linear-gradient(120deg, var(--cyan) 0%, var(--pink) 100%);
  --grad-soft: linear-gradient(135deg, rgba(0, 200, 255, 0.12), rgba(255, 26, 107, 0.12));
  --header-h: 54px;
  --fixed-h: 72px;
  --radius: 12px;
  --radius-lg: 20px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, monospace;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.82;
  font-size: 15px;
  overflow-x: hidden;
  min-height: 100vh;
}

body.has-fixed-dl { /* padding set dynamically via JS */ }

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--pink-soft); }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ===== Header ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(3, 3, 5, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.topbar.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: auto;
}

.brand img { height: 30px; width: auto; }

.brand-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topnav {
  display: none;
  align-items: center;
  gap: 4px;
}

.topnav a {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-mid);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.topnav a:hover,
.topnav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255, 26, 107, 0.25);
}

.btn-dl:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(255, 26, 107, 0.35);
}

.topbar .btn-dl { display: none; }

.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 999;
  background: rgba(3, 3, 5, 0.96);
  backdrop-filter: blur(12px);
  padding: 20px 18px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.mobile-menu.is-open { display: flex; }

.mobile-menu a {
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-mid);
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--text);
  background: var(--bg-panel);
  border-color: var(--line);
}

/* ===== Fixed download bar ===== */
.dl-fixed {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 998;
  background: rgba(8, 8, 14, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-bright);
  padding: 8px 0;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s, opacity 0.3s;
}

.dl-fixed.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dl-fixed.is-hidden { display: none; }

.dl-fixed-inner {
  display: block;
  max-width: 320px;
  margin: 0 auto;
}

.dl-fixed-label {
  display: block;
  text-align: center;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink-soft);
  margin-bottom: 6px;
}

/* 下载图标：横排四列，超出换行，移动端一致 */
#ads,
.ads-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  background: transparent;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

#ads > div,
.ads-row > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 25%;
  width: 25%;
  max-width: 25%;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
}

#ads img,
.ads-row img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  transition: transform 0.18s, box-shadow 0.18s;
  display: block;
}

#ads a,
.ads-row a {
  display: inline-block;
  border-radius: 16px;
}

#ads img:hover,
.ads-row img:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(255, 26, 107, 0.2);
}

#ads .caption,
.ads-row .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* ===== Ad zone ===== */
.ad-zone {
  padding: 14px 0 10px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}

.ad-zone.is-hidden { display: none; }

.ad-zone-head {
  text-align: center;
  margin-bottom: 10px;
}

.ad-zone-head h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.ad-zone-head p {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 36px 0 48px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0, 200, 255, 0.08), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 30%, rgba(255, 26, 107, 0.1), transparent 55%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 5px 12px;
  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 4px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero h1 em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 15px;
  color: var(--text-mid);
  max-width: 540px;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--cyan);
  background: rgba(0, 200, 255, 0.06);
}

.hero-visual {
  position: relative;
  max-width: 280px;
  margin: 0 auto;
}

.hero-visual img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-bright);
  box-shadow: var(--shadow);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: var(--grad-brand);
  z-index: -1;
  opacity: 0.35;
  filter: blur(20px);
}

/* ===== Section common ===== */
.section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-soft);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(20px, 4.5vw, 28px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ===== 3:7 split ===== */
.split-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 36px;
}

.split-row:last-child { margin-bottom: 0; }

.split-img {
  position: relative;
}

.split-img img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.split-img figcaption {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
  font-family: var(--mono);
}

.split-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.split-body p {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: 12px;
}

.split-body p:last-child { margin-bottom: 0; }

.split-body ul {
  list-style: none;
  margin: 12px 0;
}

.split-body li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.split-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-brand);
}

.inline-link {
  color: var(--cyan);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 200, 255, 0.3);
}

/* ===== Feature grid ===== */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feat-card {
  padding: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s;
}

.feat-card:hover { border-color: var(--line-bright); }

.feat-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feat-card h4 span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cyan);
  background: rgba(0, 200, 255, 0.1);
  border-radius: 6px;
  flex-shrink: 0;
}

.feat-card p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}

.faq-q::after {
  content: "+";
  font-size: 18px;
  color: var(--pink);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-item.is-open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  display: none;
  padding: 0 18px 16px;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.75;
}

.faq-item.is-open .faq-a { display: block; }

/* ===== CTA band ===== */
.cta-band {
  padding: 40px 0;
  text-align: center;
  background: var(--grad-soft);
  border-top: 1px solid var(--line-bright);
  border-bottom: 1px solid var(--line-bright);
}

.cta-band h2 {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  margin-bottom: 10px;
}

.cta-band p {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.site-foot {
  padding: 36px 0 28px;
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}

.foot-brand img { height: 26px; margin-bottom: 10px; }

.foot-brand p {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 280px;
}

.foot-links h5 {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.foot-links ul { list-style: none; }

.foot-links li { margin-bottom: 6px; }

.foot-links a {
  font-size: 13px;
  color: var(--text-mid);
}

.foot-links a:hover { color: var(--cyan); }

.foot-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.foot-partners a {
  font-size: 13px;
  color: var(--text-mid);
}

.foot-copy {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

/* ===== Sub pages ===== */
.page-hero {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 14px;
  color: var(--text-mid);
}

.prose {
  padding: 32px 0 48px;
  max-width: 760px;
}

.prose h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text);
}

.prose h2:first-child { margin-top: 0; }

.prose p,
.prose li {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 12px;
}

.prose ul,
.prose ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.prose a { color: var(--cyan); }

/* ===== Error pages ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 18px;
}

.error-code {
  font-size: clamp(64px, 18vw, 120px);
  font-weight: 900;
  line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.error-page h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.error-page p {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 24px;
  max-width: 360px;
}

/* ===== SEO 纯文案模块 ===== */
.seo-block {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.seo-block-inner {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.seo-block h2 {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.35;
}

.seo-block h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--text);
}

.seo-block p {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 12px;
  line-height: 1.85;
}

.seo-block ul {
  list-style: none;
  margin: 12px 0 16px;
}

.seo-block li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 8px;
  line-height: 1.75;
}

.seo-block li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--pink-soft);
}

/* ===== 配图展示网格 ===== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 24px 0 32px;
}

.showcase-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s;
}

.showcase-card:hover { border-color: var(--line-bright); }

.showcase-card img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  object-position: top;
}

.showcase-card-body {
  padding: 12px 14px 14px;
}

.showcase-card-body h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.showcase-card-body p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .topnav { display: flex; }
  .menu-btn { display: none; }

  .topbar .btn-dl { display: inline-flex; }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }

  .hero-visual { margin: 0; }

  .split-row {
    grid-template-columns: 3fr 7fr;
    gap: 28px;
  }

  .split-row.reverse { direction: rtl; }
  .split-row.reverse > * { direction: ltr; }

  .feat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .foot-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .showcase-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
}
