/* =============================================
   2345看图王下载页 - 样式表
   配色方案: 靛紫/翠绿双色
   ============================================= */

/* ---------- CSS变量 ---------- */
:root {
  --c-primary: #6366f1;
  --c-primary-light: #818cf8;
  --c-primary-dark: #4f46e5;
  --c-download: #22c55e;
  --c-download-hover: #16a34a;
  --c-title: #1e293b;
  --c-text: #475569;
  --c-text-light: #94a3b8;
  --c-bg-light: #f8fafc;
  --c-bg-alt: #f1f5f9;
  --c-dark: #1e1b4b;
  --c-dark-deep: #0f172a;
  --c-accent: #f59e0b;
  --c-white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.15);
  --shadow-card: 0 2px 12px rgba(99,102,241,.08);
  --radius: 12px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ---------- 重置与基础 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: 60px;
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: 0 1px 12px rgba(0,0,0,.08);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--c-title);
}
.header-logo img { height: 32px; width: auto; }
.header-nav { display: flex; gap: 8px; }
.nav-link {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--c-text);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--c-primary); background: rgba(99,102,241,.06); }
.nav-link.active { color: var(--c-primary); font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 40%, #4338ca 100%);
  padding-top: 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}
.hero-content { flex: 1; }
.version-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  border: 1px solid rgba(245,158,11,.3);
  margin-bottom: 20px;
}
.hero-title {
  font-size: 52px;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.hero-subtitle {
  font-size: 20px;
  color: rgba(255,255,255,.7);
  margin-bottom: 36px;
}
.hero-download { margin-bottom: 20px; }

/* 下载按钮 - 主 */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px;
  background: var(--c-download);
  color: var(--c-white);
  font-size: 17px;
  font-weight: 600;
  border-radius: 10px;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(34,197,94,.35);
}
.btn-download:hover {
  background: var(--c-download-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(34,197,94,.45);
}
.btn-download:active { transform: translateY(0); }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.45);
  font-size: 13px;
}
.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}

.hero-image {
  flex: 0 0 480px;
  position: relative;
}
.hero-image img {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: transform .6s ease;
}
.hero-image:hover img {
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.4);
  animation: bounceDown 2s infinite;
  transition: opacity var(--transition);
  cursor: pointer;
  z-index: 2;
}
@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ---------- 通用section样式 ---------- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px;
}
.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--c-title);
  text-align: center;
  margin-bottom: 12px;
}
.section-title.text-left { text-align: left; }
.section-desc {
  text-align: center;
  color: var(--c-text-light);
  font-size: 16px;
  margin-bottom: 48px;
}

/* ---------- 特性区 ---------- */
.features { background: var(--c-bg-light); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
  border: 1px solid rgba(0,0,0,.04);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feature-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(99,102,241,.06);
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-title);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--c-text-light);
  line-height: 1.6;
}

/* ---------- 色彩对比区 ---------- */
.color-compare { background: var(--c-bg-alt); }
.compare-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}
.compare-images { flex: 1; }
.compare-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: ew-resize;
  aspect-ratio: 16/10;
}
.compare-img {
  position: absolute;
  inset: 0;
}
.compare-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-after {
  clip-path: inset(0 0 0 50%);
  z-index: 2;
}
.compare-label {
  position: absolute;
  bottom: 12px;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  z-index: 3;
}
.label-before {
  left: 12px;
  background: rgba(0,0,0,.55);
  color: var(--c-white);
}
.label-after {
  right: 12px;
  background: rgba(99,102,241,.85);
  color: var(--c-white);
}

.compare-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  z-index: 5;
  cursor: ew-resize;
}
.slider-line {
  position: absolute;
  inset: 0;
  background: var(--c-white);
  box-shadow: 0 0 8px rgba(0,0,0,.3);
}
.slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.compare-text {
  flex: 0 0 360px;
}
.compare-text p {
  color: var(--c-text);
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 15px;
}

/* 下载按钮 - 小号 */
.btn-download-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: var(--c-download);
  color: var(--c-white);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
}
.btn-download-sm:hover {
  background: var(--c-download-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34,197,94,.3);
}

/* ---------- 速度展示区 ---------- */
.speed-section {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../images/speed-bg.png') center/cover no-repeat;
}
.speed-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,27,75,.82) 0%, rgba(67,56,202,.7) 100%);
}
.speed-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--c-white);
}
.speed-content h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.speed-content p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  margin-bottom: 32px;
}

/* 下载按钮 - 亮色/透明背景 */
.btn-download-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--c-white);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition);
}
.btn-download-light:hover {
  background: var(--c-download);
  border-color: var(--c-download);
  box-shadow: 0 4px 20px rgba(34,197,94,.35);
}

