/* Core Variable Definitions */
:root {
  --bg-main: #060913;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.15);
  
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);
  
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --container-max: 1200px;
}

/* Base Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Gradient Utility */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--primary) 50%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header / Navbar */
.navbar {
  background: rgba(6, 9, 19, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.nav-links .npm-link,
.nav-links .github-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
}

.nav-links .npm-link:hover,
.nav-links .github-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.npm-icon {
  width: 1.5rem;
  height: auto;
}

.github-icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: 10rem;
  padding-bottom: 7rem;
  display: flex;
  align-items: center;
  min-height: 90vh;
}

.hero-bg-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translate(-50%, -20%);
  width: 45rem;
  height: 45rem;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(99, 102, 241, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 4px 20px var(--primary-glow);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* Visual Comparison */
.hero-visual {
  position: relative;
}

.visual-comparison {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comparison-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.comparison-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.slow-way {
  border-left: 4px solid var(--accent-red);
}

.fast-way {
  border-left: 4px solid var(--accent-green);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.06);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.dot.red { background-color: var(--accent-red); }
.dot.green { background-color: var(--accent-green); }

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.card-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.cmd-line {
  color: #fff;
  margin-bottom: 0.6rem;
}

.cmd-line::before {
  content: "$ ";
  color: var(--primary);
}

.cmd-output {
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cmd-output.info { color: #38bdf8; }
.cmd-output.success { color: #4ade80; }
.cmd-output.warn { color: #fbbf24; }

.metric {
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.red-text { color: var(--accent-red); }
.green-text { color: var(--accent-green); }

/* Features Section */
.features {
  padding: 7rem 0;
  position: relative;
  background: linear-gradient(180deg, var(--bg-main) 0%, rgba(15, 23, 42, 0.4) 50%, var(--bg-main) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 4.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto;
}

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

.feature-card {
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.25rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.45);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.purple-glow { background: linear-gradient(135deg, #a855f7 0%, var(--primary) 100%); }
.blue-glow { background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%); }
.green-glow { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.orange-glow { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.cyan-glow { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }
.red-glow { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Code Section */
.code-section {
  padding: 7rem 0;
}

.code-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 4rem;
  align-items: center;
}

.section-desc {
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* Installation Card */
.install-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 28rem;
}

.install-title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.install-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
}

.install-code-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

#install-cmd {
  color: #fff;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.copy-btn:hover {
  color: var(--text-main);
}

.copy-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* IDE Frame */
.ide-frame {
  background: #0b0f19;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.ide-header {
  background: #111827;
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.ide-dots {
  display: flex;
  gap: 0.4rem;
}

.ide-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.ide-dot.red { background-color: var(--accent-red); }
.ide-dot.yellow { background-color: var(--accent-orange); }
.ide-dot.green { background-color: var(--accent-green); }

.ide-tab {
  margin-left: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  font-family: var(--font-sans);
}

.ide-body {
  padding: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Code Highlighting Style */
.keyword { color: #f472b6; }
.string { color: #a7f3d0; }
.function { color: #60a5fa; }
.comment { color: #6b7280; }
.number { color: #fbbf24; }
.literal { color: #f472b6; }

/* CTA Section */
.cta {
  background: radial-gradient(circle at center, var(--primary-glow) 0%, rgba(6, 9, 19, 0) 60%);
  padding: 7rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 32rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background: #020408;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-container,
  .code-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }
  .hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-visual {
    max-width: 32rem;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .nav-links a:not(.github-link):not(.npm-link) {
    display: none;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
