/* ============ 基础变量 ============ */
:root {
  --red: #f2463c;
  --red-dark: #dc3a30;
  --ink: #1f2937;
  --muted: #8996a5;
  --card-border: #d6eaf9;
  --dash-border: #a8c8e3;
  --shadow: 0 12px 34px rgba(36, 105, 165, .12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #eaf6ff;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ============ 页面背景 ============ */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 24px 16px 32px;
  background-color: #eaf6ff;
  background-image: url('../assets/Mask group@2x.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* ============ 主内容 ============ */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 358px;
  margin: 0 auto;
}

/* 标题区 */
.hero__copy {
  padding: 0;
}

.hero__title-img {
  width: 100%;
  height: auto;
}

/* 手机模型区 */
.hero__visual {
  width: fit-content;
  margin: 0 auto;
}

.mockup-img {
  width: 300px;
  max-width: 100%;
  height: auto;
}

/* ============ 下载卡片 ============ */
.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: calc(100% - 16px);
  margin: 0 auto;
  padding: 26px 20px 28px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
}

.app-icon--sm { width: 48px; height: 48px; border-radius: 10px; }

.btn {
  border: none;
  cursor: pointer;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.98); }

.btn--primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #fa5348, var(--red));
  box-shadow: 0 6px 14px rgba(242, 70, 60, .28);
}
.btn--primary:hover { background: linear-gradient(180deg, #f24a40, var(--red-dark)); }

.btn--sm {
  padding: 7px 16px;
  font-size: 12px;
  background: linear-gradient(180deg, #fa5348, var(--red));
  flex: none;
}
.btn--sm:hover { background: linear-gradient(180deg, #f24a40, var(--red-dark)); }

/* ============ 下载弹窗 ============ */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 32, 50, .55);
  animation: fade-in .2s ease;
}

.modal__panel {
  position: relative;
  width: calc(100% - 32px);
  max-width: 340px;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 18px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
  animation: slide-up .25s ease;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 18px;
}
.modal__header h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.modal__close {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #4b5563;
  cursor: pointer;
  padding: 4px 6px;
}

.modal__section {
  margin: 0 0 10px;
  font-size: 12px;
  color: #6b7280;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}

.download-item__info { flex: 1; min-width: 0; }
.download-item__info h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.download-item__sub { margin: 0 0 4px; font-size: 11px; color: #6b7280; }
.download-item__sub span { color: #b6bec8; }
.download-item__meta { margin: 0; font-size: 10px; color: #9aa4af; }

.apk-icon { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: contain; }

.modal__divider { height: 1px; background: #eef1f4; margin: 16px 0; }

/* ============ PC 适配 ============ */
@media (min-width: 900px) {
  .page {
    padding: 60px 40px;
    display: flex;
    align-items: center;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 1fr);
    grid-template-areas:
      "copy visual"
      "cta  visual";
    align-items: center;
    column-gap: 60px;
    row-gap: 26px;
    max-width: 1000px;
    width: 100%;
  }

  .hero__copy { grid-area: copy; }
  .hero__cta { grid-area: cta; }
  .hero__visual { grid-area: visual; }

  .mockup-img { max-width: 340px; }

  .download-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    max-width: 420px;
    padding: 18px 20px;
  }
  .btn--primary { width: auto; flex: 1; letter-spacing: 2px; }

}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
