/* Modern CSS Enhancements for Looking Glass */

/* CSS Variables for theming */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-accent: #60a5fa;
}

/* Dark theme adjustments */
[data-theme="dark"] {
  --glass-bg: rgba(0, 0, 0, 0.2);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f1f5f9;
  --text-secondary: #64748b;
}

/* Enhanced glassmorphism */
.glass-enhanced {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Advanced animations */
@keyframes morphing {
  0%, 100% { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; }
  50% { border-radius: 60% 40% 40% 60% / 40% 70% 30% 60%; }
}

.morphing-shape {
  animation: morphing 8s ease-in-out infinite;
}

/* Gradient text animations */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text-animated {
  background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

/* Modern button styles */
.btn-modern {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

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

/* Enhanced terminal styling */
.terminal-enhanced {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  position: relative;
  overflow: hidden;
}

.terminal-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6);
  opacity: 0.1;
}

/* Loading animations */
.loading-dots::after {
  content: '';
  display: inline-block;
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Particle system enhancements */
.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .modern-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-text {
    font-size: 2.5rem;
  }
  
  .glass {
    backdrop-filter: blur(5px);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .glass {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid white;
  }
  
  .gradient-text-animated {
    background: none;
    -webkit-text-fill-color: initial;
    color: white;
  }
}

/* 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;
  }
}

/* Focus styles for accessibility */
.focus-visible:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
.custom-scrollbar::-webkit-scrollbar {
  width: 12px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #764ba2, #667eea);
  background-clip: content-box;
}

/* Print styles */
@media print {
  .particles,
  .glass,
  nav,
  footer {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .terminal {
    background: #f8f9fa !important;
    color: #000 !important;
    border: 1px solid #000;
  }
}
