/* ============================================
   OPENLYS.APP - SILICON VALLEY PREMIUM UI V2.0
   Ultra-Premium Design System
   Inspired by: Kling AI, InVideo, ViewMax, Runway ML
   ============================================ */

/* ===== ANIMATED BACKGROUND PARTICLES ===== */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 20s infinite ease-in-out;
  box-shadow: 0 0 20px var(--accent-primary);
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 22s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 28s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; animation-duration: 24s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; animation-duration: 26s; }
.particle:nth-child(6) { left: 60%; animation-delay: 3s; animation-duration: 23s; }
.particle:nth-child(7) { left: 70%; animation-delay: 5s; animation-duration: 27s; }
.particle:nth-child(8) { left: 80%; animation-delay: 7s; animation-duration: 21s; }
.particle:nth-child(9) { left: 90%; animation-delay: 9s; animation-duration: 29s; }
.particle:nth-child(10) { left: 15%; animation-delay: 1s; animation-duration: 30s; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) scale(1);
    opacity: 0;
  }
}

/* ===== GLASSMORPHISM PREMIUM EFFECTS ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.37),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-4px);
  box-shadow:
    0 20px 60px 0 rgba(0, 0, 0, 0.5),
    0 0 60px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.glass-card-strong {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== GRADIENT ANIMATIONS ===== */
