/* ===== Reset & Variables ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-soft: #eef2ff;
  --accent: #06b6d4;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --success: #10b981;
  --warning: #f59e0b;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ===== Navigation ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.nav-logo-icon { font-size: 1.4rem; }
.nav-logo-text { font-size: 1.05rem; font-weight: 700; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.45rem 1.15rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem 2rem 4rem;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg-shapes::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
}

.hero-bg-shapes::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06), transparent 70%);
}

.hero-content {
  max-width: 800px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 4rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stat {
  flex: 1;
  text-align: center;
  padding: 1.5rem 1rem;
}

.hero-stat:not(:last-child) {
  border-right: 1px solid var(--border);
}

.hero-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.hero-stat-value .unit {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Sections ===== */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ===== Models Grid ===== */
.models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.25s;
}

.model-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.model-card-icon {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
}

.model-card-icon img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
}

.model-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.model-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Pricing ===== */
.pricing-section {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  padding: 5rem 2rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}

.pricing-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
}

.pricing-card.popular::before {
  content: '🔥 最受欢迎';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.pricing-price {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.pricing-price .currency { font-size: 1.1rem; vertical-align: super; }

.pricing-original {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-bottom: 1.25rem;
}

.pricing-tokens {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: var(--primary-soft);
  border-radius: 8px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 0.75rem;
}

.pricing-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.25s;
}

.pricing-btn-primary {
  background: var(--primary);
  color: white;
}

.pricing-btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pricing-btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.pricing-btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== Subscription ===== */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.sub-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
}

.sub-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.sub-card.recommended {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.12);
}

.sub-card.recommended::before {
  content: '⭐ 推荐';
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.sub-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--primary-soft);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.sub-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.sub-price {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.sub-price .currency { font-size: 0.9rem; vertical-align: super; }

.sub-period {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.sub-tokens {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding: 0.65rem;
  background: rgba(6, 182, 212, 0.06);
  border-radius: 8px;
}

.sub-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.sub-features li {
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* ===== API Compat ===== */
.api-section {
  background: var(--bg-soft);
  padding: 5rem 2rem;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.api-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.25s;
}

.api-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.api-card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.api-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.35rem; }
.api-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ===== Steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card { text-align: center; }

.step-number {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 1rem;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

.code-block {
  max-width: 560px;
  margin: 2rem auto 0;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.code-block .prompt { color: var(--primary); font-weight: 600; }
.code-block .url { color: var(--success); }
.code-block .comment { color: var(--text-muted); }

/* ===== Footer ===== */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem 1.5rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.5s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .sub-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .api-grid { grid-template-columns: repeat(2, 1fr); }
  .models-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
  .sub-grid { grid-template-columns: 1fr; max-width: 400px; }
  .features-grid { grid-template-columns: 1fr; }
  .api-grid { grid-template-columns: repeat(2, 1fr); }
  .models-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 0; }
  .hero-stat:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-content { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* ===== Logo Fallback ===== */
.logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
  font-family: Arial, sans-serif;
}
