/* 小蓝APP官网 - 全局样式 */
:root {
  --primary: #1a8cff;
  --primary-dark: #0d6fd4;
  --accent: #ff6b35;
  --bg: #f5f8fc;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a6270;
  --border: #e8edf3;
  --shadow: 0 4px 24px rgba(26, 140, 255, 0.08);
  --radius: 12px;
  --max-width: 1200px;
}

*, *::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);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.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; }

.main-nav { display: flex; gap: 28px; list-style: none; }
.main-nav a { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #e8f4ff 0%, #f0f7ff 50%, #fff 100%);
  padding: 60px 0 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(26, 140, 255, 0.1);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(26, 140, 255, 0.35);
}

.btn-outline {
  background: var(--card);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.hero-phone {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 280px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border: 6px solid #1a1a2e;
}

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--card); }

.section-header { text-align: center; margin-bottom: 48px; }

.section-header h2 {
  font-size: 1.9rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.feature-card:hover { transform: translateY(-4px); }

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #e8f4ff, #d0e8ff);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Content blocks */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.content-block:last-child { margin-bottom: 0; }
.content-block.reverse { direction: rtl; }
.content-block.reverse > * { direction: ltr; }

.content-block h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text);
}

.content-block p {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.content-block ul {
  margin: 16px 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.content-block li { margin-bottom: 8px; }

.screenshot-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.screenshot-wrap img { width: 100%; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.gallery-item:hover { transform: scale(1.02); }

.gallery-item figcaption {
  padding: 12px;
  background: var(--card);
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-muted);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--primary);
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer { max-height: 300px; }

/* Article pages */
.page-hero {
  background: linear-gradient(135deg, #e8f4ff, #fff);
  padding: 48px 0;
  text-align: center;
}

.page-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); }

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

.article-content h2 {
  font-size: 1.35rem;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-content h3 { font-size: 1.1rem; margin: 24px 0 12px; }

.article-content p, .article-content li {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-content ul, .article-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

/* 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(--primary);
  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: #1a1a2e;
  color: #a0a8b8;
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img { width: 48px; border-radius: 10px; margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; }

.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #a0a8b8; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 8px; }

/* Internal links box */
.internal-links {
  background: #e8f4ff;
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.internal-links h3 { font-size: 1rem; margin-bottom: 12px; }
.internal-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.internal-links a {
  background: var(--card);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

/* Ads bar - fixed below header */
.ads-bar {
  position: sticky;
  top: 64px;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
}

.ads-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  background: transparent;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg, #fff, #fff);
}

#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}

#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.18);
}

#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #666;
  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(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .main-nav.open { display: flex; }
  .main-nav li { padding: 12px 0; border-bottom: 1px solid var(--border); }

  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-phone { order: -1; }
  .phone-frame { width: 220px; }

  .content-block, .content-block.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
