/* 哔咔漫画BIKA 官方品牌站 - 二次元暧昧风格 */
:root {
  --pink-main: #ff3d8f;
  --pink-light: #ff7eb3;
  --pink-deep: #d4146a;
  --purple-dusk: #6b2d8b;
  --purple-night: #2a1040;
  --bg-cream: #fff5f9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --text-main: #2d1a35;
  --text-muted: #6b5575;
  --border-soft: rgba(255, 61, 143, 0.18);
  --shadow-glow: 0 8px 32px rgba(255, 61, 143, 0.22);
  --radius-lg: 20px;
  --radius-md: 14px;
  --nav-h: 58px;
  --sticky-h: 88px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-cream);
  color: var(--text-main);
  line-height: 1.85;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(255, 61, 143, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(107, 45, 139, 0.1), transparent),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 61, 143, 0.03) 0 1px, transparent 1px 24px);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--pink-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pink-main); }

img { max-width: 100%; height: auto; display: block; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

/* ===== 顶部导航 ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(42, 16, 64, 0.97), rgba(107, 45, 139, 0.95));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 126, 179, 0.25);
  height: var(--nav-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 2px solid rgba(255, 126, 179, 0.5);
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 61, 143, 0.35);
  color: #fff;
}

.header-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.btn-download-nav {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-deep));
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(255, 61, 143, 0.45);
  white-space: nowrap;
}

.btn-download-nav:hover { opacity: 0.92; color: #fff !important; }

/* ===== 粘性下载栏 ===== */
.sticky-download-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 999;
  background: linear-gradient(180deg, rgba(255, 245, 249, 0.98), rgba(255, 255, 255, 0.96));
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 4px 20px rgba(107, 45, 139, 0.08);
  padding: 8px 12px;
  transform: translateY(-120%);
  transition: transform 0.35s ease;
}

.sticky-download-bar.visible { transform: translateY(0); }

.sticky-download-bar .ads-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 8px 10px;
  max-width: 1120px;
  margin: 0 auto;
}

.sticky-download-bar .ads-grid > div {
  width: calc(12.5% - 10px);
  min-width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sticky-download-bar .ads-grid img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(24, 24, 24, 0.12);
  transition: transform 0.18s ease;
}

.sticky-download-bar .ads-grid img:hover {
  transform: translateY(-3px) scale(1.05);
}

.sticky-download-bar .ads-grid .caption {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .sticky-download-bar .ads-grid > div { width: calc(25% - 8px); }
  .sticky-download-bar .ads-grid img { width: 52px; height: 52px; }
}

/* ===== 顶部广告位 ===== */
.top-ads-wrap {
  background: linear-gradient(180deg, rgba(255, 61, 143, 0.06), transparent);
  padding: 14px 0 6px;
  margin-top: calc(var(--nav-h) + 8px);
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  background: transparent;
  margin: 10px 0;
  gap: 8px;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  border: none;
}

#ads a { display: inline-block; text-decoration: none; border-radius: 15px; }

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.18);
}

#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* ===== 主内容区 ===== */
main { padding-bottom: 60px; }

.page-hero {
  padding: 48px 0 36px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  background: linear-gradient(135deg, var(--pink-deep), var(--purple-dusk));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.35;
}

.page-hero .lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 24px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--pink-deep);
  font-weight: 500;
}

/* ===== 内容模块 ===== */
.section { padding: 40px 0; }

.section-title {
  font-size: 1.55rem;
  color: var(--purple-night);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--pink-main);
}

.section-title small {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
}

/* 纯文本块 */
.text-block {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-glow);
  margin-bottom: 28px;
}

.text-block p { margin-bottom: 16px; }
.text-block p:last-child { margin-bottom: 0; }

/* 文本+卡片 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-soft);
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-card .card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--pink-light), var(--pink-main));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.08rem;
  color: var(--purple-dusk);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* 文本+配图 */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-soft);
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
}

.media-row.reverse { grid-template-columns: 1.4fr 1fr; }
.media-row.reverse .media-img { order: 2; }
.media-row.reverse .media-text { order: 1; }