/* ---------- 图片编辑功能区 ---------- */
.edit-section { background: var(--c-white); }
.edit-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}
.edit-preview { flex: 1; }
.edit-screen {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #f0f0f0;
}
.edit-preview-img {
  width: 100%;
  transition: opacity .2s ease;
}
.edit-info { flex: 0 0 380px; }
.edit-desc {
  color: var(--c-text);
  margin: 12px 0 24px;
  font-size: 15px;
  line-height: 1.7;
}
.edit-desc strong {
  color: var(--c-primary);
}
.edit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.edit-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--c-text);
  background: var(--c-bg-alt);
  transition: all var(--transition);
  border: 1px solid transparent;
}
.edit-tab:hover {
  color: var(--c-primary);
  border-color: rgba(99,102,241,.2);
}
.edit-tab.active {
  background: rgba(99,102,241,.08);
  color: var(--c-primary);
  font-weight: 500;
  border-color: rgba(99,102,241,.2);
}
.edit-tab svg { flex-shrink: 0; }

/* ---------- 格式支持区 ---------- */
.formats-section {
  position: relative;
  padding: 100px 0;
  background: var(--c-dark);
  overflow: hidden;
}
.formats-bg {
  position: absolute;
  inset: 0;
  opacity: .06;
  background-size: cover;
  background-position: center;
}
.formats-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--c-white);
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px;
}
.formats-number {
  font-size: 96px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.formats-number span {
  font-size: 64px;
}
.formats-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
}
.formats-sub {
  color: rgba(255,255,255,.55);
  font-size: 15px;
  margin-bottom: 36px;
}
.format-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.fmt-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.08);
  transition: all var(--transition);
}
.fmt-tag:hover {
  background: rgba(255,255,255,.14);
  color: var(--c-white);
}
.fmt-tag.fmt-hot {
  background: rgba(245,158,11,.12);
  color: var(--c-accent);
  border-color: rgba(245,158,11,.2);
}
.fmt-tag.fmt-pro {
  background: rgba(99,102,241,.12);
  color: var(--c-primary-light);
  border-color: rgba(99,102,241,.2);
}

/* ---------- PDF区 ---------- */
.pdf-section { background: var(--c-bg-light); }
.pdf-layout {
  display: flex;
  align-items: center;
  gap: 60px;
}
.pdf-text {
  flex: 1;
}
.pdf-text p {
  color: var(--c-text);
  margin: 12px 0 24px;
  font-size: 15px;
  line-height: 1.8;
}
.pdf-image {
  flex: 0 0 400px;
}
.pdf-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}


/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-white);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

/* ---------- 下载提示Toast ---------- */
.download-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 28px;
  background: var(--c-dark);
  color: var(--c-white);
  font-size: 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all .3s ease;
  z-index: 9999;
  pointer-events: none;
}
.download-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 滚动动画 ---------- */
.anim-target {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.anim-target.anim-visible {
  opacity: 1;
  transform: translateY(0);
}
/* 卡片依次入场 */
.feature-card.anim-target:nth-child(1) { transition-delay: 0s; }
.feature-card.anim-target:nth-child(2) { transition-delay: .1s; }
.feature-card.anim-target:nth-child(3) { transition-delay: .2s; }
.feature-card.anim-target:nth-child(4) { transition-delay: .3s; }

/* ---------- dl-icon ---------- */
.dl-icon { flex-shrink: 0; }

/* ---------- 响应式适配 ---------- */
@media (max-width: 1024px) {
  .hero-inner { flex-direction: column; text-align: center; gap: 40px; }
  .hero-image { flex: none; max-width: 480px; }
  .hero-image img { transform: none; }
  .hero-image:hover img { transform: none; }
  .hero-meta { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-layout { flex-direction: column; }
  .compare-text { flex: none; text-align: center; }
  .compare-text .section-title { text-align: center; }
  .edit-layout { flex-direction: column; }
  .edit-info { flex: none; }
  .edit-info .section-title { text-align: center; }
  .edit-desc { text-align: center; }
  .edit-tabs { justify-content: center; }
  .pdf-layout { flex-direction: column; text-align: center; }
  .pdf-text .section-title { text-align: center; }
  .pdf-image { flex: none; max-width: 400px; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .btn-download { padding: 12px 28px; font-size: 15px; }
  .section-inner { padding: 56px 20px; }
  .section-title { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .speed-section { height: 320px; }
  .speed-content h2 { font-size: 26px; }
  .formats-number { font-size: 64px; }
  .formats-number span { font-size: 44px; }
  .header-nav { gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
}
