/* ============================================================
   SZGame Landing Page — style.css
   舒适现代风格 · 留白驱动 · 品牌色 #1677FF
   零外部依赖 · 纯静态
   ============================================================ */

/* ---------- 3.1 CSS 变量体系 ---------- */
:root {
  /* 品牌色 */
  --brand-primary:  #1677FF;
  --brand-hover:    #4096FF;
  --brand-active:   #0958D9;
  --brand-soft:     #E6F4FF;

  /* 中性色 */
  --bg:             #FFFFFF;
  --bg-alt:         #FAFAFA;
  --surface:        #FFFFFF;
  --text-primary:   #1F2937;
  --text-secondary: #6B7280;
  --text-tertiary:  #9CA3AF;
  --border:         #E5E7EB;
  --divider:        #F3F4F6;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* 阴影 */
  --shadow-card:      0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-hover:     0 4px 16px rgba(22, 119, 255, 0.08);
  --shadow-btn:       0 4px 16px rgba(22, 119, 255, 0.3);

  /* 字体栈 */
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ---------- 3.2 基础布局 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-stack);
  color: var(--text-primary);
  background: var(--bg);
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover {
  color: var(--brand-hover);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 区块通用间距 */
section {
  padding: 80px 0;
}

/* 区块标题 */
.section-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  text-align: center;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 48px 0;
  text-align: center;
}

/* ---------- 3.3 固定导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.navbar-brand .logo-icon {
  width: 28px;
  height: 28px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.navbar-links a:hover {
  color: var(--brand-primary);
}

/* 导航栏内的蓝色按钮必须白字加粗，覆盖 a 默认灰色 */
.navbar-links .btn-primary {
  color: #FFFFFF;
  font-weight: 700;
}

/* ---------- 3.7 CTA 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  transition: background 200ms ease, box-shadow 200ms ease,
              transform 200ms ease, border-color 200ms ease,
              color 200ms ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--brand-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
  transform: translateY(-1px);
}

.btn-primary:active {
  background: var(--brand-active);
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-soft);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

/* ---------- Hero 区 ---------- */
.hero {
  padding: 140px 0 100px 0;
  background: var(--bg);
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 64px;
  align-items: center;
}

.hero-text {
  flex: 1;
  text-align: left;
}

.hero-visual {
  flex: 1.1;
  display: flex;
  justify-content: center;
}

.hero-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(22, 119, 255, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: rotate(-2deg);
  transition: transform 400ms ease, box-shadow 400ms ease;
  max-width: 480px;
}

.hero-preview:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 16px 48px rgba(22, 119, 255, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hero-preview img {
  width: 100%;
  display: block;
}

.hero-slogan {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-slogan .accent {
  color: var(--brand-primary);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin: 0 0 40px 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
}

/* ---------- 3.4 功能特性卡片网格 ---------- */
.features {
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  background: var(--surface);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(22, 119, 255, 0.2);
}

.feature-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 16px;
}

.feature-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ---------- 截图轮播 ---------- */
.screenshots {
  background: var(--bg);
}

.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 0;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 防止 collapse——给 carousel 一个明确高度 */
.carousel::before {
  content: '';
  display: block;
  padding-top: 65%; /* 1800:1170 ≈ 16:10.4，与截图实际比例匹配 */
}

/* 左右箭头 */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 200ms ease, transform 200ms ease;
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

.carousel-prev:hover,
.carousel-next:hover {
  background: #FFFFFF;
  transform: translateY(-50%) scale(1.05);
}

/* 底部指示点 */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 200ms ease, width 200ms ease;
}

.carousel-dot.active {
  background: #FFFFFF;
  width: 24px;
  border-radius: 4px;
}

/* ---------- 技术栈 ---------- */
.tech-stack {
  background: var(--bg-alt);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.tech-tag {
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: border-color 200ms ease, color 200ms ease;
}

.tech-tag:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* ---------- 下载区 ---------- */
.download {
  background: var(--bg);
  text-align: center;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.download-card {
  padding: 48px;
  background: var(--brand-soft);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-channel-title {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 8px;
}

.download-version {
  font-size: 14px;
  color: var(--brand-primary);
  font-weight: 500;
  margin-bottom: 16px;
}

.download-btn {
  width: 100%;
  font-size: 18px;
  padding: 16px 32px;
}

.download-card-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 16px;
}

.store-badge-link {
  display: inline-block;
  transition: transform 200ms ease;
}

.store-badge-link:hover {
  transform: translateY(-2px);
}

.store-badge-img {
  max-width: 200px;
  height: auto;
  display: block;
}

.download-note {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 24px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
}

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

/* ---------- 3.5 滚动渐入动效 ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero 区不等待渐入，直接显示 */
.hero [data-animate] {
  opacity: 1;
  transform: none;
}

/* ---------- 3.6 Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lightbox-fade-in 200ms ease;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: var(--radius-lg);
  cursor: default;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- 3.8 响应式 ---------- */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    gap: 40px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  section {
    padding: 56px 0;
  }

  .hero {
    padding: 120px 0 80px 0;
  }

  .hero-slogan {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
  }

  .screenshot-thumbs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .navbar-links {
    gap: 12px;
  }

  .navbar-links a:not(.btn) {
    display: none;
  }

  .navbar-links .btn-sm {
    padding: 6px 14px;
    font-size: 13px;
  }

  .section-title {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .download-card {
    padding: 32px 24px;
  }

  .store-badge-img {
    max-width: 160px;
  }
}
