@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/**
 * Global Styles - Refined Luxe Enterprise
 * Sophisticated animations and premium visual enhancements
 * Complements the MUI theme with CSS-level refinements
 */
/* ============================================
   Google Fonts Import
   ============================================ */
/* ============================================
   CSS Custom Properties - Design Tokens
   ============================================ */
:root {
  /* Primary Colors */
  --color-primary-50: #F0F4FF;
  --color-primary-100: #E0E8FF;
  --color-primary-200: #C7D2FE;
  --color-primary-300: #A5B4FC;
  --color-primary-400: #818CF8;
  --color-primary-main: #6366F1;
  --color-primary-600: #4F46E5;
  --color-primary-700: #4338CA;
  --color-primary-800: #3730A3;
  --color-primary-900: #312E81;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #4338CA 100%);
  --gradient-luxe: linear-gradient(135deg, #A855F7 0%, #7C3AED 50%, #6366F1 100%);
  --gradient-aurora: linear-gradient(135deg, #10B981 0%, #06B6D4 50%, #8B5CF6 100%);
  --gradient-sunset: linear-gradient(135deg, #F59E0B 0%, #EF4444 50%, #EC4899 100%);
  --gradient-shimmer: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);

  /* Easing Functions */
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-snappy: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Durations */
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 400ms;
}
/* Dark mode overrides */
[data-theme='dark'], .dark {
  --color-primary-main: #818CF8;
  --gradient-primary: linear-gradient(135deg, #818CF8 0%, #6366F1 50%, #4F46E5 100%);
}
/* ============================================
   Base Reset & Typography
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html {
  height: 100%;
}
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  background-color: #F9FAFB;
  color: #0F172A;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
#root {
  min-height: 100vh;
}
/* Smooth scrolling with reduced motion support */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
/* Selection styling */
::selection {
  background-color: rgba(99, 102, 241, 0.2);
  color: inherit;
}
/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 4px;
  transition: background var(--duration-normal) var(--ease-smooth);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.35);
}
::-webkit-scrollbar-corner {
  background: transparent;
}
/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.2) transparent;
}
/* ============================================
   Focus States - Accessible & Beautiful
   ============================================ */
:focus-visible {
  outline: 2px solid var(--color-primary-main);
  outline-offset: 2px;
}
/* ============================================
   Animation Keyframes - Premium Micro-interactions
   ============================================ */
/* Fade animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Slide animations */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideInUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* Interactive animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}
@keyframes pulseSoft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-6px);
  }
  70% {
    transform: translateY(-3px);
  }
  90% {
    transform: translateY(-1px);
  }
}
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
/* Visual effects */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.5);
  }
}
@keyframes glowPrimary {
  0%, 100% {
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
  }
  50% {
    box-shadow: 0 0 32px rgba(99, 102, 241, 0.45);
  }
}
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-4px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(4px);
  }
}
/* Status indicator animations */
@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}
@keyframes recording {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 12px rgba(244, 63, 94, 0);
  }
}
/* Loading animations */
@keyframes dotPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes progressIndeterminate {
  0% {
    transform: translateX(-100%) scaleX(0.3);
  }
  50% {
    transform: translateX(0%) scaleX(0.5);
  }
  100% {
    transform: translateX(100%) scaleX(0.3);
  }
}
/* Skeleton loading */
@keyframes skeletonShimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}
/* ============================================
   Utility Animation Classes
   ============================================ */
.animate-fadeIn {
  animation: fadeIn var(--duration-slow) var(--ease-smooth) forwards;
}
.animate-fadeInUp {
  animation: fadeInUp var(--duration-slow) var(--ease-snappy) forwards;
}
.animate-fadeInDown {
  animation: fadeInDown var(--duration-slow) var(--ease-snappy) forwards;
}
.animate-fadeInScale {
  animation: fadeInScale var(--duration-slow) var(--ease-snappy) forwards;
}
.animate-slideInLeft {
  animation: slideInLeft var(--duration-slow) var(--ease-snappy) forwards;
}
.animate-slideInRight {
  animation: slideInRight var(--duration-slow) var(--ease-snappy) forwards;
}
.animate-slideInUp {
  animation: slideInUp var(--duration-slow) var(--ease-snappy) forwards;
}
.animate-pulse {
  animation: pulse 2s var(--ease-smooth) infinite;
}
.animate-pulse-soft {
  animation: pulseSoft 2s var(--ease-smooth) infinite;
}
.animate-bounce {
  animation: bounce 1s var(--ease-smooth) infinite;
}
.animate-float {
  animation: float 3s var(--ease-smooth) infinite;
}
.animate-glow {
  animation: glow 2s var(--ease-smooth) infinite;
}
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.animate-shake {
  animation: shake 0.5s var(--ease-smooth);
}
/* Status indicators */
.status-online {
  animation: statusPulse 2s var(--ease-smooth) infinite;
}
.status-recording {
  animation: recording 1.5s var(--ease-smooth) infinite;
}
/* Voice/Audio activity */
.voice-activity {
  animation: pulse 1.5s var(--ease-smooth) infinite;
}
.audio-playing {
  animation: glowPrimary 2s var(--ease-smooth) infinite;
}
.transcription-live {
  animation: fadeIn var(--duration-slow) var(--ease-smooth);
}
/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(99, 102, 241, 0.06) 25%,
    rgba(99, 102, 241, 0.12) 50%,
    rgba(99, 102, 241, 0.06) 75%
  );
  background-size: 200px 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}
/* ============================================
   Gradient Text Effect
   ============================================ */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-luxe {
  background: var(--gradient-luxe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-aurora {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* ============================================
   Gradient Background Utilities
   ============================================ */
.gradient-primary {
  background: var(--gradient-primary);
}
.gradient-luxe {
  background: var(--gradient-luxe);
}
.gradient-aurora {
  background: var(--gradient-aurora);
}
.gradient-sunset {
  background: var(--gradient-sunset);
}
.gradient-animated {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}
/* ============================================
   Glass Effect
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.glass-dark {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
/* ============================================
   Interactive Hover Effects
   ============================================ */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-snappy),
              box-shadow var(--duration-normal) var(--ease-smooth);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.hover-scale {
  transition: transform var(--duration-fast) var(--ease-snappy);
}
.hover-scale:hover {
  transform: scale(1.02);
}
.hover-glow {
  transition: box-shadow var(--duration-normal) var(--ease-smooth);
}
.hover-glow:hover {
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
}
/* ============================================
   Email Composer Layout
   ============================================ */
.email-composer-full-height {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* ============================================
   Reduced Motion Support
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
/* ============================================
   Print Styles
   ============================================ */
@media print {
  body {
    background: white;
    color: black;
  }

  .no-print {
    display: none !important;
  }
}
