/* =============================================================
   公共样式：设计变量 / 按钮 / 手机模型 / 贴纸 / 标签 / 弹窗 / 提示
   风格取自 App：薄荷绿 → 柠檬绿渐变、黑色描边漫画格、柠檬绿高亮
   ============================================================= */
:root {
  --ink: #15190f;
  --ink-2: #2b3320;
  --lime: #c8f03c;
  --lime-deep: #9ed10f;
  --lime-soft: #effbc8;
  --mint: #dcf7e4;
  --mint-2: #c4efd2;
  --paper: #fbfff4;
  --white: #ffffff;
  --muted: #5e6b57;
  --line: rgba(21, 25, 15, 0.12);
  --red: #f2494c;
  --pink: #ff7a98;
  --yellow: #ffe14d;
  --orange: #ff9f2e;
  --green: #23c16b;
  --radius: 18px;
  --hard: 4px 4px 0 var(--ink);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

/* Logo：JPG 无透明通道，用圆角裁掉白色四角 + 漫画描边 */
img[data-cfg-src="logo"] {
  border-radius: 24%;
  border: 2px solid var(--ink);
  object-fit: cover;
  background: var(--lime);
}

/* ---------- 网点 / 速度线 背景 ---------- */
.halftone {
  background-image: radial-gradient(rgba(21, 25, 15, 0.13) 1.2px, transparent 1.6px);
  background-size: 14px 14px;
}
.speedlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(200, 240, 60, 0.55) 0deg 2.2deg, transparent 2.2deg 9deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 0 22%, #000 46%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 0 22%, #000 46%, transparent 72%);
  animation: spin 120s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 高亮文字（荧光笔效果） ---------- */
.hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hl::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.12em;
  right: -0.12em;
  bottom: 0.06em;
  height: 0.46em;
  background: var(--lime);
  border-radius: 4px;
  transform: skewX(-12deg);
}

/* ---------- 标签式标题（取自 App 的「更多推荐」） ---------- */
.tag-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
}
.tag-title b {
  display: inline-block;
  background: var(--ink);
  color: var(--lime);
  padding: 6px 26px 6px 16px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  border-radius: 6px 0 0 6px;
}
.tag-title i {
  display: inline-flex;
  gap: 4px;
}
.tag-title i::before, .tag-title i::after, .tag-title i span {
  content: "";
  width: 7px;
  height: 22px;
  background: var(--lime);
  border: 2px solid var(--ink);
  transform: skewX(-24deg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.pill em {
  font-style: normal;
  background: var(--lime);
  color: var(--ink);
  border-radius: 999px;
  padding: 1px 10px;
  font-weight: 900;
}

/* ---------- 下载按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px 0 20px;
  height: 66px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--hard);
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s;
  user-select: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 30px; height: 30px; flex: none; }
.btn-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.btn-txt small { font-size: 12px; font-weight: 600; opacity: 0.7; letter-spacing: 0.04em; }
.btn-txt b { font-size: 19px; font-weight: 900; letter-spacing: 0.02em; }
.btn-ios { background: var(--ink); color: var(--white); }
.btn-ios svg { color: var(--lime); }
.btn-android { background: var(--lime); color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn .badge-rec {
  position: absolute;
  top: -12px;
  right: -10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  transform: rotate(6deg);
  display: none;
}
.btn.is-rec .badge-rec { display: block; }

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s, background-color 0.2s;
  white-space: nowrap;
}
.btn-sm:hover { background: var(--lime); }
.btn-sm:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn-sm.dark { background: var(--ink); color: var(--lime); }
.btn-sm.dark:hover { background: var(--ink-2); }
.btn-sm svg { width: 15px; height: 15px; }

/* ---------- 手机模型（自动滚动 App 截图） ---------- */
.phone {
  position: relative;
  width: var(--pw, 300px);
  aspect-ratio: 9 / 19.2;
  padding: 11px;
  background: #101309;
  border: 3px solid var(--ink);
  border-radius: calc(var(--pw, 300px) * 0.155);
  box-shadow: 12px 12px 0 var(--ink), inset 0 0 0 2px #3a4130;
}
.phone::before { /* 侧边按键 */
  content: "";
  position: absolute;
  right: -7px;
  top: 22%;
  width: 4px;
  height: 64px;
  background: var(--ink);
  border-radius: 0 3px 3px 0;
}
.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--pw, 300px) * 0.12);
  background: #e9fbe0;
  container-type: size;
}
.phone-screen img {
  width: 100%;
  height: auto;
  max-width: none;
  animation: phoneScroll 26s ease-in-out infinite;
  will-change: transform;
}
.phone-island {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 50%;
  width: 30%;
  height: 22px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 999px;
}
.phone-glare {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 32%);
}
@keyframes phoneScroll {
  0%, 10% { transform: translateY(0); }
  45%, 55% { transform: translateY(calc(-100% + 100cqh)); }
  90%, 100% { transform: translateY(0); }
}

