/* 屏卫官网 - 科技感 + 温暖感 - 可访问、SEO 友好 */
:root {
  /* 温暖科技风：深色基底 + 青蓝主色 + 暖色点缀 */
  --color-bg: #0f1419;
  --color-bg-soft: #1a2332;
  --color-surface: rgba(26, 35, 50, 0.85);
  --color-surface-border: rgba(99, 179, 237, 0.15);
  --color-text: #e8ecf1;
  --color-text-muted: #94a3b8;
  --color-primary: #38bdf8;
  --color-primary-soft: #7dd3fc;
  --color-accent-warm: #fb923c;
  --color-accent-glow: rgba(56, 189, 248, 0.35);
  --color-cta-from: #38bdf8;
  --color-cta-to: #0ea5e9;
  --color-cta-glow: rgba(56, 189, 248, 0.4);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --max-width: 720px;
  --space-unit: 8px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(56, 189, 248, 0.12);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  /* 温暖渐变背景：深蓝 + 轻微紫/暖调 */
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(251, 146, 60, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(56, 189, 248, 0.08), transparent 45%);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--space-unit) * 4) calc(var(--space-unit) * 2);
}

header[role="banner"] {
  background: rgba(15, 20, 25, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-surface-border);
  padding: calc(var(--space-unit) * 2) calc(var(--space-unit) * 2);
}

header .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-unit);
}

header .logo {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

header .logo:hover {
  color: var(--color-primary);
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space-unit) * 2);
}

header nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

header nav a:hover {
  color: var(--color-primary);
}

header nav .lang-switch {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

header nav .lang-switch a {
  color: inherit;
}

header nav .lang-switch a.active,
header nav .lang-switch a[aria-current="page"] {
  color: var(--color-primary);
}

/* 首页主标题区 */
.hero {
  margin-bottom: calc(var(--space-unit) * 4);
}

.hero .hero-title-fig {
  margin: 0 0 calc(var(--space-unit) * 2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero .hero-title-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  background: var(--color-bg-soft);
}

.hero .tagline {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-unit);
  font-weight: 500;
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 calc(var(--space-unit) * 2);
  line-height: 1.35;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: calc(var(--space-unit) * 3) 0 var(--space-unit);
  color: var(--color-text);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: calc(var(--space-unit) * 2) 0 var(--space-unit);
  color: var(--color-text);
}

p {
  margin: 0 0 var(--space-unit);
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-soft);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--color-cta-from) 0%, var(--color-cta-to) 100%);
  color: #0f172a;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  margin-top: calc(var(--space-unit) * 2);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--color-cta-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--color-cta-glow);
  text-decoration: none;
  color: #0f172a;
}

.card {
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-surface-border);
  border-radius: var(--radius);
  padding: calc(var(--space-unit) * 2.5);
  margin-bottom: calc(var(--space-unit) * 2);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-card-hover);
}

.card h3 {
  margin-top: 0;
}

ul {
  margin: 0 0 var(--space-unit);
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

ul li {
  margin-bottom: 4px;
}

/* 界面截图区块 */
.screenshots {
  margin: calc(var(--space-unit) * 4) 0;
}

.screenshots h2 {
  margin-bottom: calc(var(--space-unit) * 2);
}

.screenshot-group {
  margin-bottom: calc(var(--space-unit) * 3);
}

.screenshot-group h3 {
  margin-bottom: var(--space-unit);
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.screenshot-pair {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space-unit) * 3);
  justify-content: center;
  align-items: flex-end;
}

.screenshot-fig {
  margin: 0;
  text-align: center;
}

.screenshot-fig img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-surface-border);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.screenshot-fig img:hover {
  box-shadow: var(--shadow-card-hover);
  transform: scale(1.02);
}

.screenshot-fig figcaption {
  margin-top: var(--space-unit);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* iPhone 竖屏略窄，统一最大高度便于对齐 */
.screenshot-pair .screenshot-fig:first-child img {
  max-height: 420px;
  object-fit: contain;
}

.screenshot-pair .screenshot-fig:last-child img {
  max-height: 380px;
  object-fit: contain;
}

/* 点击放大 lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space-unit) * 2);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.lightbox-inner {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-unit);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--color-surface-border);
  pointer-events: none;
}

.lightbox-caption {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.lightbox-close {
  position: fixed;
  top: calc(var(--space-unit) * 2);
  right: calc(var(--space-unit) * 2);
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover {
  background: var(--color-primary);
  color: #0f172a;
}

footer[role="contentinfo"] {
  margin-top: calc(var(--space-unit) * 4);
  padding-top: calc(var(--space-unit) * 2);
  border-top: 1px solid var(--color-surface-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

footer .footer-company,
footer .footer-contact,
footer .footer-address,
footer .footer-beian {
  margin: 0 0 var(--space-unit);
}

footer .footer-links {
  margin: calc(var(--space-unit) * 2) 0 0;
}

footer .footer-links a {
  margin-right: calc(var(--space-unit) * 2);
}

footer a {
  color: var(--color-text-muted);
}

footer a:hover {
  color: var(--color-primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===============================
   官网美化：导航 + 动画 + 返回顶部
   =============================== */

/* 粘性导航 */
header[role="banner"].is-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.92);
}

/* 汉堡菜单按钮 */
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: 1px solid var(--color-surface-border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transition: border-color 0.2s ease;
}
.nav-toggle:hover { border-color: var(--color-primary); }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 滚动入场动画 */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-surface-border);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--color-primary);
  color: #0f172a;
  border-color: var(--color-primary);
}

/* 图片加载占位效果 */
img[loading="lazy"] {
  background: var(--color-bg-soft);
}
img[loading="lazy"]:not([src*="data:"]) {
  transition: opacity 0.4s ease;
}
img[loading="lazy"]:not([src*="data:"]):not([src^="images/"]) {
  opacity: 0;
}
img[loading="lazy"]:not([src*="data:"]):not([src^="images/"])[src] {
  opacity: 1;
}

/* 卡片 hover 上浮增强 */
.card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover {
  transform: translateY(-2px);
}

/* CTA 发光呼吸动画 */
.cta {
  animation: ctaGlow 3s ease-in-out infinite;
}
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 4px 20px var(--color-cta-glow); }
  50% { box-shadow: 0 4px 32px var(--color-cta-glow), 0 0 60px rgba(56, 189, 248, 0.15); }
}

/* 聚焦样式增强 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 截图组入场错位 */
.screenshot-group {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* 移动端导航 */
@media (max-width: 640px) {
  header .wrap {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .nav-toggle {
    display: flex;
  }
  header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0 4px;
    border-top: 1px solid var(--color-surface-border);
    margin-top: 8px;
  }
  header nav.is-open {
    display: flex;
  }
  header nav .lang-switch {
    margin-left: 0;
  }
}
  header .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero .tagline {
    font-size: 0.8125rem;
  }
  h1 {
    font-size: 1.5rem;
  }
  .screenshot-pair {
    flex-direction: column;
    align-items: center;
  }
  .screenshot-pair .screenshot-fig img {
    max-height: none;
  }
}
