/* BioGravity - Quantum Biotech Hub Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-deep: #020617; /* slate-950 */
  --emerald-neon: #10b981;
  --emerald-glow: #34d399;
  --cyan-neon: #06b6d4;
  --cyan-glow: #38bdf8;
  --violet-glow: #8b5cf6;
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(148, 163, 184, 0.12);
  --glass-border-hover: rgba(56, 189, 248, 0.35);
}

/* Base resets & typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: #f1f5f9;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', sans-serif;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Subtle Quantum Grid Background */
.quantum-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
}

.quantum-grid-dense {
  background-size: 24px 24px;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 185, 129, 0.06) 1px, transparent 1px);
}

/* Radial Ambient Orbs */
.ambient-glow-emerald {
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.15) 0%, rgba(2, 6, 23, 0) 70%);
}

.ambient-glow-cyan {
  background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15) 0%, rgba(2, 6, 23, 0) 70%);
}

.ambient-glow-violet {
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.12) 0%, rgba(2, 6, 23, 0) 70%);
}

/* Glassmorphism panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 40px 0 rgba(6, 182, 212, 0.12), 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.glass-panel-emerald:hover {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 12px 40px 0 rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(52, 211, 153, 0.2);
}

/* Neon Text & Badges */
.text-neon-emerald {
  color: var(--emerald-glow);
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}

.text-neon-cyan {
  color: var(--cyan-glow);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.badge-quantum {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.badge-emerald {
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

/* Quantum Pulsing Ring */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.animate-pulse-ring {
  animation: pulse-ring 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.animate-float {
  animation: float-gentle 6s ease-in-out infinite;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-orbit {
  animation: orbit-spin 20s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(1000%); }
}

.scanline-effect {
  position: relative;
  overflow: hidden;
}

.scanline-effect::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 12px;
  background: linear-gradient(to bottom, transparent, rgba(56, 189, 248, 0.2), transparent);
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #020617;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.15);
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
  border-color: rgba(56, 189, 248, 0.4);
}

/* Canvas sandbox styling */
#matter-canvas-container {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 1rem;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.15), inset 0 0 30px rgba(16, 185, 129, 0.05);
}

#matter-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

#matter-canvas:active {
  cursor: grabbing;
}

/* Interactive range slider styling */
input[type="range"] {
  -webkit-appearance: none;
  background: #1e293b;
  height: 6px;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 10px #06b6d4;
  border: 2px solid #020617;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
