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

:root {
  --bg-dark: #07090e;
  --bg-surface: #0d111a;
  --bg-card: #131824;
  --border: #1c2333;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.4);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.4);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #232c40;
  border-radius: 4px;
}

/* Central Voice Orb */
.orb-container {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  pointer-events: none;
}

.orb {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #22c55e 0%, #15803d 45%, #052e16 85%);
  box-shadow: 0 0 50px var(--green-glow), inset 0 0 30px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.orb:hover {
  transform: scale(1.04);
  box-shadow: 0 0 65px rgba(34, 197, 94, 0.6);
}

.orb:active {
  transform: scale(0.96);
}

/* Orb States */
.orb.idle {
  animation: orbBreathe 4s ease-in-out infinite;
}

.orb.listening {
  background: radial-gradient(circle at 35% 35%, #4ade80 0%, #22c55e 50%, #14532d 90%);
  box-shadow: 0 0 70px rgba(34, 197, 94, 0.8), 0 0 100px rgba(34, 197, 94, 0.3);
  animation: orbListen 1.5s ease-in-out infinite;
}

.orb.listening + .orb-ripple {
  animation: ripple 1.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.orb.thinking {
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 50%, #082f49 90%);
  box-shadow: 0 0 70px var(--cyan-glow);
  animation: orbSpin 2s linear infinite;
}

.orb.speaking {
  background: radial-gradient(circle at 35% 35%, #86efac 0%, #22c55e 40%, #166534 85%);
  animation: orbSpeak 0.8s ease-in-out infinite alternate;
}

@keyframes orbBreathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px var(--green-glow); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(34, 197, 94, 0.6); }
}

@keyframes orbListen {
  0%, 100% { transform: scale(1.03); }
  50% { transform: scale(1.12); }
}

@keyframes orbSpeak {
  0% { transform: scale(0.97); box-shadow: 0 0 45px var(--green-glow); }
  100% { transform: scale(1.1); box-shadow: 0 0 75px rgba(74, 222, 128, 0.8); }
}

@keyframes orbSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Sound Wave Bars */
.wave-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
}

.wave-bar {
  width: 4px;
  height: 8px;
  background-color: var(--green);
  border-radius: 4px;
  transition: height 0.1s ease;
}

.wave-container.active .wave-bar {
  animation: waveMotion 1s ease-in-out infinite alternate;
}
.wave-container.active .wave-bar:nth-child(1) { animation-delay: 0.1s; }
.wave-container.active .wave-bar:nth-child(2) { animation-delay: 0.3s; }
.wave-container.active .wave-bar:nth-child(3) { animation-delay: 0.5s; }
.wave-container.active .wave-bar:nth-child(4) { animation-delay: 0.2s; }
.wave-container.active .wave-bar:nth-child(5) { animation-delay: 0.4s; }
.wave-container.active .wave-bar:nth-child(6) { animation-delay: 0.6s; }
.wave-container.active .wave-bar:nth-child(7) { animation-delay: 0.3s; }

@keyframes waveMotion {
  0% { height: 6px; }
  100% { height: 36px; }
}

.glass {
  background: rgba(19, 24, 36, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

.orbitron {
  font-family: 'Orbitron', sans-serif;
}
