/* 杏吧APP官网 - 全局样式 */
:root {
  --bg-dark: #0d0b14;
  --bg-card: #1a1528;
  --bg-card-hover: #221c35;
  --primary: #ff6b35;
  --secondary: #e84393;
  --accent: #a855f7;
  --text: #f0eef5;
  --text-muted: #9b93ad;
  --border: #2d2640;
  --gradient: linear-gradient(135deg, #ff6b35 0%, #e84393 50%, #a855f7 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --header-h: 72px;
}

*, *::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); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary); }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 11, 20, 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);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
}

.logo img { width: 42px; height: 42px; border-radius: 10px; }

.nav-main { display: flex; gap: 28px; list-style: none; }
.nav-main a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.nav-main a:hover, .nav-main a.active { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Hero */
.hero {
  padding: calc(var(--header-h) + 60px) 0 80px;
  background: radial-gradient(ellipse at 30% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(232, 67, 147, 0.1) 0%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.25;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 32px; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }

.badge {
  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-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(232, 67, 147, 0.4);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(232, 67, 147, 0.5); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-card); }

.section-header { text-align: center; margin-bottom: 48px; }

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* 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;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feature-card .icon { font-size: 2rem; margin-bottom: 16px; }

.feature-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; }

/* Category Showcase */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 9/16;
  max-height: 360px;
}

.category-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.category-item:hover img { transform: scale(1.05); }

.category-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-weight: 600;
  font-size: 0.95rem;
}

/* Content blocks */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.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-text h3 { font-size: 1.5rem; margin-bottom: 16px; color: var(--primary); }
.content-text p { color: var(--text-muted); margin-bottom: 12px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.step {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-num {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.step h4 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.9rem; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  padding: 18px 24px;
  background: var(--bg-card);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after { content: "+"; font-size: 1.3rem; color: var(--primary); }
.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-a { padding: 0 24px 18px; max-height: 300px; }

/* Article / Legal pages */
.page-hero {
  padding: calc(var(--header-h) + 48px) 0 40px;
  text-align: center;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 { font-size: 2.2rem; margin-bottom: 8px; }
.page-hero .meta { color: var(--text-muted); font-size: 0.9rem; }

.article {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.article h2 { font-size: 1.4rem; margin: 32px 0 16px; color: var(--primary); }
.article h3 { font-size: 1.15rem; margin: 24px 0 12px; }
.article p, .article li { color: var(--text-muted); margin-bottom: 12px; }
.article ul, .article ol { padding-left: 24px; margin-bottom: 16px; }

/* Error pages */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 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;
}

.error-page h1 { font-size: 1.8rem; margin: 16px 0; }
.error-page p { color: var(--text-muted); margin-bottom: 32px; }

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; }

.footer-col h4 { font-size: 0.95rem; margin-bottom: 16px; }
.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); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 8px; }

/* Internal links highlight */
.inline-links { margin: 20px 0; }
.inline-links a {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 4px 12px;
  background: var(--bg-card);
  border-radius: 16px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-main.open { display: flex; }
  .nav-toggle { display: block; }

  .hero-grid, .content-block { grid-template-columns: 1fr; }
  .content-block.reverse { direction: ltr; }
  .hero h1 { font-size: 1.9rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
