* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --text: #e5e5e5;
  --text-muted: #888;
  --border: #333;
  --success: #22c55e;
  --warning: #eab308;
}

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

/* 导航 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* 主内容 */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero 区域 */
.hero {
  padding: 8rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.feature .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

.feature h3 {
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cta-button {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s, transform 0.2s;
}

.cta-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Section */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* 步骤 */
.step {
  margin-bottom: 2rem;
}

.step h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.step p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* 代码块 */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
}

.code-header span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.code-header button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.85rem;
}

.code-block pre {
  padding: 1rem;
  overflow-x: auto;
}

.code-block code {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* API 端点 */
.api-endpoint {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.method {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.method.get {
  background: #22c55e20;
  color: #22c55e;
}

.method.post {
  background: #6366f120;
  color: #6366f1;
}

.api-endpoint p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.api-endpoint h4 {
  margin: 1rem 0 0.5rem;
}

.api-endpoint table {
  width: 100%;
  border-collapse: collapse;
}

.api-endpoint th,
.api-endpoint td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.api-endpoint th {
  color: var(--text-muted);
  font-weight: normal;
}

.api-endpoint code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* 定价 */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.pricing-card.free {
  border-color: var(--primary);
  position: relative;
}

.pricing-card.free::after {
  content: '推荐';
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.pricing-card h3 {
  margin-bottom: 1rem;
}

.price {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.price span {
  font-size: 1rem;
  color: var(--text-muted);
}

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

.pricing-card li {
  padding: 0.5rem 0;
  color: var(--text-muted);
}

.btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn:disabled {
  background: var(--border);
  cursor: not-allowed;
}

/* FAQ */
.faq details {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.faq summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: bold;
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq details p {
  padding: 1rem 1.5rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

/* 响应式 */
@media (max-width: 768px) {
  .features,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
}
