/* =============================================
   小叶助手 - Landing Page Styles
   ============================================= */

/* --- CSS Variables --- */
:root {
  --bg: #0f1117;
  --bg-card: #161822;
  --bg-card-hover: #1c1f2e;
  --bg-alt: #12141e;
  --border: #252836;
  --text: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-muted: #6b7280;
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.2);
  --green: #10b981;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --max-width: 1100px;
}

/* --- Reset --- */
*, *::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.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ====== 导航 ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}
.nav-logo { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  background: var(--accent);
  color: #1a1a1a;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-nav:hover { background: #fbbf24; transform: translateY(-1px); }

/* ====== Hero ====== */
.hero {
  position: relative;
  padding: 120px 24px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { flex: 1; position: relative; z-index: 1; }
.hero-visual { flex: 1; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.h1-sub {
  display: block;
  font-size: 22px;
  font-weight: 500;
  background: var(--text-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 4px;
}
.hero-subtitle {
  font-size: 22px;
  color: var(--text-secondary);
  margin-top: 8px;
}
.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(245, 158, 11, 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-card-hover);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero visual - mock screenshot */
.hero-screenshot {
  position: relative;
  transform: perspective(1000px) rotateY(-5deg) rotateX(3deg);
}
.screenshot-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.win-dots {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: #1a1d2b;
  border-bottom: 1px solid var(--border);
}
.win-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #3a3d4a;
}
.win-dots span:nth-child(1) { background: #ef4444; }
.win-dots span:nth-child(2) { background: #f59e0b; }
.win-dots span:nth-child(3) { background: #10b981; }

.screenshot-body { padding: 20px 16px; }
.mock-sidebar { display: flex; flex-direction: column; gap: 8px; }
.mock-item {
  background: rgba(255,255,255,0.04);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.mock-item.active {
  background: var(--accent-glow);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent);
}

/* ====== Sections ====== */
.section {
  padding: 80px 24px;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
}
.section-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 16px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ====== Feature Cards ====== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 10px; }
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.feature-tags span {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ====== API Cards ====== */
.api-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.api-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
}
.api-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.api-icon { font-size: 32px; margin-bottom: 12px; }
.api-card h4 { font-size: 15px; margin-bottom: 8px; }
.api-quota {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.api-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--transition);
}
.api-link:hover { color: #fbbf24; }
.api-link.disabled {
  color: var(--text-muted);
  cursor: default;
}

/* ====== Compare Table ====== */
.compare-table-wrap {
  overflow-x: auto;
  margin-top: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: var(--bg-card);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}
.compare-table th.highlight-col {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}

.td-pass { color: var(--green); font-weight: 500; }
.td-fail { color: var(--red); }
.td-warn { color: #fbbf24; }

/* ====== Shortcuts ====== */
.shortcut-grid {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.shortcut-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
}

.kbd-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

kbd {
  background: #2a2d3a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 0 #1a1d2b;
}

.shortcut-icon {
  font-size: 28px;
}
.shortcut-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ====== Steps ====== */
.steps {
  display: flex;
  gap: 24px;
  margin-top: 48px;
}

.step {
  flex: 1;
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.step:hover { border-color: var(--accent); }

.step-num {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}
.step-content h4 {
  font-size: 16px;
  margin-bottom: 6px;
}
.step-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.step-content code {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
}

/* ====== CTA ====== */
.cta-section {
  text-align: center;
  margin-top: 56px;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cta-section h3 {
  font-size: 26px;
  margin-bottom: 8px;
}
.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

/* ====== FAQ ====== */
.faq-list {
  max-width: 720px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.faq-item[open] {
  border-color: var(--accent);
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}
.faq-item summary::after {
  content: '+';
  font-size: 18px;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  content: '−';
  color: var(--accent);
}
.faq-item p {
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====== 欢迎建议 ====== */
.suggestion-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.suggestion-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  min-width: 180px;
}

.suggestion-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.12);
}

.suggestion-icon {
  font-size: 36px;
}

.suggestion-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.suggestion-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ====== Sponsor CTA ====== */
.sponsor-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 560px;
  margin: 0 auto;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sponsor-cta:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 28px rgba(245, 158, 11, 0.12);
}
.sponsor-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
  animation: milkFloat 3s ease-in-out infinite;
}
@keyframes milkFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.sponsor-text h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.sponsor-text p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}
@media (max-width: 500px) {
  .sponsor-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* ====== Footer ====== */
.footer {
  padding: 48px 24px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}
.footer-logo { width: 28px; height: 28px; }
.footer-desc {
  color: var(--text-muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #1a1a1a;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.toast.show { opacity: 1; }

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero {
    flex-direction: column;
    padding: 100px 20px 48px;
    text-align: center;
  }
  .hero h1 { font-size: 40px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-screenshot {
    transform: none;
    max-width: 340px;
    margin: 0 auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .api-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    flex-direction: column;
  }

  .shortcut-grid {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .api-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Scroll reveal (JS only, crawlers see normal content) --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
