:root {
  --bg-color: #050508;
  --panel-bg: rgba(10, 11, 20, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(99, 102, 241, 0.35);
  --panel-glow: rgba(99, 102, 241, 0.02);
  
  --primary: #6366f1; /* Professional Indigo */
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary: #10b981; /* Professional Emerald */
  --secondary-glow: rgba(16, 185, 129, 0.3);
  --accent: #f43f5e; /* Rose */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #475569;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --nav-height: 72px;
  --container-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  background: var(--bg-color);
}

/* Background Canvas */
#constellation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 5px;
  border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(3, 3, 7, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  background: rgba(3, 3, 7, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.logo-bolt {
  color: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary-glow));
  font-size: 1.35rem;
  animation: pulse-bolt 2s infinite ease-in-out;
}

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

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

.nav-links a:not(.nav-npm-badge):hover {
  color: var(--primary);
}

.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted) !important;
}

.nav-icon-link:hover {
  color: var(--text-main) !important;
}

.nav-npm-badge {
  background: var(--secondary);
  color: white;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px var(--secondary-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-npm-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 60px 24px;
  position: relative;
}

.hero-content {
  max-width: 800px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero-accent {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  opacity: 0.3;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 400;
}

/* Terminal Component */
.terminal {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 
              0 0 50px rgba(99, 102, 241, 0.03);
  text-align: left;
  margin-bottom: 40px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.terminal:hover {
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 
              0 0 50px rgba(99, 102, 241, 0.06);
}

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

.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-bar .dot.red { background: #ff5f56; }
.terminal-bar .dot.yellow { background: #ffbd2e; }
.terminal-bar .dot.green { background: #27c93f; }

.terminal-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dark);
  margin-left: auto;
  margin-right: auto;
  padding-right: 30px; /* Offset the left dots for perfect centering */
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #e2e8f0;
  min-height: 280px;
  max-height: 380px;
  overflow-y: auto;
}

/* Color codes inside terminal output */
.t-cmd { color: #f1f5f9; font-weight: 600; }
.t-cyan { color: var(--primary); }
.t-purple { color: var(--secondary); }
.t-green { color: #10b981; }
.t-yellow { color: #f59e0b; }
.t-gray { color: var(--text-dark); }
.t-dim { color: #64748b; }

/* Hero Actions */
.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--panel-border-hover);
  transform: translateY(-1px);
}

.btn-copy:active {
  transform: translateY(1px);
}

.btn-copy svg {
  color: var(--text-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.btn-copy:hover svg {
  color: var(--primary);
}

.btn-github {
  background: white;
  color: #030307;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-github:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
}

/* Features Grid */
.features {
  padding: 80px 0;
  position: relative;
}

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

.f-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.f-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(99, 102, 241, 0.02);
}

.f-icon {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--primary);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.05);
}

.f-icon--purple {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.15);
  color: var(--secondary);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.05);
}

.f-icon--teal {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
  box-shadow: 0 0 15px rgba(20, 184, 166, 0.05);
}

.f-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main);
}

.f-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Templates Section */
.templates {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
}

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

.tmpl-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tmpl-card:hover {
  transform: translateY(-2px);
  border-color: var(--panel-border-hover);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.tmpl-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tmpl-badge--backend {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--primary);
}

.tmpl-badge--frontend {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.15);
  color: var(--secondary);
}

.tmpl-badge--admin {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.15);
  color: var(--accent);
}

.tmpl-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.tmpl-tree {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow-x: auto;
}

/* How It Works Section */
.how {
  padding: 100px 0;
  position: relative;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-top: 60px;
}

.step {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.15);
  position: relative;
}

.step-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  color: var(--primary);
  display: inline-block;
  margin-top: 4px;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--primary);
  opacity: 0.15;
  margin-top: 28px;
}

/* CTA Section */
.cta {
  padding: 80px 0 120px 0;
}

.cta-box {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.cta-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(99, 102, 241, 0.03);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.cta-commands {
  display: flex;
  justify-content: center;
}

.btn-copy--lg {
  padding: 16px 28px;
  font-size: 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
  background: rgba(3, 3, 7, 0.8);
  border-top: 1px solid var(--panel-border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.footer-sep {
  color: var(--text-dark);
}

.footer-by a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-by a:hover {
  color: var(--primary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* Global reveal animation rules */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes & Animations */
@keyframes pulse-bolt {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.4));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.8));
  }
}

/* Responsive design adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  
  .step-line {
    display: none;
  }
  
  .nav-links a:not(.nav-npm-badge):not(.nav-icon-link) {
    display: none; /* Hide text links on mobile, keep badge and github */
  }
  
  .footer-inner {
    gap: 16px;
  }
}
