/* 杏吧官方平台 - xbvip.baby */
:root {
  --bg: #0f0f14;
  --bg-card: #1a1a24;
  --bg-elevated: #222230;
  --text: #e8e8f0;
  --text-muted: #9a9ab0;
  --accent: #e84393;
  --accent-2: #9b59b6;
  --accent-gradient: linear-gradient(135deg, #e84393, #9b59b6);
  --gold: #f0c040;
  --border: #2a2a3a;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --max-width: 1200px;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}

a:hover { color: #ff6bb3; }

h1, h2, h3, h4 {
  line-height: 1.35;
  margin-top: 0;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: .75rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
li { margin-bottom: .4rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,20,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-link img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-desktop {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  display: block;
  padding: 8px 14px;
  color: var(--text-muted);
  border-radius: 8px;
  font-size: .95rem;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--bg-elevated);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  z-index: 99;
}

.nav-mobile.open { display: block; }

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-mobile a {
  display: block;
  padding: 12px 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

/* Hero */
.hero {
  padding: 48px 0 40px;
  background: radial-gradient(ellipse at 30% 20%, rgba(155,89,182,.15), transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(232,67,147,.12), transparent 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .85rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232,67,147,.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.hero-phone {
  max-width: 280px;
  margin: 0 auto;
}

/* Sections */
.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s;
}

.feature-card:hover { border-color: var(--accent); }

.feature-card h3 { color: var(--accent); }

/* Content blocks with image */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 48px;
}

.content-block.reverse { direction: rtl; }
.content-block.reverse > * { direction: ltr; }

.content-block img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.screenshot-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s;
}

.screenshot-item:hover { transform: translateY(-4px); }

.screenshot-item img { aspect-ratio: 9/16; object-fit: cover; width: 100%; }

.screenshot-item figcaption {
  padding: 10px 12px;
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 12px;
}

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}

.faq-item h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.faq-item p {
  color: var(--text-muted);
  margin: 0;
  font-size: .95rem;
}

/* Quick links */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .85rem;
  color: var(--text-muted);
}

.quick-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Legal pages */
.legal-page {
  padding: 40px 0 60px;
}

.legal-page h1 { margin-bottom: 8px; }

.legal-meta {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 32px;
}

.legal-page h2 {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: 12px;
}

.footer-links h4 {
  font-size: .95rem;
  margin-bottom: 12px;
  color: var(--text);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  color: var(--text-muted);
  font-size: .9rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* TOC sidebar for long pages */
.with-toc {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.toc h4 {
  font-size: .9rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 0;
  font-size: .85rem;
  color: var(--text-muted);
}

.toc a:hover { color: var(--accent); }

/* 广告栏 - 固定于导航下方 */
.ads-bar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(26, 26, 36, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.has-ads-bar main {
  margin-top: 88px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  background: transparent;
  max-width: var(--max-width);
  margin: 0 auto;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  flex-shrink: 0;
  box-sizing: border-box;
}

#ads figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#ads a {
  display: block;
  width: 65px;
  height: 65px;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  line-height: 0;
  background: #fff;
}

#ads img {
  width: 65px;
  height: 65px;
  max-width: 65px;
  min-width: 65px;
  max-height: 65px;
  min-height: 65px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: #fff;
  flex-shrink: 0;
}

#ads a:hover img {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(232, 67, 147, 0.35);
}

#ads figcaption,
#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;
}

/* Responsive */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .screenshot-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .with-toc { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-phone { max-width: 240px; }
  .content-block { grid-template-columns: 1fr; }
  .content-block.reverse { direction: ltr; }
  .feature-grid { grid-template-columns: 1fr; }
  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