.gradient-text-animated {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== ULTRA SMOOTH HOVER EFFECTS ===== */
.hover-lift-premium {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.hover-lift-premium:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(139, 92, 246, 0.4);
}

/* ===== ANIMATED GRADIENT BORDERS ===== */
.gradient-border-animated {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.gradient-border-animated::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #667eea);
  background-size: 400% 400%;
  border-radius: inherit;
  z-index: -1;
  animation: gradientBorderMove 8s ease infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gradient-border-animated:hover::before {
  opacity: 1;
}

@keyframes gradientBorderMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== FLOATING ANIMATION ===== */
.float-smooth {
  animation: floatSmooth 6s ease-in-out infinite;
}

@keyframes floatSmooth {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

/* ===== PULSE GLOW EFFECT ===== */
.pulse-glow-strong {
  animation: pulseGlowStrong 3s ease-in-out infinite;
}

@keyframes pulseGlowStrong {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(139, 92, 246, 0.4),
      0 0 40px rgba(139, 92, 246, 0.2);
  }
  50% {
    box-shadow:
      0 0 60px rgba(139, 92, 246, 0.8),
      0 0 100px rgba(139, 92, 246, 0.4);
  }
}

/* ===== MODERN PREMIUM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 7px;
  border: 3px solid var(--bg-secondary);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #764ba2 0%, #f093fb 100%);
}

/* ===== PREMIUM BUTTON RIPPLE EFFECT ===== */
.btn-ripple {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:hover::before {
  width: 400px;
  height: 400px;
}

/* ===== SPOTLIGHT INTERACTIVE EFFECT ===== */
.spotlight-container {
  position: relative;
  overflow: hidden;
}

.spotlight {
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 1;
  transform: translate(-50%, -50%);
}

/* ===== GRID PATTERN BACKGROUND ===== */
.grid-background {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
}

/* ===== SHIMMER LOADING EFFECT ===== */
.shimmer {
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== NEON GLOW TEXT EFFECT ===== */
.neon-text {
  text-shadow:
    0 0 10px var(--accent-primary),
    0 0 20px var(--accent-primary),
    0 0 40px var(--accent-primary),
    0 0 80px var(--accent-primary),
    0 0 120px var(--accent-primary);
  animation: neonFlicker 4s ease-in-out infinite alternate;
}

@keyframes neonFlicker {
  0%, 100% {
    opacity: 1;
    text-shadow:
      0 0 10px var(--accent-primary),
      0 0 20px var(--accent-primary),
      0 0 40px var(--accent-primary),
      0 0 80px var(--accent-primary);
  }
  50% {
    opacity: 0.85;
    text-shadow:
      0 0 5px var(--accent-primary),
      0 0 10px var(--accent-primary),
      0 0 20px var(--accent-primary);
  }
}

/* ===== 3D CARD TILT EFFECT ===== */
.card-3d-tilt {
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d-tilt:hover {
  transform: rotateX(5deg) rotateY(10deg) scale(1.05);
}

/* ===== REVEAL ANIMATION ON SCROLL - PREMIUM ===== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for smooth cascade effect */
.reveal-on-scroll.delay-1 { transition-delay: 0.05s; }
.reveal-on-scroll.delay-2 { transition-delay: 0.1s; }
.reveal-on-scroll.delay-3 { transition-delay: 0.15s; }
.reveal-on-scroll.delay-4 { transition-delay: 0.2s; }
.reveal-on-scroll.delay-5 { transition-delay: 0.25s; }
.reveal-on-scroll.delay-6 { transition-delay: 0.3s; }

/* Alternative reveal from left - SMOOTHER */
.reveal-from-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-from-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Alternative reveal from right - SMOOTHER */
.reveal-from-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-from-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Scale reveal for cards - SMOOTHER */
.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Blur reveal effect - PREMIUM */
.reveal-blur {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-blur.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ===== MORPHING BLOB BACKGROUNDS ===== */
@keyframes morphBlob {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(0deg) scale(1);
  }
  25% {
    border-radius: 40% 60% 50% 50% / 40% 50% 60% 50%;
    transform: rotate(90deg) scale(1.1);
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(180deg) scale(1);
  }
  75% {
    border-radius: 50% 50% 60% 40% / 60% 40% 50% 50%;
    transform: rotate(270deg) scale(1.1);
  }
}

.blob-animated {
  animation: morphBlob 15s ease-in-out infinite;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  filter: blur(80px);
  opacity: 0.15;
}

/* ===== TYPING CURSOR EFFECT ===== */
.typing-cursor::after {
  content: '|';
  animation: blinkCursor 1.2s infinite;
  margin-left: 3px;
  color: var(--accent-primary);
}

@keyframes blinkCursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ===== ADVANCED PREMIUM SHADOWS ===== */
.shadow-luxury-soft {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 0 40px rgba(139, 92, 246, 0.05);
}

.shadow-luxury-medium {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 16px 64px rgba(0, 0, 0, 0.12),
    0 0 60px rgba(139, 92, 246, 0.15);
}

.shadow-luxury-strong {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 16px 64px rgba(0, 0, 0, 0.2),
    0 32px 128px rgba(0, 0, 0, 0.15),
    0 0 100px rgba(139, 92, 246, 0.4);
}

/* ===== GLITCH EFFECT (PREMIUM) ===== */
.glitch-effect {
  position: relative;
  animation: glitchSkew 5s infinite;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-effect::before {
  animation: glitchBefore 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-3px, -3px);
  color: #667eea;
}

.glitch-effect::after {
  animation: glitchAfter 3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  transform: translate(3px, 3px);
  color: #f093fb;
}

@keyframes glitchSkew {
  0%, 90%, 100% { transform: skew(0deg); }
  92% { transform: skew(2deg); }
  94% { transform: skew(-2deg); }
  96% { transform: skew(1deg); }
  98% { transform: skew(-1deg); }
}

@keyframes glitchBefore {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, -3px); }
  94% { transform: translate(3px, 3px); }
  96% { transform: translate(-2px, 2px); }
}

@keyframes glitchAfter {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, 3px); }
  94% { transform: translate(-3px, -3px); }
  96% { transform: translate(2px, -2px); }
}

/* ===== PREMIUM LOADING SPINNER ===== */
.loader-premium {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(139, 92, 246, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinPremium 1s linear infinite;
}

@keyframes spinPremium {
  to { transform: rotate(360deg); }
}

/* ===== AURORA BACKGROUND EFFECT ===== */
.aurora-bg {
  position: relative;
  overflow: hidden;
}

.aurora-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  animation: auroraMove 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes auroraMove {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(5%, 5%) rotate(5deg);
  }
  66% {
    transform: translate(-3%, -3%) rotate(-3deg);
  }
}

/* ===== STAGGER ANIMATION UTILITIES ===== */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ===== FADE IN ENTRANCE ANIMATIONS ===== */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.fade-in-down {
  animation: fadeInDown 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ===== SCALE BOUNCE ANIMATION ===== */
.scale-bounce {
  animation: scaleBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleBounce {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== BREATHING ANIMATION ===== */
.breathing {
  animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}
