/* DreamTales - Modern & Eye-Catching Design */
/* Custom animations and effects for maximum visual impact */

/* ============================================
   CSS VARIABLES FOR THEMING
   ============================================ */
:root {
  --dt-primary: #605dba;
  --dt-primary-light: #8884d8;
  --dt-primary-dark: #4a47a3;
  --dt-accent: #ff6b9d;
  --dt-accent-light: #ff8fb4;
  --dt-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --dt-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --dt-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dt-gradient-hero: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 50%, #f5f7fa 100%);
  --dt-glow-primary: 0 0 30px rgba(96, 93, 186, 0.5);
  --dt-glow-accent: 0 0 30px rgba(255, 107, 157, 0.5);
}

/* ============================================
   HERO SECTION - ANIMATED GRADIENT BACKGROUND
   ============================================ */
.hero-modern {
  position: relative;
  overflow: hidden;
  background: linear-gradient(-45deg, #e8d5f7, #c3d9f7, #f0e6ff, #d6e5ff);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

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

/* Animated stars/particles overlay */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px rgba(96, 93, 186, 0.5);
  animation: twinkle 3s ease-in-out infinite;
}

.star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 30%; left: 40%; animation-delay: 1s; }
.star:nth-child(4) { top: 50%; left: 90%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 60%; left: 10%; animation-delay: 2s; }
.star:nth-child(6) { top: 80%; left: 70%; animation-delay: 2.5s; }
.star:nth-child(7) { top: 15%; left: 55%; animation-delay: 0.3s; }
.star:nth-child(8) { top: 45%; left: 25%; animation-delay: 1.2s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* Floating clouds */
.floating-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  filter: blur(20px);
  animation: floatCloud 20s ease-in-out infinite;
}

.cloud-1 { width: 200px; height: 80px; top: 10%; left: -100px; animation-delay: 0s; }
.cloud-2 { width: 150px; height: 60px; top: 30%; right: -75px; animation-delay: 5s; }
.cloud-3 { width: 180px; height: 70px; top: 60%; left: -90px; animation-delay: 10s; }

@keyframes floatCloud {
  0% { transform: translateX(0); }
  50% { transform: translateX(calc(100vw + 200px)); }
  100% { transform: translateX(0); }
}

/* ============================================
   FLOATING APP MOCKUP WITH PARALLAX
   ============================================ */
.app-mockup-container {
  position: relative;
  z-index: 10;
}

.app-mockup-float {
  animation: floatMockup 4s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.app-mockup-float:hover {
  transform: scale(1.05) translateY(-10px);
}

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

/* Glow ring behind mockup */
.mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(96, 93, 186, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulseGlow 3s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulseGlow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

/* ============================================
   PULSING DOWNLOAD BUTTONS WITH GLOW
   ============================================ */
.download-btn-wrapper {
  position: relative;
  display: inline-block;
}

.download-btn-glow {
  position: relative;
  transition: all 0.3s ease;
  animation: buttonPulse 2s ease-in-out infinite;
}

.download-btn-glow::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(135deg, #605dba, #ff6b9d, #4facfe, #605dba);
  background-size: 300% 300%;
  border-radius: 16px;
  z-index: -1;
  animation: borderGlow 3s ease infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.download-btn-glow:hover::before {
  opacity: 1;
}

.download-btn-glow:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 40px rgba(96, 93, 186, 0.4);
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 5px 20px rgba(96, 93, 186, 0.3); }
  50% { box-shadow: 0 8px 30px rgba(96, 93, 186, 0.5); }
}

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

/* ============================================
   TRUST BADGES / STATISTICS BAR
   ============================================ */
.stats-bar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 20px 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-item {
  text-align: center;
  padding: 10px 20px;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 40px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(96, 93, 186, 0.3), transparent);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #605dba, #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: #60697b;
  margin-top: 5px;
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
  display: block;
}

