/* ── Reset & Base ──────────────────────────── */

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

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-code: #0d0d14;
  --surface: #16161e;
  --border: #1e1e2e;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --cyan: #22d3ee;
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }

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

/* ── Navbar ────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Accent Helpers ────────────────────────── */

.accent {
  color: var(--accent-light);
}

.accent-link {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.accent-link:hover {
  color: var(--cyan);
}

/* ── Badges ────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
}

.badge-accent {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ── Buttons ───────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 0 32px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ── Hero ──────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-featured {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

/* ── Sections ──────────────────────────────── */

.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--surface);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
  max-width: 620px;
}

/* ── Tool Cards Grid ───────────────────────── */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.tool-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  overflow: hidden;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px var(--accent-glow);
}

.tool-card-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: -80px;
  right: -80px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover .tool-card-glow {
  opacity: 1;
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tool-icon {
  font-size: 1.8rem;
}

.tool-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tool-target {
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.tool-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tool-card-coming {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Features Grid ─────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

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

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 12px;
}

.feature-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

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

/* ── Script / Code Block ───────────────────── */

.script-section {
  margin-bottom: 56px;
}

.script-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.script-header h3 {
  font-size: 1.2rem;
}

.script-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #c4b5fd;
  white-space: pre;
}

/* Scrollbar */
.code-block::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.code-block::-webkit-scrollbar-track {
  background: transparent;
}

.code-block::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ── Install Section ───────────────────────── */

.install-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.install-section h3 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.install-section ol {
  list-style: none;
  counter-reset: steps;
  padding: 0;
}

.install-section li {
  counter-increment: steps;
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.install-section li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

/* ── Footer ────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

/* ── Toast ─────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: all 0.35s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ────────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .script-header {
    flex-direction: column;
    align-items: flex-start;
  }
}