/* 杏吧官网 - xbs.homes 全局样式 */
:root {
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --primary: #e94560;
  --primary-light: #ff6b8a;
  --accent: #f5a623;
  --accent-purple: #9b59b6;
  --text: #e8e8f0;
  --text-muted: #9898b0;
  --border: #2a2a45;
  --gradient: linear-gradient(135deg, #e94560 0%, #9b59b6 50%, #f5a623 100%);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --max-width: 1200px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-link img { width: 40px; height: 40px; border-radius: 10px; }

.nav-main { display: flex; gap: 8px; list-style: none; }

.nav-main a {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--text);
  background: var(--bg-card);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Hero */
.hero {
  padding: 60px 0 40px;
  background: radial-gradient(ellipse at 50% 0%, rgba(233, 69, 96, 0.15) 0%, transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 24px; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4); color: #fff; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary-light);
}

.btn-outline:hover { background: rgba(233, 69, 96, 0.1); color: var(--primary-light); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Sections */
.section { padding: 50px 0; }

.section-alt { background: var(--bg-card); }

.section-header { text-align: center; margin-bottom: 40px; }

.section-header h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
  color: var(--text);
}

.section-header p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }

.section-header .anchor-link { font-size: 0.85rem; }

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s;
}

.section-alt .feature-card { background: var(--bg-dark); }

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--primary-light);
}

.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Image Grid */
.img-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.img-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.2s;
}

.img-card:hover { transform: scale(1.03); }

.img-card figcaption {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Content Block */
.content-block { max-width: 860px; margin: 0 auto; }

.content-block h2 {
  font-size: 1.5rem;
  margin: 36px 0 16px;
  color: var(--primary-light);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.content-block h3 { font-size: 1.2rem; margin: 24px 0 12px; color: var(--text); }

.content-block p { margin-bottom: 16px; color: var(--text-muted); }

.content-block ul, .content-block ol {
  margin: 0 0 16px 24px;
  color: var(--text-muted);
}

.content-block li { margin-bottom: 8px; }

.content-block .highlight-box {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.two-col img { border-radius: var(--radius); border: 1px solid var(--border); }

/* FAQ */
.faq-list { max-width: 860px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--primary); }

.faq-item[open] summary::after { content: "−"; }

.faq-item .faq-answer {
  padding: 0 24px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Page Header (sub pages) */
.page-header {
  padding: 48px 0 32px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(155, 89, 182, 0.12) 0%, transparent 60%);
}

.page-header h1 { font-size: 2rem; margin-bottom: 8px; }

.page-header .breadcrumb {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page-header .breadcrumb a { color: var(--text-muted); }
.page-header .breadcrumb a:hover { color: var(--primary-light); }

.page-content { padding: 40px 0 60px; }

.page-content .content-block h2:first-child { margin-top: 0; }

/* Error Pages */
.error-page {
  min-height: calc(100vh - var(--header-h) - 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(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h1 { font-size: 1.5rem; margin-bottom: 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 24px; }

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand img { width: 48px; border-radius: 10px; margin-bottom: 12px; }

.footer-brand p { color: var(--text-muted); font-size: 0.9rem; }

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 8px; }

.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--primary-light); }

/* TOC */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.toc h3 { font-size: 1rem; margin-bottom: 12px; color: var(--text); }

.toc ol { margin-left: 20px; color: var(--text-muted); }

.toc li { margin-bottom: 6px; }

/* Responsive */
@media (max-width: 992px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .img-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-main.open { display: flex; }

  .nav-main a { padding: 12px 16px; }

  .hero h1 { font-size: 1.6rem; }
  .hero { padding: 40px 0 30px; }

  .feature-grid { grid-template-columns: 1fr; }
  .img-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }

  .section { padding: 36px 0; }
  .section-header h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .img-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; width: 100%; }
}