/* Counter animation */
.counter-animate {
  animation: countUp 2s ease-out forwards;
}

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

/* ============================================
   FEATURE CARDS WITH GLASSMORPHISM
   ============================================ */
.feature-card-modern {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.feature-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(96, 93, 186, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card-modern:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(96, 93, 186, 0.2);
  border-color: rgba(96, 93, 186, 0.3);
}

.feature-card-modern:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f0eeff, #e8f4ff);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: all 0.3s ease;
}

.feature-card-modern:hover .feature-icon-wrapper {
  transform: rotateY(180deg) scale(1.1);
  background: linear-gradient(135deg, #605dba, #8884d8);
}

.feature-card-modern:hover .feature-icon-wrapper svg {
  filter: brightness(10);
}

/* ============================================
   MOBILE STICKY CTA BAR
   ============================================ */
.mobile-sticky-cta {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #605dba, #8884d8);
  padding: 12px 20px;
  z-index: 9999;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -5px 30px rgba(96, 93, 186, 0.4);
}

.mobile-sticky-cta.visible {
  bottom: 0;
}

.mobile-sticky-cta .cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 500px;
  margin: 0 auto;
}

.mobile-sticky-cta .cta-text {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
}

.mobile-sticky-cta .cta-text small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.9;
}

.mobile-sticky-cta .cta-button {
  background: white;
  color: #605dba;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  animation: ctaPulse 2s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.mobile-sticky-cta .cta-button:hover {
  transform: scale(1.05);
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3); }
}

/* Hide on desktop */
@media (min-width: 992px) {
  .mobile-sticky-cta {
    display: none;
  }
}

/* ============================================
   ANIMATED HERO TITLE
   ============================================ */
.hero-title-animated {
  position: relative;
}

.hero-title-animated .highlight-word {
  position: relative;
  display: inline-block;
}

.hero-title-animated .highlight-word::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(135deg, rgba(96, 93, 186, 0.3), rgba(255, 107, 157, 0.3));
  z-index: -1;
  border-radius: 4px;
  animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.5; }
  50% { transform: scaleX(1.05); opacity: 0.8; }
}

/* Typing effect cursor */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: #605dba;
  margin-left: 5px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ============================================
   ENHANCED TESTIMONIAL CARDS
   ============================================ */
.testimonial-card-modern {
  background: linear-gradient(135deg, #fff, #f8f7ff);
  border-radius: 20px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.testimonial-card-modern::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 6rem;
  font-family: Georgia, serif;
  color: rgba(96, 93, 186, 0.1);
  line-height: 1;
}

.testimonial-card-modern:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(96, 93, 186, 0.15);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.reveal-on-scroll.delay-1 { transition-delay: 0.1s; }
.reveal-on-scroll.delay-2 { transition-delay: 0.2s; }
.reveal-on-scroll.delay-3 { transition-delay: 0.3s; }
.reveal-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ============================================
   APP SHOWCASE SWIPER ENHANCEMENTS
   ============================================ */
.app-showcase-slide {
  transition: all 0.4s ease;
  filter: brightness(0.8);
}

.app-showcase-slide.swiper-slide-active {
  transform: scale(1.1);
  filter: brightness(1);
  z-index: 10;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) {
  .stats-bar {
    padding: 15px 10px;
    border-radius: 15px;
  }
  
  .stat-item {
    padding: 8px 10px;
  }
  
  .stat-number {
    font-size: 1.4rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .feature-card-modern {
    padding: 20px;
  }
  
  .star {
    width: 3px;
    height: 3px;
  }
}

/* ============================================
   PREMIUM BADGE EFFECT
   ============================================ */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1a2e;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6); }
}

/* ============================================
   DOWNLOAD ARROW ANIMATION
   ============================================ */
.download-arrow {
  animation: bounceDown 1.5s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================================
   LANGUAGE SELECTOR ENHANCEMENT
   ============================================ */
.language-selector-modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.language-selector-modern .btn {
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 600;
}
