/* ==========================================================================
   学易答 APP 官方下载与分享落地页样式表
   Liaoning Qizhi Yunchuang Network Technology Co,.Ltd
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-ring: rgba(37, 99, 235, 0.25);
  --apple-black: #000000;
  --android-green: #059669;
  --android-dark: #047857;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(37, 99, 235, 0.15), 0 10px 15px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.8) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(224, 242, 254, 0.8) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(241, 245, 249, 0.5) 0px, transparent 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

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

/* 微信环境顶部提示条 */
.wechat-top-bar {
  display: none;
  background: #fef08a;
  color: #854d0e;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.wechat-top-bar.is-visible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wechat-top-bar .action-link {
  text-decoration: underline;
  color: #a16207;
  font-weight: 700;
  cursor: pointer;
}

/* 微信右上角遮罩引导层 */
.wechat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  color: #ffffff;
  padding: 24px 20px;
  overflow-y: auto;
}

.wechat-overlay.is-active {
  display: block;
}

.wechat-arrow-box {
  position: absolute;
  top: 14px;
  right: 20px;
  width: 125px;
  height: 125px;
  animation: floatArrow 1.4s ease-in-out infinite alternate;
  pointer-events: none;
}

.wechat-arrow-svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes floatArrow {
  0% { transform: translateY(0px) scale(0.96); }
  100% { transform: translateY(-8px) scale(1.04); }
}

.wechat-guide-card {
  max-width: 340px;
  margin: 136px auto 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.wechat-guide-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.wechat-guide-card p.subtitle {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 22px;
  line-height: 1.5;
}

.wechat-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 22px;
}

.wechat-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.09);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.4;
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.wechat-dismiss-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}

.wechat-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 页面主容器 */
.page-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 14px 60px;
}

/* 顶部轻量导航 */
.mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.header-official-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

/* 核心 Hero 下载卡片 */
.hero-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  padding: 28px 22px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #10b981);
}

/* App 图标区 */
.app-icon-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
}

.app-icon-img {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
}

.app-badge-verified {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #10b981;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.app-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.app-slogan {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

/* 评分与指标栏 */
.metrics-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 0 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  margin-bottom: 20px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.metric-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 3px;
}

.metric-stars {
  color: #f59e0b;
  font-size: 13px;
}

.metric-divider {
  width: 1px;
  height: 22px;
  background: #e2e8f0;
}

/* 下载主行动区 */
.download-action-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* 主要下载大按钮 */
.btn-primary-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary-download:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.45);
}

.btn-primary-download:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary-download.is-ios {
  background: #000000;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.btn-primary-download.is-ios:hover {
  background: #1e1e1e;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: currentColor;
}

.btn-label-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.25;
}

.btn-title {
  font-size: 17px;
  font-weight: 700;
}

.btn-subtitle {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 400;
}

/* 次要切换按钮 */
.btn-secondary-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-secondary-download:hover {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-secondary-download:active {
  transform: scale(0.99);
}

/* 分享与复制链接按钮 */
.share-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.btn-share-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: #f1f5f9;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.btn-share-copy:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* 版本说明与安全承诺 */
.security-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #e2e8f0;
  font-size: 12px;
  color: var(--text-light);
}

.guarantee-tag {
  display: flex;
  align-items: center;
  gap: 4px;
}

.guarantee-tag svg {
  color: #10b981;
}

/* 桌面端二维码卡片 */
.desktop-qrcode-card {
  display: none;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-top: 20px;
  text-align: center;
}

@media (min-width: 640px) {
  .desktop-qrcode-card {
    display: block;
  }
}

.desktop-qrcode-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.desktop-qrcode-card p.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qrcode-box-container {
  display: inline-block;
  padding: 12px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  position: relative;
}

.qrcode-canvas {
  width: 160px;
  height: 160px;
  display: block;
}

.qrcode-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.qrcode-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.qrcode-tab-btn {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
}

.qrcode-tab-btn.is-active {
  background: var(--primary);
  color: #ffffff;
}

/* 核心能力亮点条 */
.highlights-section {
  margin-top: 28px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 14px;
  padding-left: 4px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.highlight-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.highlight-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 2px;
}

.highlight-item:nth-child(2) .highlight-icon-box {
  background: #ecfdf5;
  color: #059669;
}

.highlight-item:nth-child(3) .highlight-icon-box {
  background: #fffbeb;
  color: #d97706;
}

.highlight-item:nth-child(4) .highlight-icon-box {
  background: #f5f3ff;
  color: #7c3aed;
}

.highlight-item h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.highlight-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 真实截图预览滑块 */
.screenshots-section {
  margin-top: 28px;
}

.screenshots-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  -webkit-overflow-scrolling: touch;
}

.screenshots-scroll::-webkit-scrollbar {
  height: 5px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.screenshot-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.screenshot-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1242 / 2688;
  object-fit: cover;
  background: #e2e8f0;
}

.screenshot-caption {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  border-top: 1px solid #f1f5f9;
}

/* 底部合规与公司信息 */
.page-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.8;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.footer-link {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-company-name {
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-icp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* 移动端吸底常驻下载栏 */
.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 999;
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-bottom-bar.is-shown {
  transform: translateY(0%);
}

.sticky-app-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sticky-app-info h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.sticky-app-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.sticky-btn-download {
  padding: 9px 18px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 浮动 Toast 弹窗 */
.toast-msg {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.toast-msg.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 480px) {
  .hero-card {
    padding: 24px 16px 20px;
  }
  .app-title {
    font-size: 23px;
  }
  .btn-primary-download {
    padding: 14px 16px;
    font-size: 16px;
  }
}
