/* 哔咔官网 bi-ka.cyou — 绯樱霓光主题 */
:root {
  --sakura: #ff5c9a;
  --sakura-deep: #e83e7a;
  --violet: #7b3ff2;
  --violet-soft: #b794f6;
  --night: #1a0f24;
  --ink: #2d1b3d;
  --mist: #f8f0f8;
  --pearl: #fff5fa;
  --gold: #ffd166;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 12px 40px rgba(232, 62, 122, 0.15);
  --radius: 18px;
  --nav-h: 58px;
  --sticky-h: 0px;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--mist);
  color: var(--ink);
  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, 92, 154, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(123, 63, 242, 0.1), transparent),
    linear-gradient(180deg, var(--pearl) 0%, var(--mist) 40%, #f3e8f5 100%);
  z-index: -2;
  pointer-events: none;
}

a { color: var(--sakura-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--violet); }

img { max-width: 100%; height: auto; display: block; }

.container { width: 92%; max-width: 1100px; margin: 0 auto; }

/* ===== 顶栏导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 92, 154, 0.18);
  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: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(255, 92, 154, 0.35);
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: linear-gradient(135deg, var(--sakura), var(--violet));
  color: #fff;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--sakura), var(--violet));
  color: #fff !important;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(255, 92, 154, 0.4);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-download:hover { opacity: 0.92; transform: translateY(-1px); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--sakura-deep);
  cursor: pointer;
}

/* ===== 粘性下载广告栏 ===== */
.sticky-ads-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 245, 250, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 92, 154, 0.2);
  padding: 8px 0;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  pointer-events: none;
}

.sticky-ads-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-ads-inner {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.sticky-ads-inner > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(12.5% - 8px);
  min-width: 70px;
}

.sticky-ads-inner img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(24, 24, 24, 0.12);
}

.sticky-ads-inner .caption {
  font-size: 10px;
  color: #666;
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

@media (max-width: 768px) {
  .sticky-ads-inner > div { width: calc(25% - 8px); }
  .sticky-ads-inner img { width: 48px; height: 48px; }
}

/* ===== 顶部广告位 ===== */
#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  background: transparent;
  margin: 14px 0 8px;
  gap: 6px;
}

#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;
}

#ads a { border-radius: 15px; display: inline-block; }

#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: #666;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

.ads-section {
  background: linear-gradient(135deg, rgba(255, 92, 154, 0.06), rgba(123, 63, 242, 0.06));
  border: 1px dashed rgba(255, 92, 154, 0.25);
  border-radius: var(--radius);
  padding: 12px 16px 16px;
  margin-bottom: 28px;
  text-align: center;
}

.ads-label {
  font-size: 0.78rem;
  color: var(--sakura-deep);
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 14px 0 6px;
  font-size: 0.82rem;
  color: #8a6a9a;
}

.breadcrumb a { color: var(--sakura-deep); }
.breadcrumb span { margin: 0 6px; }

/* ===== 首页英雄区 ===== */
.hero {
  padding: 36px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 5px 16px;
  background: linear-gradient(90deg, rgba(255,92,154,0.15), rgba(123,63,242,0.15));
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--sakura-deep);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  line-height: 1.35;
  background: linear-gradient(135deg, var(--sakura-deep), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1rem;
  color: #5c3d6e;
  max-width: 680px;
  margin: 0 auto 24px;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== 内容模块 ===== */
.section { padding: 40px 0; }

.section-title {
  font-size: 1.45rem;
  color: var(--ink);
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--sakura), var(--violet));
}

.section-sub {
  font-size: 0.88rem;
  color: #8a6a9a;
  margin-bottom: 24px;
  padding-left: 16px;
}

/* 纯文本块 */
.text-block {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  border: 1px solid rgba(255, 92, 154, 0.08);
}

.text-block p { margin-bottom: 14px; text-align: justify; }
.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: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(123, 63, 242, 0.08);
  transition: transform 0.25s;
}

.feature-card:hover { transform: translateY(-4px); }

.feature-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sakura), var(--violet));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--ink);
}

.feature-card p {
  font-size: 0.9rem;
  color: #5c3d6e;
  line-height: 1.75;
}

/* 文本+配图 */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 32px;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.media-row.reverse { direction: rtl; }
.media-row.reverse > * { direction: ltr; }

.media-row .media-img {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(232, 62, 122, 0.2);
}

.media-row .media-img img { width: 100%; }

.media-row .media-text h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--sakura-deep);
}

.media-row .media-text p {
  margin-bottom: 12px;
  font-size: 0.92rem;
  text-align: justify;
}

/* 文本+卡片+配图 */
.combo-block {
  background: linear-gradient(145deg, #fff, var(--pearl));
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 92, 154, 0.1);
}

.combo-block h3 {
  font-size: 1.2rem;
  color: var(--violet);
  margin-bottom: 16px;
}

.combo-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.combo-img {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(123, 63, 242, 0.18);
}

.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 16px;
  border-left: 3px solid var(--sakura);
}

.mini-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.mini-card span { font-size: 0.82rem; color: #6b5080; }

/* 列表高亮 */
.highlight-list {
  list-style: none;
  margin: 16px 0;
}

.highlight-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px dashed rgba(255, 92, 154, 0.15);
  font-size: 0.92rem;
}

.highlight-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--sakura);
  font-size: 0.7rem;
  top: 13px;
}

/* 内链区块 */
.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.internal-links a {
  padding: 6px 14px;
  background: rgba(255, 92, 154, 0.08);
  border-radius: 16px;
  font-size: 0.82rem;
  color: var(--sakura-deep);
}

/* ===== 子页面 ===== */
.page-hero {
  padding: 32px 0 20px;
  border-bottom: 1px solid rgba(255, 92, 154, 0.12);
  margin-bottom: 28px;
}

.page-hero h1 {
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.page-hero p { color: #7a5f8e; font-size: 0.92rem; }

.legal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.15rem;
  color: var(--sakura-deep);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 92, 154, 0.15);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p, .legal-content li {
  font-size: 0.92rem;
  margin-bottom: 12px;
  text-align: justify;
}

.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

/* ===== 错误页 ===== */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sakura), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h1 { font-size: 1.4rem; margin: 16px 0 10px; }
.error-page p { color: #7a5f8e; margin-bottom: 24px; }

/* ===== 页脚 ===== */
.site-footer {
  background: linear-gradient(180deg, var(--night), #120a1a);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 28px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand img {
  width: 48px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.footer-brand p { font-size: 0.85rem; line-height: 1.7; }

.footer-col h4 {
  color: var(--sakura);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.85rem; }
.footer-col a:hover { color: var(--sakura); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .media-row, .combo-inner { grid-template-columns: 1fr; }
  .media-row.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mini-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 12px 16px 16px;
    border-bottom: 1px solid rgba(255, 92, 154, 0.18);
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }

  .header-cta { display: none; }

  .text-block { padding: 20px; }
  .legal-content { padding: 22px; }
}
