/* ============================================================
   漫蛙3漫画APP下载站样式（浅色主题）
   ------------------------------------------------------------
   设计令牌 / Reset / 基础排版 / 无障碍 / .container
   统一由 assets/css/base.css 提供；
   本站只覆盖品牌令牌（紫色为品牌强调色）+ 组件样式。
   ============================================================ */
@import url("https://jiameiyp.com.cn/assets/css/base.css");

:root {
  /* 品牌：紫（覆盖基座令牌，只改取值） */
  --brand: #7b2cbf;
  --brand-dark: #5a189a;
  --brand-deep: #3c096c;
  --brand-soft: #f3e8ff;
  --accent: #ec4899;
  --accent-dark: #be185d;

  /* 中性色：冷白底 + 紫调灰字 */
  --text: #1f1235;
  --text-soft: #4a3b63;
  --muted: #7c6f95;
  --bg: #faf8ff;
  --card-bg: #ffffff;
  --line: #ece4f7;
  --line-strong: #ddd0f0;

  /* 布局：与 copyComic 同宽（主站 1160px） */
  --container: 1080px;
  --gutter: clamp(18px, 4vw, 32px);

  --shadow-sm: 0 1px 2px rgba(60, 9, 108, 0.06), 0 4px 14px rgba(60, 9, 108, 0.06);
  --shadow: 0 2px 4px rgba(60, 9, 108, 0.05), 0 14px 34px rgba(60, 9, 108, 0.08);

  /* 悬浮下载条高度，用于 body 底部留白 */
  --bar-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  overflow-x: hidden;
  padding-bottom: calc(var(--bar-h) + var(--safe-bottom) + 16px);
  -webkit-tap-highlight-color: transparent;
}

/* ============================
   顶部导航栏
   ============================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  flex: none;
  margin-right: auto;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.nav-links {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-link:hover,
.nav-link:active {
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}

.nav-link.active {
  color: #fff;
  background: var(--brand);
}

/* ============================
   顶部 Hero 区
   ============================ */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: clamp(34px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 88% -10%, rgba(236, 72, 153, 0.14), transparent 60%),
    radial-gradient(55% 80% at 0% 10%, rgba(123, 44, 191, 0.14), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-inner > p:last-child {
  margin-bottom: 0;
}

.hero .logo {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  margin: 0 auto 16px;
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.hero .tagline {
  font-size: 1rem;
  color: var(--text-soft);
  font-weight: 500;
  margin-bottom: 18px;
}

.hero .badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.hero .badges span {
  display: inline-block;
  background: var(--brand-soft);
  border: 1px solid var(--line-strong);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 650;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================
   按钮
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(123, 44, 191, 0.28);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: rgba(123, 44, 191, 0.3);
}

.btn-outline:hover {
  background: #fff;
  color: var(--brand);
  border-color: var(--brand);
}

/* ============================
   区块通用
   ============================ */
.section {
  padding-block: clamp(40px, 6vw, 72px);
  background: var(--bg);
}

.section.alt {
  background: var(--card-bg);
  border-block: 1px solid var(--line);
}

.section h2 {
  position: relative;
  text-align: center;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.section .sub {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-soft);
  margin-bottom: 26px;
}

.section h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 3px;
  margin: 10px auto 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ---------- 特性卡 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature-card .ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 22px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- 步骤列表 ---------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 16px 16px 60px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  color: var(--text-soft);
}

.steps li strong {
  color: var(--text);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  padding: 16px 18px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  position: relative;
  list-style: none;
  color: var(--text);
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform var(--dur) var(--ease);
}

.faq-item[open] .faq-q::after {
  content: "−";
}

.faq-a {
  padding: 0 18px 16px;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
}

/* ---------- 关键词标签云 ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag-cloud a {
  display: inline-block;
  padding: 7px 14px;
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.tag-cloud a:hover,
.tag-cloud a:active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  text-decoration: none;
}

/* ---------- 文章正文 ---------- */
.prose {
  max-width: 820px;
  margin-inline: auto;
}

.prose p {
  margin-bottom: 14px;
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--brand-dark);
  font-weight: 700;
}

.prose h3 {
  font-size: 1.06rem;
  font-weight: 750;
  margin: 20px 0 10px;
  color: var(--text);
}

.prose ul {
  padding-left: 1.2em;
  margin: 0 0 14px;
}

.prose li {
  font-size: 0.94rem;
  line-height: 1.8;
  margin-bottom: 6px;
  color: var(--text-soft);
}

/* ---------- 下载大卡（对应主站 .cta-band 的处理） ---------- */
.download-card {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px) clamp(20px, 4vw, 32px);
  text-align: center;
  box-shadow: 0 12px 30px rgba(90, 24, 154, 0.22);
}

.download-card h3 {
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.download-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 20px;
}

.download-card .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.download-card .btn + .btn {
  margin-top: 10px;
}

.download-card .row .btn {
  margin-top: 0;
}

/* 深色卡内按钮反白，保证对比度 */
.download-card .btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.download-card .btn-primary:hover {
  background: var(--brand-soft);
}

.download-card .btn-secondary,
.download-card .btn-outline {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.download-card .btn-secondary:hover,
.download-card .btn-outline:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  border-color: #fff;
}

/* ---------- 内部链接导航块 ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.link-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.link-grid a::before {
  content: "→";
  color: var(--brand);
  font-weight: 800;
}

.link-grid a:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

/* ============================
   底部悬浮下载条
   ============================ */
.floating-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(60, 9, 108, 0.1);
  transform: translateY(110%);
  transition: transform 0.3s var(--ease);
}

.floating-bar.show {
  transform: translateY(0);
}

.floating-bar .info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.floating-bar .info .mini-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  object-fit: cover;
  flex: none;
}

.floating-bar .info .text {
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.25;
}

.floating-bar .info .text b {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-bar .info .text span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-bar .actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.floating-bar .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.85rem;
}

/* ============================
   页脚
   ============================ */
footer {
  text-align: center;
  padding: 32px var(--gutter) 28px;
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.8;
}

footer .links {
  margin-bottom: 10px;
}

footer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  margin: 0 4px;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

footer .disclaimer {
  margin-top: 10px;
  font-size: 0.76rem;
  opacity: 0.7;
}

/* ============================
   响应式（断点对齐全站 1020 / 860 / 640）
   ============================ */
@media (min-width: 641px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .link-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-buttons .btn {
    min-width: 180px;
  }
}

@media (max-width: 860px) {
  .hero .logo {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }
}

@media (max-width: 640px) {
  .hero-buttons .btn {
    width: 100%;
  }
  .floating-bar .info .text span {
    display: none;
  }
}

/* 组件级微调：超窄屏特性卡改单列 */
@media (max-width: 380px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
