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

:root {
  --bg-primary: #000000;
  --bg-secondary: #0f0f2a;
  --bg-card: rgba(20, 20, 48, 0.7);
  --bg-code: rgba(0, 0, 0, 0.7);
  --border: #2a2a5a;
  --border-glow: #4a4aff33;
  --text-primary: #e8e8f0;
  --text-secondary: #9898c8;
  --text-muted: #6868a0;
  --accent-blue: #6c8cff;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --gradient-1: linear-gradient(135deg, #6c8cff, #a855f7);
  --gradient-2: linear-gradient(135deg, #a855f7, #ec4899);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Hero */
.hero-box {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 24px;
  min-height: 400px;
  overflow: hidden;
}

.hero-box::before,
.hero-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: inherit;
  animation: crossfade 10s ease-in-out infinite;
}

.hero-box::before {
  background-image: url('assets/header.png');
}

.hero-box::after {
  background-image: url('assets/header1.png');
  animation-delay: -5s;
}

@keyframes crossfade {
  0%, 42% { opacity: 1; }
  50%, 92% { opacity: 0; }
  100%     { opacity: 1; }
}

.hero-tagline {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.5rem 0 6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(168, 85, 247, 0.25);
  color: var(--text-primary);
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.btn-secondary:hover {
  background: rgba(168, 85, 247, 0.35);
  border-color: var(--accent-purple);
}

/* Main content */
.container {
  max-width: 960px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Features section with icons */
.features-section {
  padding: 1.5rem 2.5rem 2.5rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: 0.15em;
  margin-top: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.section-icon {
  display: block;
  max-width: 240px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  mask-image: radial-gradient(ellipse 60% 60% at center, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at center, black 20%, transparent 80%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--accent-blue);
}

.feature-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--accent-blue);
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* CLI section */
.cli-section {
  padding: 3rem 0 4rem;
  margin-top: 4rem;
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  white-space: pre;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
}

.code-block .prompt {
  color: var(--text-muted);
}

.code-block .prompt::before {
  content: '$ ';
  color: var(--accent-purple);
}

.code-block .output {
  color: var(--text-secondary);
}

.code-block .highlight {
  color: var(--accent-orange);
}

/* Quick start section */
.quickstart-section {
  padding: 3rem 0 4rem;
}

.install-box {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.install-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.install-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre;
  color: var(--text-primary);
}

.crystal-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  white-space: pre;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.crystal-block .kw { color: var(--accent-purple); font-weight: 500; }
.crystal-block .str { color: #34d399; }
.crystal-block .cmt { color: var(--text-muted); font-style: italic; }
.crystal-block .type { color: var(--accent-blue); }
.crystal-block .sym { color: var(--accent-orange); }

/* Providers */
.providers-section {
  padding: 3rem 0 4rem;
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.provider-card:hover {
  border-color: var(--accent-purple);
}

.provider-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.provider-name a {
  color: var(--text-primary);
  text-decoration: none;
}

.provider-name a:hover {
  color: var(--accent-blue);
}

.provider-models {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* Footer */
.footer {
  padding: 3rem 0 6rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-blue);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Particles */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (max-width: 640px) {
  .hero-box {
    padding: 3rem 1.5rem 2rem;
    min-height: 200px;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .code-block,
  .crystal-block {
    font-size: 0.78rem;
    padding: 1rem;
  }
}
