@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-accent: #06b6d4;
  --color-emerald: #10b981;
}

body {
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Custom Background Grid */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

.light .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.bg-radial-gradient {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.08) 35%, transparent 70%);
}

.light .bg-radial-gradient {
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 35%, transparent 70%);
}

/* Glassmorphism */
.glass-panel {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.light .glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.light .glass-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.light .glass-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 25px -5px rgba(99, 102, 241, 0.12);
}

/* Gradient text */
.text-gradient-primary {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.light .text-gradient-primary {
  background: linear-gradient(135deg, #0f172a 0%, #334155 50%, #64748b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glow effects */
.glow-primary {
  box-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.4);
}

.glow-cyan {
  box-shadow: 0 0 35px -8px rgba(6, 182, 212, 0.35);
}

/* Animated Data Flow line in Visualizer */
@keyframes flowPulse {
  0% {
    stroke-dashoffset: 40;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.data-flow-line {
  stroke-dasharray: 6, 6;
  animation: flowPulse 1.2s linear infinite;
}

/* Custom Scrollbar for code and playground */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

.light ::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.8);
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Syntax Highlighting Tokens */
.token-key { color: #38bdf8; }
.token-string { color: #34d399; }
.token-number { color: #fbbf24; }
.token-boolean { color: #f472b6; }
.token-null { color: #94a3b8; }
.token-punct { color: #64748b; }

.light .token-key { color: #0284c7; }
.light .token-string { color: #059669; }
.light .token-number { color: #d97706; }
.light .token-boolean { color: #db2777; }
.light .token-null { color: #64748b; }
.light .token-punct { color: #94a3b8; }

/* Interactive ripple / ping effect */
@keyframes ping-slow {
  75%, 100% {
    transform: scale(1.8);
    opacity: 0;
  }
}
.animate-ping-slow {
  animation: ping-slow 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Accordion transition */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.25s ease-out;
  opacity: 0;
}

.faq-content.open {
  max-height: 400px;
  opacity: 1;
}

/* Tag styles */
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.light .badge-tag {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
}