.media-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.media-img img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(107, 45, 139, 0.15);
}

.media-img figcaption {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.media-text h3 {
  font-size: 1.2rem;
  color: var(--purple-dusk);
  margin-bottom: 12px;
}

.media-text p { margin-bottom: 12px; color: var(--text-main); font-size: 0.95rem; }

/* 文本+卡片+配图 */
.combo-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.combo-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.combo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  border-radius: var(--radius-lg);
}

.combo-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.combo-cards .feature-card { margin: 0; flex: 1; }

/* CTA */
.cta-strip {
  background: linear-gradient(135deg, var(--purple-night), var(--purple-dusk), var(--pink-deep));
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  color: #fff;
  margin: 40px 0;
}

.cta-strip h2 { font-size: 1.4rem; margin-bottom: 12px; }
.cta-strip p { opacity: 0.9; margin-bottom: 20px; font-size: 0.95rem; }

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #fff, #ffe0ef);
  color: var(--pink-deep);
  padding: 12px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.btn-primary:hover { transform: scale(1.04); color: var(--pink-deep); }

/* 面包屑 */
.breadcrumb {
  padding: calc(var(--nav-h) + 20px) 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--pink-deep); }
.breadcrumb span { margin: 0 6px; }

.breadcrumb.after-ads { padding-top: 16px; }

/* 子页面 */
.legal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  border: 1px solid var(--border-soft);
  margin: 24px 0 48px;
  box-shadow: var(--shadow-glow);
}

.legal-content h2 {
  font-size: 1.25rem;
  color: var(--purple-dusk);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content h3 {
  font-size: 1.05rem;
  color: var(--pink-deep);
  margin: 20px 0 10px;
}

.legal-content p, .legal-content li {
  margin-bottom: 12px;
  font-size: 0.94rem;
  color: var(--text-main);
}

.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

/* 404 / 502 */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 20px 60px;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink-main), var(--purple-dusk));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h1 { font-size: 1.5rem; margin: 16px 0 10px; color: var(--purple-night); }
.error-page p { color: var(--text-muted); margin-bottom: 24px; }

/* 页脚 */
.site-footer {
  background: linear-gradient(180deg, var(--purple-night), #1a0828);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 28px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand img {
  width: 52px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.footer-brand p { font-size: 0.88rem; line-height: 1.7; }

.footer-links h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255, 255, 255, 0.65); font-size: 0.88rem; }
.footer-links a:hover { color: var(--pink-light); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 14px;
}

.faq-item h3 {
  font-size: 1rem;
  color: var(--purple-dusk);
  margin-bottom: 8px;
}

.faq-item p { font-size: 0.92rem; color: var(--text-muted); }

/* 响应式 */
@media (max-width: 900px) {
  .media-row, .media-row.reverse {
    grid-template-columns: 1fr;
  }
  .media-row.reverse .media-img,
  .media-row.reverse .media-text { order: unset; }
  .combo-block { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .header-inner {
    position: relative;
    justify-content: flex-start;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .header-nav {
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    transition: background 0.2s;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: rgba(255, 61, 143, 0.25);
    outline: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    right: 0;
    left: auto;
    width: min(280px, 88vw);
    background: rgba(42, 16, 64, 0.98);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
    border-radius: 0 0 0 16px;
    box-shadow: -4px 8px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 126, 179, 0.2);
    border-top: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    display: block;
    width: 100%;
    text-align: right;
    padding: 10px 14px;
  }
  .text-block, .legal-content { padding: 20px 18px; }
  .media-row { padding: 20px; }
  .sticky-download-bar .ads-grid > div { width: calc(25% - 8px); }
}

@media (min-width: 769px) {
  body.has-sticky .top-ads-wrap { margin-top: calc(var(--nav-h) + var(--sticky-h) + 8px); }
  body.has-sticky main .breadcrumb { padding-top: calc(var(--nav-h) + var(--sticky-h) + 20px); }
}
