/* Enhanced Global Styles & Animations */

/* Custom color variables for blue theme */
:root {
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-hero: linear-gradient(135deg, #0a1628 0%, #1e3a8a 35%, #2563eb 50%, #1e3a8a 65%, #0a1628 100%);
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 50px rgba(37, 99, 235, 0.4);
}

/* Enhanced page fade-in with bounce */
.page-fade-enter {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
}
.page-fade-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1), transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Gradient backgrounds for hero sections */
.hero-gradient {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}
.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: float 20s ease-in-out infinite;
}

/* Floating particles animation */
.particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: floatParticles 15s infinite linear;
}

.particle:nth-child(1) {
  width: 8px; height: 8px;
  left: 20%; top: 80%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 6px; height: 6px;
  left: 60%; top: 90%;
  animation-delay: 3s;
}

.particle:nth-child(3) {
  width: 10px; height: 10px;
  left: 80%; top: 70%;
  animation-delay: 6s;
}

.particle:nth-child(4) {
  width: 4px; height: 4px;
  left: 10%; top: 60%;
  animation-delay: 9s;
}

.particle:nth-child(5) {
  width: 12px; height: 12px;
  left: 40%; top: 85%;
  animation-delay: 12s;
}

@keyframes floatParticles {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Floating geometric shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  animation: floatShape 20s ease-in-out infinite;
}

.shape-1 {
  width: 100px; height: 100px;
  top: 20%; left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px; height: 60px;
  top: 60%; right: 20%;
  animation-delay: 7s;
}

.shape-3 {
  width: 80px; height: 80px;
  bottom: 30%; left: 70%;
  animation-delay: 14s;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(20px) rotate(240deg); }
}

@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }

/***************************
 Enhanced Sidebar
****************************/
.sidebar-drawer {
  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

@media (max-width: 1024px) {
  .sidebar-drawer {
    position: fixed;
    z-index: 40;
    top: 0; left: 0; bottom: 0;
    width: 16rem !important;
    transform: translateX(-100%);
    transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
  }
  .sidebar-drawer.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
    backdrop-filter: blur(2px);
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
}

/* Collapsed sidebar styles */
@media (min-width: 1024px) {
  .sidebar-drawer {
    min-width: 4rem;
  }
}

/* Enhanced card animations */
.card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-soft);
}
.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-large);
}

/* Gradient cards */
.card-gradient {
  background: var(--gradient-primary);
  color: white;
}
.card-gradient-secondary {
  background: var(--gradient-secondary);
  color: white;
}
.card-gradient-success {
  background: var(--gradient-success);
  color: white;
}

/* Enhanced buttons with gradients */
.btn-gradient {
  background: var(--gradient-primary);
  color: white;
  border: none;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 500ms ease;
}
.btn-gradient:hover::before {
  left: 100%;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Enhanced staggered reveal with bounce */
.reveal-list > * {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: revealUpBounce 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.reveal-list > *:nth-child(1) { animation-delay: 100ms; }
.reveal-list > *:nth-child(2) { animation-delay: 200ms; }
.reveal-list > *:nth-child(3) { animation-delay: 300ms; }
.reveal-list > *:nth-child(4) { animation-delay: 400ms; }
.reveal-list > *:nth-child(5) { animation-delay: 500ms; }
.reveal-list > *:nth-child(6) { animation-delay: 600ms; }
@keyframes revealUpBounce {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Pulse animation for CTAs */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* Enhanced modal with backdrop blur */
.modal-panel {
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-panel.show {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Smooth dropdown with slide */
.dropdown-enter {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}
.dropdown-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Enhanced toast with slide-in */
.toast-slide {
  transform: translateX(100%);
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-slide.show {
  transform: translateX(0);
}

/* Floating action elements */
.float-up {
  animation: floatUp 3s ease-in-out infinite;
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* New Hero Animations */
.hero-content-slide-in {
  animation: slideInFromLeft 1s ease-out;
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  animation: fadeInRight 1s ease-out forwards;
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enhanced Button Styles */
.btn-gradient-enhanced {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1d4ed8 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gradient-enhanced::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 600ms ease;
}

.btn-gradient-enhanced:hover {
  background-position: 100% 0;
  box-shadow: var(--shadow-glow);
}

.btn-gradient-enhanced:hover::before {
  left: 100%;
}

/* Trust Badges */
.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.8;
  transition: opacity 300ms ease;
}

.trust-badge:hover {
  opacity: 1;
}

/* Dashboard Mockup */
.dashboard-mockup {
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-card {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Feature Cards */
.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(20px);
  opacity: 0;
}

.feature-card.animate-in {
  transform: translateY(0);
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-large);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 1.5rem;
  transition: transform 300ms ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Background Grid Pattern */
.bg-grid-pattern {
  background-image: 
    linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Stats Animation */
.stat-item {
  transition: transform 300ms ease;
}

.stat-item:hover {
  transform: scale(1.05);
}

/* Mobile responsive enhancements */
@media (max-width: 640px) {
  #toast-container { right: 0.75rem; left: 0.75rem; }
  .card { margin-bottom: 1rem; }
  .hero-gradient { padding: 2rem 1rem; }
  
  .floating-shape {
    display: none;
  }
  
  .particle {
    display: none;
  }
  
  .dashboard-mockup {
    transform: none !important;
  }
  
  .floating-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0.5rem 0;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .trust-badge {
    font-size: 0.75rem;
  }
  
  .trust-badge span:first-child {
    font-size: 1.5rem;
  }
}

