/* EhViewerAPP 下载站 — 移动优先 */
:root {
  --brand: #00897b;
  --brand-dark: #00695c;
  --brand-light: #4db6ac;
  --ink: #14201e;
  --muted: #5a6b68;
  --bg: #f3faf8;
  --bg-deep: #0d3d38;
  --surface: #ffffff;
  --line: rgba(0, 105, 92, 0.12);
  --warn: #c45c26;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(13, 61, 56, 0.12);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --float-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 10% -10%, rgba(77, 182, 172, 0.35), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, rgba(0, 137, 123, 0.18), transparent 50%),
    linear-gradient(180deg, #e8f7f4 0%, var(--bg) 40%, #eef6f4 100%);
  line-height: 1.65;
  padding-bottom: calc(var(--float-h) + var(--safe-bottom) + 16px);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand);
}

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 250, 248, 0.88);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 0;
  z-index: 2;
}

.brand span {
  white-space: nowrap;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 105, 92, 0.25);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px 14px;
  font-size: 0.9rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 2px;
}

.nav a:hover,
.nav a.active {
  color: var(--brand-dark);
  font-weight: 600;
}

/* 移动端：汉堡菜单，避免导航挤成乱行 */
@media (max-width: 719px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 30;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .nav a:active,
  .nav a.active {
    background: rgba(0, 137, 123, 0.1);
  }

  .brand span {
    font-size: 0.95rem;
  }
}

/* Hero */
.hero {
  padding: 28px 0 18px;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--brand-dark);
  background: rgba(0, 137, 123, 0.1);
  border: 1px solid rgba(0, 137, 123, 0.18);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 5.5vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--brand);
}

.hero-lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1rem;
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: none;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--brand) 45%, var(--brand-dark));
  box-shadow: 0 10px 24px rgba(0, 105, 92, 0.28);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 105, 92, 0.35);
}

.btn-secondary {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 105, 92, 0.22);
}

.btn-secondary:hover {
  color: var(--brand-dark);
  background: #fff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(280px, 72vw);
  max-width: 100%;
}

.phone-frame {
  background: linear-gradient(160deg, #1a4f49, #0d3d38);
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: floatY 5.5s ease-in-out infinite;
  overflow: hidden;
}

.phone-frame img {
  width: 100%;
  border-radius: 18px;
  background: #06332e;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}

.shot-stack {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.shot-stack img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(13, 61, 56, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: #d7ebe7;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Sections */
.section {
  padding: 36px 0;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3.8vw, 1.75rem);
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 40em;
}

.feature-grid,
.card-grid {
  display: grid;
  gap: 14px;
}

.feature,
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: 0 4px 16px rgba(13, 61, 56, 0.04);
}

.feature h3,
.info-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature p,
.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  background: rgba(0, 137, 123, 0.12);
  color: var(--brand-dark);
  font-weight: 800;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.faq p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Related links */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related a {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
}

.related a:hover {
  border-color: var(--brand-light);
  color: var(--brand-dark);
}

/* Article body for SEO pages */
.article {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 6px 20px rgba(13, 61, 56, 0.05);
}

.article h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.25;
}

.article h2 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
}

.article p,
.article li {
  color: var(--muted);
}

.article ul {
  padding-left: 1.2em;
}

.crumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--brand);
}

/* Disclaimer */
.disclaimer {
  margin: 8px 0 24px;
  padding: 14px 16px;
  border-radius: 12px;
  border-left: 4px solid var(--warn);
  background: rgba(196, 92, 38, 0.08);
  color: #7a3a16;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Footer */
.site-footer {
  margin-top: 20px;
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 28px 0 24px;
}

.site-footer a {
  color: #9fe0d7;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-disclaimer {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
  letter-spacing: 0.02em;
}

.stats-line {
  text-align: center;
  font-size: 0.95rem;
  color: #b7ebe3;
  margin: 0 0 14px;
}

.stats-line strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  font-size: 0.86rem;
  margin-bottom: 12px;
}

.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Floating download bar */
.float-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  transform: translateY(110%);
  transition: transform 0.28s ease;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: rgba(13, 61, 56, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.2);
}

.float-bar.is-show {
  transform: translateY(0);
}

.float-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.float-bar .btn {
  min-height: 46px;
  font-size: 0.95rem;
}

.float-bar .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.float-bar .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery figure {
  margin: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.gallery img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: linear-gradient(160deg, #4db6ac, #00695c);
}

.gallery figcaption {
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
  }

  .shot-stack {
    display: grid;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .float-inner {
    grid-template-columns: 1fr 1fr;
    max-width: 520px;
  }

  .article {
    padding: 32px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone-frame {
    animation: none;
  }

  .btn,
  .float-bar {
    transition: none;
  }
}
