:root {
  --primary: #007bff;
  --primary-gradient: linear-gradient(45deg, #007bff, #00c6ff);
  --secondary: #6c757d;
  --light: #f8f9fa;
  --dark: #343a40;
  --border-radius: 15px;
  --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  --page-scale: 0.9; /* 页面整体缩放比例，可微调（0.8-0.95之间） */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  line-height: 1.6;
  padding: 10px; /* 减少页面内边距，配合缩放 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 页面外层容器：整体缩放，解决截图显示不全问题 */
.page-wrapper {
  transform: scale(var(--page-scale));
  transform-origin: top center; /* 缩放原点：顶部居中，避免偏移 */
  width: 100%;
  max-width: 1100px; /* 缩放前基础宽度，确保缩放后适配屏幕 */
}

.container {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  background: #fff;
  padding: 25px; /* 缩小卡片内边距，配合整体缩放 */
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 25px; /* 缩小卡片间距 */
  width: 100%;
}

.btn {
  display: inline-block;
  padding: 12px 28px; /* 缩小按钮尺寸 */
  font-size: 16px; /* 缩小按钮文字 */
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(0,123,255,0.4);
  transition: transform 0.2s, opacity 0.3s;
  border: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.btn:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

.btn i {
  margin-right: 8px;
}

.btn-android {
  background: linear-gradient(45deg, #3DDC84, #34A853);
  box-shadow: 0 4px 12px rgba(61,220,132,0.4);
}

.btn-ios {
  background: linear-gradient(45deg, #000000, #434343);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.download-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.logo {
  font-size: 24px; /* 缩小logo文字 */
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px; /* 缩小logo间距 */
}

.logo img {
  height: 50px; /* 缩小logo图片 */
  margin-right: 12px;
  border-radius: 10px;
}

.download-section {
  text-align: center;
  margin-bottom: 25px; /* 缩小下载区间距 */
}

.app-title {
  font-size: 28px; /* 缩小标题文字 */
  margin-bottom: 16px;
  color: var(--primary);
}

.app-description {
  font-size: 18px; /* 缩小描述文字 */
  color: var(--secondary);
  margin-bottom: 16px;
  line-height: 1.6;
  text-align: center;
  max-width: 500px; /* 缩小描述区宽度 */
  margin-left: auto;
  margin-right: auto;
}

.tutorial-section h3 {
  text-align: center;
  margin-bottom: 25px; /* 缩小教程区标题间距 */
  color: var(--primary);
  font-size: 24px; /* 缩小教程标题文字 */
}

/* 图片展示核心：确保截图完整显示，配合页面缩放 */
.app-preview {
  display: flex;
  overflow-x: auto;
  gap: 15px; /* 缩小图片间距 */
  padding: 15px 5px; /* 缩小预览区内边距 */
  margin: 15px 0; /* 缩小预览区间距 */
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-preview::-webkit-scrollbar {
  display: none;
}

.preview-screenshot {
  /* 缩小图片尺寸，确保截图完整 */
  width: 180px; /* 比之前小20% */
  height: 320px; /* 同步缩小，保持比例 */
  border-radius: 20px;
  flex-shrink: 0;
  background-color: #f5f5f5; /* 空白背景，避免截图不全显突兀 */
  background-size: contain; /* 关键：完整显示截图，不裁剪 */
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 5px 12px rgba(0,0,0,0.1); /* 缩小阴影，配合尺寸 */
  transition: all 0.4s ease;
  cursor: pointer;
}

.preview-screenshot:hover {
  transform: scale(1.05); /* 缩小hover放大比例，避免过大 */
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.preview-container {
  position: relative;
  margin: 15px 0; /* 缩小容器间距 */
  width: 100%;
}

/* 缩小导航按钮，配合页面整体比例 */
.preview-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px; /* 比之前小15% */
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary);
  border: none;
  box-shadow: 0 3px 10px rgba(0,123,255,0.3); /* 缩小阴影 */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  font-size: 16px; /* 缩小图标文字 */
  color: #fff;
}

.preview-nav:hover {
  background-color: #0056b3;
  transform: translateY(-50%) scale(1.08); /* 缩小hover放大比例 */
  box-shadow: 0 5px 15px rgba(0,123,255,0.4);
}

.preview-nav.prev {
  left: 8px; /* 微调位置，配合缩小尺寸 */
}

.preview-nav.next {
  right: 8px;
}

.preview-nav i {
  font-size: 16px;
}

/* 移动端适配：进一步微调缩放，确保截图完整 */
@media (max-width: 768px) {
  :root {
    --page-scale: 0.85; /* 移动端再缩小一点，适配小屏幕 */
  }
  
  .btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 260px; /* 缩小按钮最大宽度 */
    margin-bottom: 8px; /* 缩小按钮间距 */
  }
  
  .preview-screenshot {
    width: 70%; /* 移动端图片占比，确保完整显示 */
    max-width: 220px;
    height: 280px; /* 同步缩小 */
  }
  
  .preview-nav {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .preview-nav.prev {
    left: 5px;
  }
  
  .preview-nav.next {
    right: 5px;
  }
}

@media (max-width: 480px) {
  :root {
    --page-scale: 0.8; /* 手机端再缩小，避免溢出 */
  }
  
  .preview-screenshot {
    width: 75%;
    height: 240px;
  }
  
  .preview-nav {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

.contact-info {
  background: var(--light);
  padding: 20px; /* 缩小联系区内边距 */
  border-radius: var(--border-radius);
  margin-top: 15px; /* 缩小联系区间距 */
}

.contact-info h3 {
  margin-bottom: 16px; /* 缩小联系区标题间距 */
  color: var(--primary);
  text-align: center;
  font-size: 18px; /* 缩小联系区标题文字 */
}

.contact-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px; /* 缩小联系项间距 */
  padding-bottom: 8px; /* 缩小联系项下划线间距 */
  border-bottom: 1px solid #e9ecef;
  font-size: 15px; /* 缩小联系项文字 */
}

.contact-item strong {
  color: var(--dark);
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh; /* 缩小模态框图片最大高度 */
  border-radius: 12px; /* 缩小圆角 */
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  object-fit: contain; /* 确保模态框内截图也完整 */
}

.lightbox-close {
  position: absolute;
  top: -35px; /* 微调关闭按钮位置 */
  right: 0;
  color: white;
  font-size: 26px; /* 缩小关闭按钮 */
  cursor: pointer;
  background: none;
  border: none;
  width: 35px; /* 缩小关闭按钮尺寸 */
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 26px; /* 缩小模态框导航按钮 */
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 45px; /* 缩小尺寸 */
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
  left: 15px; /* 微调位置 */
}

.lightbox-next {
  right: 15px;
}

.lightbox-counter {
  position: absolute;
  bottom: 15px; /* 微调计数器位置 */
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px; /* 缩小计数器文字 */
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px; /* 缩小内边距 */
  border-radius: 18px;
}