/* ==========================================================================
   一格 / Gridea 官方网站 - APK 下载页面样式表 (Download CSS)
   ========================================================================== */

.download-page {
  position: relative;
  background-color: var(--bg-canvas);
  min-height: calc(100vh - 120px);
  border-bottom: 1px solid var(--border-grid);
}

.download-page > .container {
  padding-top: calc(68px + 36px);
  padding-bottom: 80px;
  max-width: 1040px;
}

/* 主下载卡片 */
.download-hero-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.download-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #111827 0%, #4B5563 50%, #111827 100%);
}

.download-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

/* 左侧详情区 */
.download-info-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.download-app-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.download-app-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  background: #FFFFFF;
}

.download-app-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.download-app-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.download-app-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.download-version-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.download-app-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 优雅的元信息行 (无厚重黑块) */
.download-app-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.meta-divider {
  color: var(--border-strong);
  font-size: 0.75rem;
}

/* 行动号召按钮组 */
.download-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.btn-download-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--brand-black);
  color: #FFFFFF !important;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  border: 1px solid var(--brand-black);
}

.btn-download-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.btn-download-primary svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn-download-primary:hover svg {
  transform: translateY(2px);
}

.download-cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-copy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-copy-link:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.btn-copy-link.copied {
  color: var(--brand-green);
  border-color: var(--brand-green);
  background: rgba(16, 185, 129, 0.08);
}

/* 微信环境警告条 */
.wechat-browser-tip {
  display: none;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #92400E;
  font-size: 0.88rem;
  line-height: 1.5;
  align-items: flex-start;
  gap: 10px;
}

.wechat-browser-tip.active {
  display: flex;
}

.wechat-browser-tip svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* 其他商店渠道 */
.download-other-stores {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.other-stores-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.other-store-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.other-store-link:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

/* 右侧二维码卡片 */
.download-qr-col {
  display: flex;
  justify-content: center;
}

.download-qr-card {
  width: 100%;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
}

.qr-code-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-center-brand {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-center-brand img {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  display: block;
}

.download-qr-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.download-qr-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: -6px;
}

.download-qr-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-accent);
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* ================= 安装指引与常见问题 (合并区块) ================= */
.install-faq-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.step-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: all var(--transition-fast);
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.step-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-num-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
}

.step-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* FAQ 列表 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-grid);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-q {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-q::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--brand-black);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 28px;
}

/* ================= 响应式调整 ================= */
@media (max-width: 860px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

  .download-qr-col {
    order: 2;
  }

  .download-info-col {
    order: 1;
  }

  .install-steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .download-qr-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .download-app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .download-app-title {
    font-size: 1.6rem;
  }

  .btn-download-primary {
    width: 100%;
    font-size: 0.98rem;
  }

  .download-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy-link {
    justify-content: center;
  }
}
