/* 五二云管家下载页：移动端优先，PC 居中窄列 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --color-primary: #e4393c;
  --color-primary-gradient: #ff7a6b;
  --color-primary-deep: #d1322f;
  --color-primary-tint: #fef0f0;
  --color-text: #333;
  --color-text-secondary: #999;
  --color-bg: #f5f6f8;
  --radius-card: 20px;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

/* 入场动效 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 顶部品牌区 */
.header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-primary-gradient) 0%, var(--color-primary) 55%, var(--color-primary-deep) 100%);
  padding: calc(env(safe-area-inset-top) + 56px) 24px 84px;
  text-align: center;
  color: #fff;
  animation: fadeIn 0.4s ease both;
}
/* 装饰光斑 */
.header::before,
.header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.header::before {
  width: 240px;
  height: 240px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
}
.header::after {
  width: 180px;
  height: 180px;
  bottom: -70px;
  left: -50px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}
.header > * { position: relative; z-index: 1; }
.header-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(120, 10, 10, 0.28);
}
.header-title { margin-top: 14px; font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.header-sub { margin-top: 6px; font-size: 13px; opacity: 0.88; letter-spacing: 1px; }

/* 主体 */
.main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: -44px auto 0;
  padding: 0 16px 32px;
  position: relative;
  z-index: 2;
}
.card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  animation: fadeUp 0.45s ease both;
}
.main .card:nth-of-type(2) { animation-delay: 0.08s; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }

/* App 信息 */
.app-info { display: flex; align-items: center; margin-bottom: 16px; }
.app-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.app-meta { margin-left: 14px; min-width: 0; }
.app-name { font-size: 17px; font-weight: 600; }
.app-version {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 12px;
  line-height: 1.5;
}

/* 特性标签 */
.feature-row { display: flex; gap: 8px; margin-bottom: 20px; }
.feature-chip {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #666;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 7px 0;
}

/* 按钮 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 25px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }
.btn-android {
  background: linear-gradient(135deg, var(--color-primary-gradient) 0%, var(--color-primary) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(228, 57, 60, 0.32);
}
.btn-android:active:not(:disabled) { box-shadow: 0 3px 8px rgba(228, 57, 60, 0.3); }
.btn-ios {
  background: #fff;
  color: var(--color-text);
  border: 1px solid #e5e6eb;
}
.btn-ios:not(:disabled):hover { background: #f7f8fa; }
/* 当前设备对应平台按钮高亮描边 */
.btn.recommend { box-shadow: 0 0 0 2px rgba(228, 57, 60, 0.25); }

.tip { font-size: 12px; color: var(--color-text-secondary); text-align: center; line-height: 1.6; }
.tip.warn { color: #ff4d4f; }

/* 二维码（通用弹窗内） */
.qr-code {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid #ebedf0;
  border-radius: 12px;
}
.qr-code img, .qr-code canvas { display: block; width: 140px; height: 140px; }
.qr-hint { margin-top: 10px; font-size: 12px; color: var(--color-text-secondary); }

/* 网页版入口 */
.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #eef0f2;
  border-radius: 14px;
  margin-bottom: 12px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.entry:last-child { margin-bottom: 0; }
.entry:hover {
  border-color: rgba(228, 57, 60, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.entry-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.entry-icon svg { width: 22px; height: 22px; }
.entry-body { flex: 1; min-width: 0; }
.entry-name { display: block; font-size: 15px; font-weight: 600; }
.entry-desc { display: block; margin-top: 2px; font-size: 12px; color: var(--color-text-secondary); }
.entry-arrow { width: 18px; height: 18px; color: #c8c9cc; flex-shrink: 0; }

/* 页脚 */
.footer { padding: 16px 24px calc(env(safe-area-inset-bottom) + 24px); text-align: center; }
.footer a { color: var(--color-text-secondary); font-size: 12px; text-decoration: none; }
.footer a:hover { color: var(--color-primary); }
.footer .divider { margin: 0 8px; color: #dcdfe6; font-size: 12px; }
.copyright { margin-top: 6px; font-size: 12px; color: #c8c9cc; }

/* 微信引导浮层 */
.wx-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
}
.wx-mask[hidden] { display: none; }
.wx-mask-content { padding: 40px 32px 0; text-align: right; color: #fff; }
.wx-mask-arrow { width: 56px; height: 56px; margin-right: 20px; }
.wx-mask-text { font-size: 16px; line-height: 1.8; text-align: center; }

/* 报单端二维码弹窗（PC 点击报单端入口时展示） */
.qr-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.qr-mask[hidden] { display: none; }
.qr-mask-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 20px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  animation: fadeUp 0.25s ease both;
}
.qr-mask-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.qr-mask-close {
  margin-top: 18px;
  width: 100%;
  height: 40px;
  border: 1px solid #e5e6eb;
  background: #fff;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
}
.qr-mask-close:hover { background: #f7f8fa; }

/* 桌面端：居中 + 略宽 */
@media (min-width: 600px) {
  .main { max-width: 520px; }
  .header { padding-bottom: 96px; }
}

/* 减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
