/* 取色表（ui_style_ref.png + 品牌 LOGO）
   页面背景=#F7F8FA
   顶栏/头部=无（居中启动布局）
   卡片/主体块=#FFFFFF
   强调色=#3370FF
   文字色=#1A1A1A / 辅助=#999999 / 更淡=#B0B4BE
   LOGO「充电」=#FFF6DE 描边=#6B3E18
   LOGO「时间」=#FFD23A→#F0A810 描边=#6B3E18
   按钮按压=#2860E0
   信任标图标=#3370FF
*/
:root {
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --primary: #3370FF;
  --primary-press: #2860E0;
  --text: #1A1A1A;
  --text-2: #646A73;
  --text-3: #999999;
  --text-4: #B0B4BE;
  --name-charge: #FFF6DE;
  --name-charge-edge: #6B3E18;
  --name-time: #FFD23A;
  --name-time-deep: #F0A810;
  --line: #E8E9ED;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Segoe UI", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.in-wechat, html.in-wechat body {
  overflow: hidden;
  height: 100%;
}

/* ========== 启动页：浅灰底 + 流星层 + 居中 LOGO/标题 + 底部蓝钮 ========== */
.page.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 20px calc(28px + var(--safe-b));
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 流星动效层：铺满视口，不拦截点击（纯 CSS，避免 canvas 把预览打崩） */
.meteor-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3370FF;
  opacity: 0.22;
  animation: twinkle 2.8s ease-in-out infinite;
}
.s1 { left: 12%; top: 18%; animation-delay: 0s; }
.s2 { left: 28%; top: 8%; width: 2px; height: 2px; animation-delay: .4s; }
.s3 { left: 68%; top: 14%; animation-delay: .8s; }
.s4 { left: 86%; top: 28%; width: 2px; height: 2px; animation-delay: 1.1s; }
.s5 { left: 18%; top: 62%; animation-delay: 1.5s; }
.s6 { left: 52%; top: 44%; width: 2px; height: 2px; animation-delay: .2s; }
.s7 { left: 78%; top: 72%; animation-delay: 1.9s; }
.s8 { left: 40%; top: 82%; width: 2px; height: 2px; animation-delay: .7s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(1); }
  50% { opacity: 0.38; transform: scale(1.35); }
}

.meteor {
  position: absolute;
  top: -8%;
  width: 88px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(51,112,255,0) 0%, rgba(120,168,255,0.45) 55%, rgba(255,255,255,0.95) 100%);
  transform: rotate(125deg);
  animation: meteor-fall 2.4s linear infinite;
  will-change: transform, opacity;
}
.m1 { left: 78%; animation-duration: 2.2s; animation-delay: 0s; }
.m2 { left: 96%; animation-duration: 2.8s; animation-delay: 0.7s; width: 70px; }
.m3 { left: 58%; animation-duration: 2.5s; animation-delay: 1.4s; width: 100px; }
.m4 { left: 88%; animation-duration: 3.1s; animation-delay: 2.1s; width: 64px; }

@keyframes meteor-fall {
  0% { transform: translate3d(0, 0, 0) rotate(125deg); opacity: 0; }
  8% { opacity: 1; }
  70% { opacity: 0.85; }
  100% { transform: translate3d(-460px, 620px, 0) rotate(125deg); opacity: 0; }
}

.landing-center {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0 16px;
  text-align: center;
}

/* 当前品牌 LOGO（像素风「充电时间」，800×650） */
.brand-logo {
  display: block;
  width: 200px;
  height: auto;
  aspect-ratio: 800 / 650;
  object-fit: contain;
  margin: 0 auto 14px;
  user-select: none;
  -webkit-user-drag: none;
}

.logo-fallback {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: #3370FF;
  color: #FFFFFF;
  font-size: 36px;
  font-weight: 800;
  line-height: 88px;
  text-align: center;
}

.brand-logo--sm {
  width: 88px;
  margin: 0 auto 14px;
}

