/* x402 Guide — Dark theme, clean readable design */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a28;
  --bg-card-hover: #22223a;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #6868880;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --border: #2a2a3d;
  --green: #00d2a0;
  --link: #74b9ff;
  --max-width: 800px;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Header */
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-light);
  text-decoration: none;
}

.logo span {
  color: var(--text-secondary);
  font-weight: 400;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent-light);
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-light), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero .badge {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent-light);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Article list */
.articles-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.article-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.article-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.article-card h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-card .meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-card .tag {
  background: var(--accent-glow);
  color: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Article page */
.article-header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.article-header .meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.8rem;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-content a:hover {
  border-bottom-color: var(--link);
}

.article-content code {
  background: var(--bg-card);
  color: var(--green);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.article-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.article-content blockquote p {
  color: var(--text-primary);
  margin-bottom: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.article-content th, .article-content td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-content th {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--bg-card);
}

.article-content td {
  color: var(--text-secondary);
}

/* CTA box */
.cta-box {
  background: linear-gradient(135deg, var(--bg-card), var(--accent-glow));
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 3rem 0 2rem;
}

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

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.cta-box a.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.cta-box a.btn:hover {
  background: var(--accent-light);
}

/* Footer */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* Related articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 640px) {
  html { font-size: 15px; }
  .hero h1 { font-size: 1.8rem; }
  main { padding: 1rem; }
  header { padding: 1rem; }
  .article-header h1 { font-size: 1.5rem; }
}
