/* 杏吧官网 - 全局样式 */
:root {
  --primary: #e84393;
  --primary-dark: #c0357a;
  --accent: #fd79a8;
  --bg-dark: #1a1a2e;
  --bg-card: #16213e;
  --bg-section: #0f3460;
  --text: #eaeaea;
  --text-muted: #a0a0b0;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --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;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26,26,46,0.95);
  backdrop-filter: blur(10px);
  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: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.logo img { width: 36px; height: 36px; border-radius: 8px; }

.nav-desktop {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-desktop a:hover,
.nav-desktop a.active { color: var(--accent); }

.menu-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-h);
  left: 0;
  right: 0;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  z-index: 999;
}

.nav-mobile.open { display: block; }

.nav-mobile ul { list-style: none; }

.nav-mobile li { border-bottom: 1px solid var(--border); }

.nav-mobile a {
  display: block;
  padding: 14px 0;
  color: var(--text);
  font-size: 1rem;
}

/* Hero */
.hero {
  padding: 60px 0 50px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-section) 100%);
}

.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: linear-gradient(90deg, var(--accent), var(--primary));
  -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-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.tag {
  background: rgba(232,67,147,0.15);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid rgba(232,67,147,0.3);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(232,67,147,0.4);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,67,147,0.5);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  margin-left: 12px;
}

.btn-outline:hover { background: rgba(253,121,168,0.1); color: var(--accent); }

.hero-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Sections */
section { padding: 56px 0; }

section:nth-child(even) { background: rgba(15,52,96,0.3); }

.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;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,67,147,0.3);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.feature-card p { color: var(--text-muted); font-size: 0.92rem; }

/* Content Grid with Images */
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: center;
}

.content-grid.reverse { direction: rtl; }
.content-grid.reverse > * { direction: ltr; }

.content-text h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  color: var(--accent);
}

.content-text p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.content-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 9/16;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-caption {
  padding: 10px;
  background: var(--bg-card);
  font-size: 0.82rem;
  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-card);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  margin: 0 auto 14px;
}

.step-item h4 { font-size: 1rem; margin-bottom: 8px; }
.step-item p { font-size: 0.85rem; color: var(--text-muted); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-q {
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after { content: "+"; font-size: 1.2rem; color: var(--accent); }
.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
  padding: 0 22px 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  display: none;
}

.faq-item.open .faq-a { display: block; }

/* Internal Links */
.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.internal-links a {
  background: var(--bg-card);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.internal-links a:hover {
  border-color: var(--primary);
  color: var(--accent);
}

/* Page Content (legal pages) */
.page-hero {
  padding: 48px 0 32px;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-section));
  text-align: center;
}

.page-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.page-hero p { color: var(--text-muted); }

.page-content {
  padding: 40px 0 60px;
  max-width: 860px;
  margin: 0 auto;
}

.page-content h2 {
  font-size: 1.3rem;
  margin: 32px 0 14px;
  color: var(--accent);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.page-content h3 {
  font-size: 1.1rem;
  margin: 20px 0 10px;
  color: var(--text);
}

.page-content p, .page-content li {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.page-content ul, .page-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.page-content a { text-decoration: underline; }

.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* 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: linear-gradient(135deg, var(--accent), var(--primary));
  -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: 28px; }

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.6;
}

.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.88rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Article prose for homepage long content */
.prose { max-width: 900px; margin: 0 auto; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 12px; color: var(--accent); }
.prose p { color: var(--text-muted); margin-bottom: 14px; font-size: 0.95rem; text-align: justify; }
.prose ul { padding-left: 24px; margin-bottom: 16px; }
.prose li { color: var(--text-muted); margin-bottom: 8px; font-size: 0.95rem; }

/* Responsive */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img-wrap { order: -1; max-width: 360px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .content-grid.reverse { direction: ltr; }
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 1.6rem; }
  .btn-outline { margin-left: 0; margin-top: 10px; display: inline-block; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
}