/* 「充电时间」分色：充电=奶油描边，时间=金色描边（text-shadow，避免 WebView 崩） */
.app-name {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.name-charge {
  color: #FFF6DE;
  text-shadow:
    -2px 0 0 #6B3E18,
     2px 0 0 #6B3E18,
     0 -2px 0 #6B3E18,
     0  2px 0 #6B3E18,
    -1px -1px 0 #6B3E18,
     1px -1px 0 #6B3E18,
    -1px  1px 0 #6B3E18,
     1px  1px 0 #6B3E18,
     0 3px 0 #5A3010;
}

.name-time {
  color: #FFD23A;
  text-shadow:
    -2px 0 0 #6B3E18,
     2px 0 0 #6B3E18,
     0 -2px 0 #6B3E18,
     0  2px 0 #6B3E18,
    -1px -1px 0 #6B3E18,
     1px -1px 0 #6B3E18,
    -1px  1px 0 #6B3E18,
     1px  1px 0 #6B3E18,
     0 3px 0 #C47A08;
}

.app-sub {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 1px;
  line-height: 1.4;
}

.app-ver {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.4px;
  line-height: 1.4;
}

.app-time {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-4);
  line-height: 1.4;
  min-height: 16px;
}

/* 信任标：盾牌蓝勾 + AD 蓝底白字，横排居中 */
.trust-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 4px 0 20px;
  padding: 0 4px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.2;
  white-space: nowrap;
}

.trust-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  line-height: 1;
  flex: none;
}

.trust-ico--safe {
  background: transparent;
}
.trust-ico--safe svg { display: block; }

.trust-ico--ad {
  width: 20px;
  height: 16px;
  border-radius: 3px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.landing-foot {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 0;
  text-align: center;
}

.btn-cta, .btn-primary, .btn-ghost {
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
}

/* 参考图底栏主按钮：圆角蓝底白字 */
.btn-cta {
  height: 52px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.6px;
  box-shadow: 0 8px 20px rgba(51, 112, 255, 0.28);
}
.btn-cta:active {
  background: var(--primary-press);
  transform: scale(0.985);
  box-shadow: 0 4px 12px rgba(51, 112, 255, 0.22);
}
.btn-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.foot-tip {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-4);
  line-height: 1.5;
}
.foot-tip.is-ok {
  color: var(--primary);
  font-weight: 600;
}

.invite-chip {
  margin: 0 0 12px;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.btn-primary {
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
}
.btn-primary:active { background: var(--primary-press); }

.btn-ghost {
  height: 44px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}
.btn-ghost:active { background: #F0F2F5; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18vh;
  transform: translateX(-50%);
  max-width: 80%;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(26, 26, 26, 0.88);
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 1100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.toast.show { opacity: 1; }

/* ========== 微信内引导遮罩 ========== */
.wx-guide {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 26, 26, 0.72);
  padding: 12px 16px 24px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
html.in-wechat .wx-guide { display: block; }

.wx-arrow {
  position: absolute;
  top: 4px;
  right: 8px;
  pointer-events: none;
}
.wx-arrow-hint {
  position: absolute;
  top: 88px;
  right: 16px;
  margin: 0;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}
.wx-dots {
  display: inline-block;
  padding: 0 8px;
  height: 22px;
  line-height: 20px;
  border: 1px solid #FFFFFF;
  border-radius: 4px;
  font-size: 16px;
  letter-spacing: 1px;
  vertical-align: middle;
}

.wx-card {
  margin: 132px auto 0;
  max-width: 360px;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(26, 26, 26, 0.12);
}
.wx-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.wx-desc {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}
.wx-steps {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.wx-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  min-height: 48px;
  font-size: 15px;
  color: var(--text);
  background: var(--card);
}
.wx-steps li + li { border-top: 1px solid var(--line); }
.wx-no {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E8F0FF;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.wx-card .btn-primary { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .star, .meteor { animation: none; opacity: 0.18; }
}
