/* ============================================================
   放心借 APP 下载页样式
   无需构建工具，直接由 Nginx / 任意静态服务器托管
   ============================================================ */

:root {
  color-scheme: light;
  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --green: #14b8a6;
  --green-deep: #0d9488;
  --ink: #132238;
  --muted: #5f7088;
  --line: #e8eef6;
  --surface: #ffffff;
  --surface-soft: #f6f9fd;
  --shadow-lg: 0 30px 80px rgba(23, 43, 77, 0.16);
  --shadow-md: 0 12px 30px rgba(23, 43, 77, 0.1);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(47, 107, 255, 0.12), transparent 34%),
    radial-gradient(circle at 88% 2%, rgba(20, 184, 166, 0.12), transparent 30%),
    linear-gradient(135deg, #f5f7fa 0%, #e9eff6 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

.page {
  width: min(1080px, calc(100% - 40px));
  margin: 40px auto;
}

.container {
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: 58px 28px 44px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(79, 255, 221, 0.22), transparent 34%),
    linear-gradient(132deg, #2f6bff 0%, #2c84f4 45%, #12b6a8 100%);
}

.hero-glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
}

.hero-glow--one {
  top: -130px;
  right: -80px;
  width: 330px;
  height: 330px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-glow--two {
  bottom: -190px;
  left: -70px;
  width: 380px;
  height: 380px;
  background: rgba(0, 255, 224, 0.13);
}

.hero > *:not(.hero-glow) {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7cf7c8;
  box-shadow: 0 0 0 4px rgba(124, 247, 200, 0.18);
}

.app-icon-wrap {
  width: 112px;
  height: 112px;
  margin: 22px auto 18px;
  padding: 7px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(6, 30, 70, 0.24);
}

.app-icon {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: contain;
  background: #fff;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.subtitle {
  max-width: 580px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.75;
}

.subtitle strong {
  color: #fff;
  font-weight: 700;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 246px;
  padding: 14px 20px;
  border: 1px solid transparent;
  border-radius: 18px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px) scale(0.985);
}

.btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}

.btn-ios {
  color: #fff;
  background: #0b1220;
  box-shadow: 0 14px 30px rgba(6, 15, 32, 0.28);
}

.btn-ios:hover {
  box-shadow: 0 18px 36px rgba(6, 15, 32, 0.36);
}

.btn-android {
  color: var(--ink);
  background: #fff;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 30px rgba(9, 43, 83, 0.18);
}

.btn-android:hover {
  box-shadow: 0 18px 36px rgba(9, 43, 83, 0.24);
}

.btn.is-recommended {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.4),
    0 18px 38px rgba(6, 30, 70, 0.28);
}

.btn-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  display: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ffd166;
  color: #5b3d00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(91, 61, 0, 0.18);
}

.btn.is-recommended .btn-badge {
  display: inline-flex;
}

.btn-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
}

.btn-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn-text strong {
  font-size: 16px;
  font-weight: 650;
}

.btn-text small {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.68;
}

.device-hint {
  display: inline-block;
  margin: 20px 0 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.93);
  font-size: 13px;
  line-height: 1.5;
}

.device-hint:empty {
  display: none;
}

.ios-tip {
  max-width: 560px;
  margin: 14px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  line-height: 1.7;
}

.ios-tip strong {
  color: #fff;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  opacity: 0.82;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.meta-label {
  color: rgba(255, 255, 255, 0.64);
}

.meta-value {
  color: #fff;
  font-weight: 600;
}

/* ---------------- Sections ---------------- */

.section {
  padding: 54px 48px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 30px;
  text-align: center;
}

.kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-head p {
  max-width: 620px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

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

.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8f0ff, #dffaf6);
  font-size: 23px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.footer {
  padding: 24px 28px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
}

.footer p {
  margin: 0;
}

.footer p + p {
  margin-top: 4px;
}

/* ---------------- WeChat banner ---------------- */

.wechat-banner {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #ffe0a3;
  background: #fff7e6;
  color: #7a4b00;
  font-size: 13px;
  line-height: 1.45;
}

.wechat-banner button {
  flex: none;
  margin-left: auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: #f5a623;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

body.is-wechat {
  padding-top: 56px;
}

/* ---------------- Modal / toast ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.58);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  padding: 30px 28px 24px;
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  animation: modal-pop 0.22s ease both;
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #334155;
}

.modal-card h2 {
  margin: 0 0 12px;
  padding-right: 36px;
  font-size: 21px;
  line-height: 1.35;
}

.modal-body {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.modal-body p {
  margin: 0 0 10px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.guide-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.guide-list li::marker {
  color: var(--primary);
  font-weight: 700;
}

.guide-tip {
  margin-top: 12px !important;
  color: #94a3b8 !important;
  font-size: 12.5px !important;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-btn {
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.modal-btn:active {
  transform: scale(0.98);
}

.modal-btn--primary {
  background: var(--primary);
  color: #fff;
}

.modal-btn--primary:hover {
  background: var(--primary-deep);
}

.modal-btn--ghost {
  border-color: #dbe3ee;
  background: #fff;
  color: #334155;
}

.modal-btn--ghost:hover {
  border-color: #c7d3e2;
  background: #f8fafc;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: #0b1220;
  color: #fff;
  box-shadow: 0 14px 34px rgba(6, 15, 32, 0.28);
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
}

.sr-copyarea,
.download-trigger {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 820px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 26px;
  }
}

@media (max-width: 560px) {
  body {
    padding: 0;
  }

  .page {
    width: 100%;
    margin: 0;
  }

  .container {
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    padding: 38px 18px 34px;
  }

  .app-icon-wrap {
    width: 96px;
    height: 96px;
    margin-top: 18px;
    border-radius: 26px;
  }

  .app-icon {
    border-radius: 19px;
  }

  .subtitle {
    font-size: 14.5px;
  }

  .download-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    margin-right: auto;
    margin-left: auto;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }

  .meta-row {
    gap: 7px;
  }

  .meta-item {
    padding: 7px 10px;
    font-size: 12px;
  }

  .section {
    padding: 36px 18px;
  }

  .section h2 {
    font-size: 24px;
  }

  .feature {
    padding: 20px;
  }

  .wechat-banner {
    align-items: flex-start;
    font-size: 12px;
  }

  body.is-wechat {
    padding-top: 66px;
  }

  .modal-card {
    padding: 26px 20px 20px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
