/* ============================================
   ANIMATIONS & LIQUID GLASS EFFECTS
   Performance-optimized with transform/opacity
   ============================================ */

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Subtle floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Gentle pulse glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 123, 156, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 123, 156, 0.4);
  }
}

/* Shimmer effect for highlights */
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Gradient flow animation */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Subtle rotation */
@keyframes subtleRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Fade in up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in scale */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Border glow animation */
@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(255, 123, 156, 0.2);
  }
  50% {
    border-color: rgba(255, 123, 156, 0.5);
  }
}

/* Blob animation for background shapes */
@keyframes blobMove {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-10px, 20px) scale(0.95);
  }
  75% {
    transform: translate(-20px, -10px) scale(1.02);
  }
}

/* ============================================
   LIQUID GLASS CLASSES
   ============================================ */

/* Base glass effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glass card with subtle animation */
.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 123, 156, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 123, 156, 0.3);
}

.glass-card:hover::before {
  left: 100%;
}

/* Glass button */
.glass-button {
  background: rgba(255, 123, 156, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 123, 156, 0.3);
  border-radius: 30px;
  padding: 14px 32px;
  color: #FF7B9C;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-button:hover {
  background: rgba(255, 123, 156, 0.25);
  border-color: rgba(255, 123, 156, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 123, 156, 0.25);
}

.glass-button:hover::after {
  opacity: 1;
}

/* Glass input */
.glass-input {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: #F0F7EE;
  transition: all 0.3s ease;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 123, 156, 0.5);
  box-shadow: 0 0 20px rgba(255, 123, 156, 0.15);
  outline: none;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
}

.animated-bg::before,
.animated-bg::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: blobMove 20s ease-in-out infinite;
}

.animated-bg::before {
  background: radial-gradient(circle, rgba(255, 123, 156, 0.3) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.animated-bg::after {
  background: radial-gradient(circle, rgba(100, 181, 246, 0.2) 0%, transparent 70%);
  bottom: -200px;
  left: -200px;
  animation-delay: -10s;
}

/* ============================================
   UTILITY ANIMATION CLASSES
   ============================================ */

/* Apply to elements that should fade in */
.animate-fadeIn {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered animation delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Floating animation */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Pulse glow */
.animate-pulse {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* Shimmer effect */
.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ============================================
   ENHANCED CARD STYLES
   ============================================ */

.card-tournament,
.card {
  position: relative;
  overflow: hidden;
}

.card-tournament::before,
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF7B9C, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-tournament:hover::before,
.card:hover::before {
  opacity: 1;
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  animation: subtleRotate 30s linear infinite;
  pointer-events: none;
}

/* ============================================
   NAVBAR GLASS ENHANCEMENT
   ============================================ */

.navbar {
  background: rgba(26, 26, 46, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.feature {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 123, 156, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature:hover::after {
  opacity: 1;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.hero-cta,
.login-btn,
.btn-primary {
  position: relative;
  overflow: hidden;
}

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

.hero-cta:hover::before,
.login-btn:hover::before,
.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* ============================================
   DROPDOWN GLASS EFFECT
   ============================================ */

.dropdown-menu {
  background: rgba(26, 26, 46, 0.95) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */

.site-footer {
  position: relative;
  background: rgba(26, 26, 46, 0.9) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-footer .social-icons a {
  transition: all 0.3s ease;
}

.site-footer .social-icons a:hover {
  transform: translateY(-3px);
  text-shadow: 0 0 20px rgba(255, 123, 156, 0.5);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FF7B9C, #FF5A8A);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FF5A8A, #e84a7f);
}

/* ============================================
   LINK UNDERLINE ANIMATION
   ============================================ */

.animated-link {
  position: relative;
  text-decoration: none;
}

.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #FF7B9C, #FF5A8A);
  transition: width 0.3s ease;
}

.animated-link:hover::after {
  width: 100%;
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ============================================
   TEXT GRADIENT
   ============================================ */

.text-gradient {
  background: linear-gradient(135deg, #FF7B9C 0%, #FF5A8A 50%, #e84a7f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */

.glow-pink {
  box-shadow: 0 0 30px rgba(255, 123, 156, 0.3);
}

.glow-blue {
  box-shadow: 0 0 30px rgba(100, 181, 246, 0.3);
}

.text-glow {
  text-shadow: 0 0 20px rgba(255, 123, 156, 0.5);
}