/* ---------- 贴纸 ---------- */
.sticker {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
  font-size: 15px;
  white-space: nowrap;
  transform: rotate(var(--r, -4deg));
  animation: bob 4.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.sticker.lime { background: var(--lime); }
.sticker.dark { background: var(--ink); color: var(--lime); }
.sticker.pink { background: var(--pink); color: var(--white); }
.sticker.yellow { background: var(--yellow); }
.sticker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@keyframes bob {
  0%, 100% { transform: rotate(var(--r, -4deg)) translateY(0); }
  50% { transform: rotate(var(--r, -4deg)) translateY(-8px); }
}

/* 漫画对话气泡 */
.bubble {
  position: absolute;
  z-index: 3;
  padding: 10px 18px;
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
  font-size: 16px;
  white-space: nowrap;
  transform: rotate(var(--r, 6deg));
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 26%;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: skewX(30deg) rotate(30deg);
}

/* ---------- 斜向跑马灯胶带 ---------- */
.tape {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border-block: 3px solid var(--ink);
  font-weight: 900;
  font-style: italic;
}
.tape-track {
  display: inline-flex;
  animation: tape 28s linear infinite;
}
.tape-track span {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-right: 22px;
}
.tape-track span::after { content: "✦"; font-style: normal; }
.tape.reverse .tape-track { animation-direction: reverse; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- 线路状态 ---------- */
[data-domain] .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b9c2b0;
  border: 2px solid var(--ink);
  flex: none;
}
[data-domain].is-testing .status-dot { animation: blink 0.8s ease-in-out infinite; background: var(--yellow); }
[data-domain].is-ok .status-dot { background: var(--green); }
[data-domain].is-slow .status-dot { background: var(--orange); }
[data-domain].is-bad .status-dot { background: var(--red); }
[data-domain].is-ok [data-ms] { color: #138a4a; }
[data-domain].is-slow [data-ms] { color: #c56a00; }
[data-domain].is-bad [data-ms] { color: var(--red); }
[data-domain] [data-bar] { transition: width 0.8s cubic-bezier(.2,.8,.2,1); width: 0; }
[data-domain].is-ok [data-bar] { background: var(--green); }
[data-domain].is-slow [data-bar] { background: var(--orange); }
[data-domain].is-bad [data-bar] { background: var(--red); }
[data-domain] .fastest { display: none; }
[data-domain].is-fastest .fastest { display: inline-flex; }
@keyframes blink { 50% { opacity: 0.3; } }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(21, 25, 15, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px 24px 24px;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 8px 8px 0 var(--ink);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(.2,.9,.3,1.2);
}
.modal.open .modal-card { transform: none; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--lime-soft);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}

/* ---------- 二维码 ---------- */
.qr {
  display: grid;
  place-items: center;
  background: var(--white);
  border-radius: 10px;
}
.qr img, .qr canvas { width: 100% !important; height: auto !important; image-rendering: pixelated; }
.qr-fallback { font-size: 12px; color: var(--muted); padding: 12px; text-align: center; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 110px;
  max-width: calc(100vw - 48px);
  padding: 10px 20px;
  background: var(--ink);
  color: var(--lime);
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 出场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* FAQ */
.faq details {
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;
}
.faq details + details { margin-top: 14px; }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 800;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q";
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-weight: 900;
  font-size: 14px;
}
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 18px 18px 56px;
  color: var(--muted);
  font-size: 14px;
}

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