:root {
  --bg: #030712;
  --bg-surface: #111827;
  --bg-surface-glow: rgba(59, 130, 246, 0.1);
  --primary: #3b82f6;
  --primary-glow: #60a5fa;
  --accent: #8b5cf6;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border: #1f2937;
  --success: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Gradients */
.cyber-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

.grid-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  perspective: 1000px;
  transform: rotateX(60deg) scale(2);
  transform-origin: top center;
  opacity: 0.3;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 50px; }
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  width: 100%;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  background: rgba(3, 7, 18, 0.7);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--primary-glow);
}

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

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

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

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--primary-glow);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 5% 4rem;
  position: relative;
}

.hero-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 2rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 1000px;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary-glow), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 3rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Features Grid */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

.features {
  padding: 6rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

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

.feature-card {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background: rgba(17, 24, 39, 0.8);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-glow);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

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

/* Documentation Layout */
.docs-container {
  display: flex;
  margin-top: 72px; /* nav height */
  min-height: calc(100vh - 72px);
}

.docs-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  background: rgba(17, 24, 39, 0.3);
}

.docs-sidebar h4 {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.docs-sidebar h4:first-child { margin-top: 0; }

.docs-sidebar a {
  display: block;
  color: var(--text-main);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.docs-sidebar a:hover, .docs-sidebar a.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-glow);
}

.docs-content {
  flex-grow: 1;
  padding: 4rem 5%;
  max-width: 900px;
}

.docs-section {
  margin-bottom: 5rem;
}

.docs-section h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.docs-section h2 { font-size: 1.8rem; margin-bottom: 1rem; margin-top: 2rem; color: var(--primary-glow); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.docs-section h3 { font-size: 1.3rem; margin-bottom: 0.75rem; margin-top: 1.5rem; color: var(--text-main); }
.docs-section p { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 1.05rem; }
.docs-section ul { margin-left: 1.5rem; margin-bottom: 1.5rem; color: var(--text-muted); }
.docs-section li { margin-bottom: 0.5rem; }

.docs-alert {
  background: rgba(59, 130, 246, 0.05);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 2rem 0;
}

.docs-alert.warning {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

/* Flowchart Animation */
.flowchart {
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.flow-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.flow-step h4 {
  color: var(--primary-glow);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flow-arrow {
  text-align: center;
  color: var(--primary);
  font-size: 1.5rem;
  animation: pulse-arrow 2s infinite;
}

@keyframes pulse-arrow {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(5px); }
}

@media (max-width: 768px) {
  .docs-container { flex-direction: column; }
  .docs-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .hero h1 { font-size: 2.5rem; }
  .nav-links { display: none; }
}

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--bg);
}
