/* 哔咔官网 bi-ka.homes — 星云玫瑰二次元品牌站 */
:root {
  --rose: #ff4d8d;
  --rose-soft: #ff8cb8;
  --rose-glow: rgba(255, 77, 141, 0.35);
  --plum: #1c0f2e;
  --plum-mid: #2d1a4a;
  --plum-light: #3f2860;
  --gold: #e8b86d;
  --cyan: #5ecfff;
  --cream: #fdf6fa;
  --text: #2a1838;
  --text-soft: #6d5a7a;
  --card: rgba(255, 255, 255, 0.94);
  --border: rgba(255, 77, 141, 0.2);
  --nav-h: 56px;
  --sticky-h: 96px;
  --radius: 18px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(94, 207, 255, 0.08), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 10%, rgba(255, 77, 141, 0.1), transparent 50%),
    linear-gradient(180deg, #fff8fc 0%, #fdf0f7 40%, #f8eef8 100%);
  z-index: -2;
  pointer-events: none;
}

a { color: var(--plum-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--rose); }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* ===== 顶栏 ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
  height: var(--nav-h);
  background: linear-gradient(90deg, var(--plum) 0%, var(--plum-mid) 55%, #3a1f5c 100%);
  border-bottom: 1px solid rgba(255, 140, 184, 0.3);
  box-shadow: 0 4px 24px rgba(28, 15, 46, 0.35);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 10px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 2px solid var(--rose-soft);
  box-shadow: 0 0 12px var(--rose-glow);
}

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2px;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
  padding: 6px 11px;
  border-radius: 999px;
  transition: background 0.2s;
}

.main-nav a:hover,
.main-nav a.is-on {
  background: rgba(255, 77, 141, 0.45);
  color: #fff;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--rose), #ff2d7a);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 4px 16px var(--rose-glow);
  white-space: nowrap;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* ===== 粘性下载栏 ===== */
.float-ads {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 1050;
  background: linear-gradient(180deg, rgba(28, 15, 46, 0.98), rgba(45, 26, 74, 0.96));
  border-bottom: 1px solid rgba(255, 140, 184, 0.25);
  padding: 8px 0;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

.float-ads.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

body.ads-pinned main {
  padding-top: calc(var(--nav-h) + var(--sticky-h) + 12px);
}

/* ===== 广告位通用 ===== */
#ads, #sticky-ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 6px;
  background: transparent;
}

#ads > div, #sticky-ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(12.5% - 6px);
  min-width: 72px;
  max-width: 88px;
}

#ads img, #sticky-ads img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(255, 140, 184, 0.4);
  box-shadow: 0 6px 20px rgba(28, 15, 46, 0.25);
  transition: transform 0.18s, box-shadow 0.18s;
}

#ads a, #sticky-ads a { display: inline-block; border-radius: 16px; }

#ads img:hover, #sticky-ads img:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px var(--rose-glow);
}

#ads .caption, #sticky-ads .caption {
  font-size: 10px;
  color: var(--text-soft);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  height: 14px;
}

.float-ads #sticky-ads .caption { color: rgba(255, 255, 255, 0.75); }

