/* picac.cyou — 哔咔官方APP品牌站 · 绯夜流萤二次元风 */
:root {
  --wine: #140c18;
  --wine-mid: #22142a;
  --wine-soft: #2e1a38;
  --ember: #ff6b4a;
  --flame: #ff2d6f;
  --haze: #d4a8ff;
  --mint: #3ee8c5;
  --gold: #ffc14a;
  --cream: #fff8f5;
  --pearl: #f3ecff;
  --ink: #1a1020;
  --ink-soft: #6e5a7a;
  --panel: rgba(255, 248, 245, 0.04);
  --glass: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 107, 74, 0.22);
  --shadow: 0 16px 48px rgba(255, 45, 111, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --nav-h: 66px;
  --sticky-ads-h: 0px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "STKaiti", "KaiTi", "PingFang SC", 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(--wine);
  color: var(--pearl);
  line-height: 1.92;
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + var(--sticky-ads-h));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 42% at 8% 5%, rgba(255, 107, 74, 0.2), transparent 58%),
    radial-gradient(ellipse 50% 38% at 92% 12%, rgba(212, 168, 255, 0.16), transparent 52%),
    radial-gradient(ellipse 45% 32% at 48% 98%, rgba(62, 232, 197, 0.1), transparent 48%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(125deg, rgba(255, 45, 111, 0.03) 1px, transparent 1px),
    linear-gradient(55deg, rgba(212, 168, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--ember); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--mint); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  background: rgba(20, 12, 24, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.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(--pearl);
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid rgba(255, 107, 74, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.05rem; color: var(--cream); letter-spacing: 0.04em; }
.brand-text span { font-size: 0.68rem; color: var(--haze); opacity: 0.85; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 7px 12px;
  font-size: 0.88rem;
  color: var(--pearl);
  border-radius: 999px;
  opacity: 0.82;
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
  color: var(--cream);
  background: rgba(255, 107, 74, 0.14);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 1.3rem;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--ember), var(--flame));
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 999px;
  border: none;
  box-shadow: 0 6px 22px rgba(255, 45, 111, 0.35);
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 45, 111, 0.45);
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ember);
  color: var(--ember) !important;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 107, 74, 0.1);
  color: var(--mint) !important;
}

.nav-btn { flex-shrink: 0; }

/* Ads */
.ads-block {
  position: relative;
  z-index: 2;
  padding: 14px 0 6px;
  background: linear-gradient(180deg, rgba(255, 107, 74, 0.06), transparent);
  border-bottom: 1px solid rgba(255, 107, 74, 0.1);
}

#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;
  box-sizing: border-box;
}

#ads img, #sticky-ads img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(255, 107, 74, 0.2);
}

#ads a, #sticky-ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 16px;
}

#ads img:hover, #sticky-ads img:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 24px rgba(255, 45, 111, 0.3);
}

#ads figcaption, #sticky-ads figcaption,
#ads .caption, #sticky-ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

.sticky-ads-wrap {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 1150;
  background: rgba(20, 12, 24, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}

.sticky-ads-wrap.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-ads-inner { max-width: 1080px; margin: 0 auto; padding: 0 12px; }

/* Main */
.page-main { position: relative; z-index: 1; padding-bottom: 60px; }

/* Hero */
.hero {
  padding: 48px 0 36px;
  text-align: center;
}

.hero-ribbon {
  display: inline-block;
  padding: 5px 18px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid rgba(62, 232, 197, 0.35);
  border-radius: 4px;
  margin-bottom: 18px;
  background: rgba(62, 232, 197, 0.06);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.8vw, 2.35rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.35;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(255, 45, 111, 0.25);
}

.hero-lead {
  font-size: 1rem;
  color: rgba(243, 236, 255, 0.88);
  max-width: 820px;
  margin: 0 auto 28px;
  text-align: left;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Sections */
.section {
  padding: 40px 0;
  border-top: 1px solid rgba(212, 168, 255, 0.08);
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--ember);
  margin-bottom: 10px;
  font-weight: 600;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  color: var(--cream);
  margin-bottom: 18px;
  line-height: 1.4;
}

.section h3 {
  font-size: 1.1rem;
  color: var(--haze);
  margin: 22px 0 12px;
}

.section p {
  color: rgba(243, 236, 255, 0.86);
  margin-bottom: 14px;
  text-align: justify;
}

/* Module variants */
.module-text { margin-bottom: 28px; }

.module-image-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.module-image-text.reverse .media-wrap { order: -1; }

.media-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.media-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 55%, rgba(255, 45, 111, 0.15));
  pointer-events: none;
}

