
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 250 250 255;
    --foreground: 15 23 42;

    --card: 255 255 255;
    --card-foreground: 15 23 42;

    --popover: 255 255 255;
    --popover-foreground: 15 23 42;

    --primary: 99 187 233;
    --primary-foreground: 255 255 255;

    --secondary: 241 245 249;
    --secondary-foreground: 15 23 42;

    --muted: 248 250 252;
    --muted-foreground: 100 116 139;

    --accent: 241 245 249;
    --accent-foreground: 15 23 42;

    --destructive: 239 68 68;
    --destructive-foreground: 255 255 255;

    --border: 226 232 240;
    --input: 226 232 240;
    --ring: 99 187 233;

    --radius: 0.75rem;
  }

  * {
    @apply border-border;
  }

  body {
    @apply bg-gradient-to-br from-slate-50 via-blue-50/40 to-slate-100 text-foreground;
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
  }

html {
  scroll-behavior: smooth;
  /* Optimize scrolling performance */
  scroll-padding-top: 80px;
}

  /* Enhanced glass morphism effects */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
      radial-gradient(circle at 20% 50%, rgba(99, 187, 233, 0.12) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(147, 197, 253, 0.08) 0%, transparent 50%),
      radial-gradient(circle at 40% 80%, rgba(99, 187, 233, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
  }
}

@layer components {
  .glass-panel {
    @apply backdrop-blur-xl border border-white/30 shadow-2xl rounded-3xl;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%, 
      rgba(255, 255, 255, 0.10) 50%,
      rgba(255, 255, 255, 0.05) 100%
    );
    box-shadow: 
      0 8px 32px rgba(31, 38, 135, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  }

  .glass-button {
    @apply backdrop-blur-lg border border-white/40 shadow-xl font-medium rounded-xl transition-all duration-500;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.3) 0%, 
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.1) 100%
    );
    box-shadow: 
      0 8px 32px rgba(99, 187, 233, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }

  .glass-button:hover {
    @apply scale-105 shadow-2xl;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.4) 0%, 
      rgba(255, 255, 255, 0.25) 50%,
      rgba(255, 255, 255, 0.15) 100%
    );
    box-shadow: 
      0 16px 48px rgba(99, 187, 233, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }

  .hero-gradient {
    background: 
      linear-gradient(135deg, 
        rgba(99, 187, 233, 0.15) 0%, 
        rgba(147, 197, 253, 0.08) 25%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(99, 187, 233, 0.06) 75%,
        rgba(147, 197, 253, 0.12) 100%
      ),
      radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    position: relative;
  }

  .hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
      conic-gradient(from 0deg at 50% 50%, 
        rgba(99, 187, 233, 0.03) 0deg,
        rgba(147, 197, 253, 0.08) 90deg,
        rgba(99, 187, 233, 0.03) 180deg,
        rgba(147, 197, 253, 0.08) 270deg,
        rgba(99, 187, 233, 0.03) 360deg
      );
    pointer-events: none;
  }

  .section-glass {
    @apply backdrop-blur-lg border border-white/25 rounded-3xl shadow-2xl;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.25) 0%, 
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.08) 100%
    );
    box-shadow: 
      0 20px 40px rgba(31, 38, 135, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  }

  .section-glass:hover {
    @apply shadow-3xl;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.3) 0%, 
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.12) 100%
    );
    box-shadow: 
      0 25px 50px rgba(31, 38, 135, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      inset 0 -1px 0 rgba(255, 255, 255, 0.15);
  }

  .text-gradient {
    @apply bg-gradient-to-r from-slate-900 via-blue-900 to-slate-900 bg-clip-text text-transparent;
    filter: drop-shadow(0 0 20px rgba(99, 187, 233, 0.3));
  }

  .accent-gradient {
    background: linear-gradient(135deg, 
      #63BBE9 0%, 
      rgba(99, 187, 233, 0.9) 50%,
      #93C5FD 100%
    );
    box-shadow: 
      0 10px 30px rgba(99, 187, 233, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }

  .floating-glass {
    @apply backdrop-blur-md border border-white/20 rounded-2xl;
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.2) 0%, 
      rgba(255, 255, 255, 0.05) 100%
    );
    animation: float 6s ease-in-out infinite;
    will-change: transform;
    transform: translate3d(0, 0, 0);
  }

  .glass-orb {
    @apply backdrop-blur-lg border border-white/30 rounded-full;
    background: radial-gradient(circle at 30% 30%, 
      rgba(255, 255, 255, 0.4) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(99, 187, 233, 0.1) 100%
    );
    box-shadow: 
      0 20px 40px rgba(99, 187, 233, 0.2),
      inset 0 2px 0 rgba(255, 255, 255, 0.4),
      inset 0 -2px 0 rgba(255, 255, 255, 0.1);
  }
}

@layer utilities {
  .animate-on-scroll {
    @apply opacity-0 translate-y-8 transition-all duration-700 ease-out;
  }

  .animate-on-scroll.in-view {
    @apply opacity-100 translate-y-0;
  }

  .glass-shimmer {
    position: relative;
    overflow: hidden;
    contain: layout style paint;
  }

  .glass-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
      transparent 0%, 
      rgba(255, 255, 255, 0.3) 50%, 
      transparent 100%
    );
    animation: shimmer-optimized 3s ease-in-out infinite;
    will-change: left;
    pointer-events: none;
  }

  .shadow-3xl {
    box-shadow: 
      0 35px 60px rgba(31, 38, 135, 0.25),
      0 20px 25px rgba(31, 38, 135, 0.15);
  }
}

/* Enhanced animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes shimmer-optimized {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes shimmer {
  0% { transform: translate3d(-100%, 0, 0); }
  100% { transform: translate3d(100%, 0, 0); }
}

@keyframes glass-pulse {
  0%, 100% { 
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.2) 0%, 
      rgba(255, 255, 255, 0.05) 100%
    );
  }
  50% { 
    background: linear-gradient(135deg, 
      rgba(255, 255, 255, 0.3) 0%, 
      rgba(255, 255, 255, 0.15) 100%
    );
  }
}

/* Responsive glass effects */
@media (max-width: 768px) {
  .glass-panel, .section-glass {
    backdrop-filter: blur(8px);
  }
}

/* Print styles */
@media print {
  .glass-panel, .section-glass, .glass-button {
    background: white !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
}