.ads-panel {
  background: linear-gradient(135deg, rgba(255, 77, 141, 0.06), rgba(94, 207, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px 10px;
  margin-bottom: 28px;
}

.ads-panel-label {
  text-align: center;
  font-size: 0.82rem;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

/* ===== 主内容区 ===== */
main { padding-top: calc(var(--nav-h) + 12px); }

/* ===== 首屏 ===== */
.intro-hero {
  padding: 36px 0 48px;
  position: relative;
}

.intro-hero::before {
  content: "";
  position: absolute;
  top: 0; right: -10%;
  width: 55%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(255, 77, 141, 0.12), transparent 70%);
  pointer-events: none;
}

.intro-tag {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(90deg, var(--plum-mid), var(--plum-light));
  color: var(--gold);
  font-size: 0.78rem;
  border-radius: 4px 14px 4px 14px;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.intro-hero h1 {
  font-size: clamp(1.55rem, 4.5vw, 2.35rem);
  line-height: 1.35;
  color: var(--plum);
  margin-bottom: 18px;
  font-weight: 800;
}

.intro-lead {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 720px;
  margin-bottom: 22px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.chip {
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--plum-mid);
  box-shadow: 0 2px 8px rgba(255, 77, 141, 0.08);
}

/* ===== 章节 ===== */
.block { padding: 44px 0; }

.block:nth-child(even) {
  background: linear-gradient(180deg, transparent, rgba(255, 77, 141, 0.04), transparent);
}

.sec-head { margin-bottom: 28px; }

.sec-head h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  color: var(--plum);
  font-weight: 700;
  margin-bottom: 6px;
}

.sec-head .sub {
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* 纯文本 */
.prose p {
  margin-bottom: 1.1em;
  text-align: justify;
  font-size: 0.97rem;
}

.prose p:last-child { margin-bottom: 0; }

/* 卡片 */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: 0 6px 24px rgba(28, 15, 46, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--rose-glow);
}

.tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), var(--plum-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.tile h3 {
  font-size: 1rem;
  color: var(--plum);
  margin-bottom: 8px;
}

.tile p { font-size: 0.88rem; color: var(--text-soft); line-height: 1.75; }

/* 图文 3:7 */
.split-row {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 28px;
  align-items: start;
  margin: 28px 0;
}

.split-row.flip { direction: rtl; }
.split-row.flip > * { direction: ltr; }

.split-img figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(28, 15, 46, 0.12);
  background: #fff;
}

.split-img img { width: 100%; }

.split-img figcaption {
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--text-soft);
  background: #fff;
  text-align: center;
}

.split-body h3 {
  font-size: 1.12rem;
  color: var(--plum-mid);
  margin-bottom: 12px;
}

.split-body p {
  font-size: 0.94rem;
  color: var(--text);
  margin-bottom: 0.9em;
  text-align: justify;
}

/* 图文+卡片组合 */
.combo {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 24px;
  margin: 28px 0;
  box-shadow: 0 8px 32px rgba(28, 15, 46, 0.07);
}

.combo-title {
  font-size: 1.1rem;
  color: var(--plum);
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 4px solid var(--rose);
}

.combo-inner {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 22px;
  align-items: start;
}

.combo-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.pill-card {
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 77, 141, 0.06), rgba(94, 207, 255, 0.05));
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pill-card strong {
  display: block;
  font-size: 0.85rem;
  color: var(--plum);
  margin-bottom: 4px;
}

.pill-card span { font-size: 0.78rem; color: var(--text-soft); line-height: 1.6; }

/* 面包屑 */
.crumb {
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.crumb a { color: var(--plum-mid); }
.crumb span { margin: 0 6px; opacity: 0.5; }

/* 法律/子页 */
.page-title {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--plum);
  margin: 20px 0 12px;
}

.page-lead {
  color: var(--text-soft);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.doc-body h2 {
  font-size: 1.15rem;
  color: var(--plum-mid);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 77, 141, 0.2);
}

.doc-body h3 {
  font-size: 1rem;
  color: var(--plum);
  margin: 22px 0 10px;
}

.doc-body p, .doc-body li {
  font-size: 0.93rem;
  margin-bottom: 0.85em;
  text-align: justify;
}

.doc-body ul, .doc-body ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}

/* 页脚 */
.site-foot {
  background: linear-gradient(180deg, var(--plum-mid), var(--plum));
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 0 28px;
  margin-top: 48px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.foot-grid h4 {
  color: var(--rose-soft);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.foot-grid a, .foot-grid p {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.foot-grid a:hover { color: #fff; }

.foot-copy {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* 错误页 */
.err-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.err-code {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

/* 响应式 */
@media (max-width: 900px) {
  .split-row, .combo-inner { grid-template-columns: 1fr; }
  .split-row.flip { direction: ltr; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-btn {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  .main-nav ul {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: linear-gradient(180deg, var(--plum-mid), var(--plum));
    padding: 10px 4vw 16px;
    border-bottom: 1px solid rgba(255, 140, 184, 0.3);
    box-shadow: 0 12px 28px rgba(28, 15, 46, 0.35);
    gap: 2px;
    z-index: 1099;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }

  .main-nav ul.open { display: flex; }

  .main-nav ul li { width: 100%; }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  .main-nav a.btn-cta {
    text-align: center;
    margin-top: 6px;
  }

  #ads > div, #sticky-ads > div {
    width: calc(25% - 6px);
    min-width: 68px;
  }

  #ads img, #sticky-ads img { width: 58px; height: 58px; }

  .combo-pills { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  #ads > div, #sticky-ads > div { width: calc(12.5% - 6px); }
}