.media-caption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(255, 107, 74, 0.45);
  transform: translateY(-3px);
}

.feature-card .fc-tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 3px 10px;
  background: rgba(255, 45, 111, 0.15);
  color: var(--flame);
  border-radius: 999px;
  margin-bottom: 10px;
}

.feature-card h4 {
  font-size: 1rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  margin: 0;
  text-align: left;
}

.module-card-image {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.highlight-panel {
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.1), rgba(212, 168, 255, 0.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 28px 0;
}

.highlight-panel h3 { margin-top: 0; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 24px 0;
}

.stat-item {
  flex: 1 1 140px;
  text-align: center;
  padding: 18px 12px;
  background: var(--panel);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 168, 255, 0.12);
}

.stat-item strong {
  display: block;
  font-size: 1.5rem;
  color: var(--ember);
  font-family: var(--font-display);
}

.stat-item span { font-size: 0.82rem; color: var(--ink-soft); }

/* Breadcrumb */
.breadcrumb {
  padding: 20px 0 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.breadcrumb a { color: var(--haze); }
.breadcrumb a:hover { color: var(--ember); }

/* Sub pages */
.page-hero {
  padding: 24px 0 32px;
  border-bottom: 1px solid rgba(212, 168, 255, 0.1);
  margin-bottom: 32px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--cream);
  margin-bottom: 12px;
}

.page-hero p { color: rgba(243, 236, 255, 0.82); }

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  margin: 32px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--ember);
}

.legal-content h3 {
  font-size: 1.02rem;
  color: var(--haze);
  margin: 22px 0 10px;
}

.legal-content p,
.legal-content li {
  color: rgba(243, 236, 255, 0.84);
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  background: rgba(10, 6, 14, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 10px;
  max-width: 360px;
}

.footer-links h4 {
  font-size: 0.9rem;
  color: var(--cream);
  margin-bottom: 10px;
}

.footer-links a {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 4px 0;
}

.footer-links a:hover { color: var(--ember); }

.footer-bottom {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(110, 90, 122, 0.8);
  padding-top: 20px;
  border-top: 1px solid rgba(212, 168, 255, 0.08);
}

/* Error pages */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 7rem);
  background: linear-gradient(135deg, var(--ember), var(--flame));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 12px;
}

.error-page h1 { font-size: 1.4rem; color: var(--cream); margin-bottom: 12px; }
.error-page p { color: var(--ink-soft); margin-bottom: 24px; }

/* Responsive */
@media (min-width: 768px) {
  .module-image-text {
    grid-template-columns: 0.35fr 0.65fr;
    gap: 32px;
  }

  .module-image-text.reverse {
    grid-template-columns: 0.65fr 0.35fr;
  }

  .module-card-image {
    grid-template-columns: 0.32fr 0.68fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 900px) {
  #ads > div, #sticky-ads > div {
    width: calc(25% - 6px);
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(20, 12, 24, 0.98);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a { width: 100%; text-align: center; padding: 12px; }

  .nav-btn { display: none; }

  .hero { padding: 32px 0 24px; }

  .section { padding: 28px 0; }
}

@media (min-width: 901px) {
  #ads > div, #sticky-ads > div {
    width: calc(12.5% - 6px);
  }
}
