/* 杏吧原创官网平台 - 全局样式 */
:root {
  --bg-primary: #0d0d16;
  --bg-secondary: #16162a;
  --bg-card: #1e1e35;
  --accent: #ff2d55;
  --accent-hover: #ff4d6d;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --gold: #f5a623;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --border: #2a2a45;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --max-width: 1200px;
  --header-height: 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-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--purple-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: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13,13,22,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-height);
  position: relative;
}

.header-inner nav {
  margin-left: auto;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.logo-link img { width: 40px; height: 40px; border-radius: 8px; }

.nav-main {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-main a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; white-space: nowrap; }
.nav-main a:hover, .nav-main a.active { color: var(--accent); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* 主内容区顶部留白，避免被固定导航遮挡 */
main,
.error-page {
  padding-top: var(--header-height);
}

body.xb-has-ads main,
body.xb-has-ads .error-page {
  padding-top: calc(var(--header-height) + var(--ads-height, 90px));
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #0d0d16 0%, #1a1035 50%, #0d0d16 100%);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(139,92,246,0.15);
  color: var(--purple-light);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  border: 1px solid rgba(139,92,246,0.3);
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.3;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 32px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff6b35);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,45,85,0.4); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple-light); }

/* Sections */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-secondary); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}
.section-header p { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

.section-label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.feature-card-img {
  aspect-ratio: 9/16;
  max-height: 320px;
  object-fit: cover;
  object-position: top;
  width: 100%;
}

.feature-card-body { padding: 20px; }
.feature-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card-body p { color: var(--text-secondary); font-size: 0.9rem; }

/* Content Block */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  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);
}

.content-block h3 { font-size: 1.4rem; margin-bottom: 16px; color: var(--purple-light); }
.content-block p { color: var(--text-secondary); margin-bottom: 12px; }

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 48px 0;
}
.stat-item {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.stat-num { font-size: 2rem; font-weight: 700; color: var(--gold); }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* Category Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag {
  background: rgba(139,92,246,0.12);
  color: var(--purple-light);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  border: 1px solid rgba(139,92,246,0.2);
}

/* Article / Legal */
.article-page { padding: 48px 0 80px; }
.article-page h1 { font-size: 2rem; margin-bottom: 8px; }
.article-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.article-content h2 { font-size: 1.3rem; margin: 32px 0 12px; color: var(--purple-light); }
.article-content h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.article-content p { color: var(--text-secondary); margin-bottom: 16px; }
.article-content ul, .article-content ol { color: var(--text-secondary); margin: 0 0 16px 24px; }
.article-content li { margin-bottom: 8px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: "+"; color: var(--accent); font-size: 1.2rem; }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-secondary); }

/* Internal Links */
.internal-links {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}
.internal-links h4 { margin-bottom: 12px; font-size: 1rem; }
.internal-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.internal-links a {
  background: var(--bg-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 12px; max-width: 300px; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 16px; color: var(--text-primary); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Error Pages */
.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; color: var(--accent); line-height: 1; }
.error-title { font-size: 1.5rem; margin: 16px 0 8px; }
.error-desc { color: var(--text-secondary); margin-bottom: 24px; }

/* Responsive */
@media (max-width: 992px) {
  .content-block { grid-template-columns: 1fr; gap: 24px; }
  .content-block.reverse { direction: ltr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; margin-left: auto; }
  .site-header {
    height: var(--header-height);
  }
  .header-inner {
    height: var(--header-height);
    position: static;
  }
  .header-inner nav {
    margin-left: auto;
    width: auto;
    order: unset;
  }
  .nav-main {
    display: none;
  }
  .nav-main.open {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 1002;
  }
  .nav-main li { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .hero { padding: 48px 0 40px; }
  .section { padding: 40px 0; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}
