
:root {
  --accent-color: #a855f7;
  --accent-color-rgb: 168, 85, 247;
  --accent-gradient: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
  --accent-glow: 0 0 20px rgba(168, 85, 247, 0.35);
}

@theme {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "Fira Code", monospace;
}

@layer utilities {
  .glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .glass-light {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.04);
  }

  .glass-card {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  }

  .text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .ai-bubble {
    background: rgba(30, 41, 59, 0.5);
    border-bottom-left-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  .user-bubble {
    background: var(--accent-gradient) !important;
    border-bottom-right-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .status-glow {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
  }
}

/* Accent theme classes mapping */
.theme-accent-border {
  border-color: rgba(var(--accent-color-rgb), 0.2) !important;
}
.theme-accent-text {
  color: var(--accent-color) !important;
}
.theme-accent-bg {
  background-color: var(--accent-color) !important;
}
.theme-accent-glow-shadow {
  box-shadow: var(--accent-glow) !important;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Floating Particles Container */
#particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Floating particle animation */
@keyframes float {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) translateX(50px) scale(0.5);
    opacity: 0;
  }
}

.particle {
  position: absolute;
  bottom: -20px;
  background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.4) 0%, rgba(236, 72, 153, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 15s infinite linear;
}

/* Voice Wave Animation while recording */
@keyframes voice-wave {
  0%, 100% {
    transform: scaleY(0.3);
  }
  50% {
    transform: scaleY(1);
  }
}

.wave-bar {
  display: inline-block;
  width: 3px;
  height: 20px;
  background-color: var(--accent-color);
  margin: 0 2px;
  border-radius: 9999px;
  transform-origin: bottom;
  animation: voice-wave 1.2s infinite ease-in-out;
}

.wave-bar:nth-child(2) {
  animation-delay: 0.15s;
}
.wave-bar:nth-child(3) {
  animation-delay: 0.3s;
}
.wave-bar:nth-child(4) {
  animation-delay: 0.45s;
}
.wave-bar:nth-child(5) {
  animation-delay: 0.6s;
}

/* Thinking Dot Pulse Animation */
@keyframes dot-pulse {
  0%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.thinking-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  animation: dot-pulse 1.2s infinite ease-in-out;
}

.thinking-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.thinking-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Pulse animation for record button */
@keyframes record-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.pulse-record {
  animation: record-pulse 2s infinite;
}

/* Page transitions / Loading Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom typing cursor */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent-color);
}

@keyframes blink {
  from, to { opacity: 0; }
  50% { opacity: 1; }
}

/* Gradient background */
.bg-cosmic {
  background: radial-gradient(circle at top left, #1E1B4B 0%, #0F172A 40%, #020617 100%);
}

/* Interactive floating elements */
@keyframes floating {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

.floating-ornament {
  animation: floating 6s ease-in-out infinite;
}

.floating-ornament-delay {
  animation: floating 8s ease-in-out infinite;
  animation-delay: 2s;
}

/* Custom code formatting inside Markdown */
.markdown-body pre {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
}

.markdown-body code {
  font-family: 'Fira Code', monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.9em;
}

.markdown-body ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 8px 0;
}

.markdown-body ol {
  list-style-type: decimal;
  padding-left: 20px;
  margin: 8px 0;
}

.markdown-body p {
  margin-bottom: 8px;
}
