/* 
 * LingoBuddy - Design System & Custom Glassmorphism Styles
 * Theme: Obsidian Deep Space with Frosted Cyan/Emerald Accents
 */

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

:root {
  --bg-deep: #07090e;
  --bg-surface: #0d121f;
  --glass-bg: rgba(20, 28, 48, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(56, 189, 248, 0.35);
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(6, 182, 212, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.07) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Glassmorphism primitives */
.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);
}

.glass-panel-subtle {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  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: var(--glass-border-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(6, 182, 212, 0.15);
}

/* Neon Glow Accents */
.glow-emerald {
  box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.35);
}

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

.glow-purple {
  box-shadow: 0 0 20px -3px rgba(139, 92, 246, 0.35);
}

/* Audio Status Animations */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.15;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

.animate-pulse-ring {
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes orbit-glow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animate-orbit {
  animation: orbit-glow 3s linear infinite;
}

/* Sound Wave Bars */
.soundwave-bar {
  display: inline-block;
  width: 3px;
  background: #06b6d4;
  border-radius: 9999px;
  animation: soundwave-jump 1.2s ease-in-out infinite;
}

.soundwave-bar:nth-child(2) { animation-delay: 0.2s; height: 16px; }
.soundwave-bar:nth-child(3) { animation-delay: 0.4s; height: 22px; }
.soundwave-bar:nth-child(4) { animation-delay: 0.1s; height: 12px; }

@keyframes soundwave-jump {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.4); }
}

/* Anxiety Shield Accordion & Transitions */
.anxiety-shield-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.anxiety-shield-drawer.open {
  max-height: 600px;
  opacity: 1;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.5);
}

/* Toast Container */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(-8px);
  opacity: 0;
}

.toast-item.show {
  transform: translateY(0);
  opacity: 1;
}

/* Floating Voice Dock */
.voice-dock {
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.6), 0 0 32px 0 rgba(6, 182, 212, 0.12);
}

/* Code & Monospace Badges */
.badge-mono {
  font-family: 'JetBrains Mono', monospace;
}
