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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a2e;
  --bg-terminal: #0d1117;
  --text: #e4e4e7;
  --text-dim: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --yellow: #eab308;
  --cyan: #22d3ee;
  --red: #ef4444;
  --border: #27272a;
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Fira Code', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__badge {
  background: var(--accent);
  color: white !important;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-glow), transparent),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(34, 211, 238, 0.05), transparent);
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 700px;
}

.hero__badge {
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero__accent {
  background: linear-gradient(135deg, var(--accent-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 550px;
  margin: 0 auto 32px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero__install {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 28px;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero__install code {
  background: none;
  padding: 0;
  font-size: 0.95rem;
  color: var(--cyan);
}

.hero__copy {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  transition: background 0.2s;
}

.hero__copy:hover {
  background: var(--accent-light);
}

.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

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

.btn--primary:hover {
  background: var(--accent-light);
  color: white;
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* === Terminal Demo === */
.demo {
  padding: 0 24px 100px;
}

.terminal {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.terminal__body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text);
}

.t-blue { color: #60a5fa; }
.t-cyan { color: var(--cyan); }
.t-green { color: var(--green); }
.t-yellow { color: var(--yellow); }
.t-red { color: var(--red); }
.t-dim { color: var(--text-dim); }
.t-bold { font-weight: 600; color: #fff; }

/* === Section Title === */
.section__title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

/* === Features === */
.features {
  padding: 100px 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s;
}

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

.feature-card__icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* === Libraries === */
.libraries {
  padding: 80px 0;
}

.libraries__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.lib-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.lib-tag:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.lib-tag--plus {
  border-color: var(--accent);
  color: var(--accent-light);
  border-style: dashed;
}

/* === Usage === */
.usage {
  padding: 80px 0 100px;
}

.usage__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.usage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.usage-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent-light);
}

.usage-card pre {
  background: var(--bg-terminal);
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
}

.usage-card code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--cyan);
}

/* === Options === */
.options {
  padding: 80px 0;
}

.subsection__title {
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--accent-light);
  margin: 32px 0 12px;
}

.subsection__title:first-of-type {
  margin-top: 0;
}

.options__desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td code {
  font-size: 0.85rem;
}

/* === Config === */
.config {
  padding: 80px 0;
}

.config__desc {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.config__fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.config-field {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
}

.config-field code {
  font-size: 0.85rem;
  color: var(--accent-light);
  white-space: nowrap;
}

.config-field span {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* === JSON Export === */
.json-export {
  padding: 80px 0;
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__links a {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer__links a:hover {
  color: var(--text);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav__links a:not(.nav__badge) {
    display: none;
  }

  .hero__title {
    font-size: 2.2rem;
  }

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

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

  .hero__install {
    flex-direction: column;
    gap: 8px;
  }

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

  .footer__inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
