/* Glowing Effects CSS - Disney Theme Adaptation
 * Inspired by Aceternity + SuperDesign
 * Colors adapted to Disney palette: #00A0E3 (primary blue), #00E676 (success green)
 */

/* ============================================
   CSS Variables for Glow Effects
   ============================================ */
:root {
  /* Glow effect parameters */
  --glow-blur: 20px;
  --glow-spread: 15px;
  --glow-opacity: 0.6;
  --glow-transition: 0.3s ease;

  /* Disney gradient colors for glows */
  --glow-blue-start: #00A0E3;
  --glow-blue-mid: #0066CC;
  --glow-blue-end: #004C99;
  --glow-green: #00E676;
  --glow-yellow: #FFD600;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(0, 160, 227, 0.1);
  --glass-blur: 12px;
}

/* ============================================
   Glowing Card Base
   ============================================ */
.glow-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all var(--glow-transition);
  transform-style: preserve-3d;
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(0, 160, 227, 0) 0%,
    rgba(0, 160, 227, 0.3) 50%,
    rgba(0, 160, 227, 0) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--glow-transition);
  pointer-events: none;
}

.glow-card:hover::before {
  opacity: 1;
}

.glow-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 160, 227, 0.4);
  box-shadow:
    0 0 20px rgba(0, 160, 227, 0.3),
    0 10px 40px rgba(0, 160, 227, 0.1);
}

/* ============================================
   Glowing Card with 3D Tilt (hover effect)
   ============================================ */
.glow-card-tilt {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.glow-card-tilt::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(0, 160, 227, 0.1),
    rgba(0, 230, 118, 0.1)
  );
  opacity: 0;
  transition: opacity var(--glow-transition);
  pointer-events: none;
}

.glow-card-tilt:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-8px);
  border-color: rgba(0, 160, 227, 0.5);
  box-shadow:
    0 0 30px rgba(0, 160, 227, 0.4),
    0 15px 50px rgba(0, 160, 227, 0.15);
}

.glow-card-tilt:hover::before {
  opacity: 1;
}

/* ============================================
   Scanning Glow Line Animation
   ============================================ */
.scanning-glow {
  position: relative;
  overflow: hidden;
}

.scanning-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--glow-blue-start) 50%,
    transparent 100%
  );
  animation: scanning-line 3s linear infinite;
  opacity: 0.8;
}

@keyframes scanning-line {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

/* ============================================
   Pulsing Glow Effect
   ============================================ */
.pulsing-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 160, 227, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 160, 227, 0.6);
  }
}

/* ============================================
   Border Glow (static, no mouse tracking)
   ============================================ */
.border-glow {
  position: relative;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
    linear-gradient(135deg,
      var(--glow-blue-start),
      var(--glow-green),
      var(--glow-blue-mid)
    ) border-box;
  border-radius: 12px;
  transition: all var(--glow-transition);
}

.border-glow:hover {
  box-shadow:
    0 0 25px rgba(0, 160, 227, 0.4),
    inset 0 0 15px rgba(0, 160, 227, 0.1);
}

/* ============================================
   Animated Border Glow (rotating gradient)
   ============================================ */
.animated-border-glow {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: 12px;
  overflow: hidden;
}

.animated-border-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from 0deg,
    var(--glow-blue-start),
    var(--glow-green),
    var(--glow-blue-mid),
    var(--glow-blue-start)
  );
  border-radius: inherit;
  animation: rotate-border 4s linear infinite;
  opacity: 0;
  transition: opacity var(--glow-transition);
}

.animated-border-glow::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--bg-primary);
  border-radius: inherit;
  z-index: 1;
}

.animated-border-glow > * {
  position: relative;
  z-index: 2;
}

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

@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================
   Tab Navigation (FAQ-style)
   ============================================ */
.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tab-button {
  position: relative;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
}

.tab-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--glow-blue-start), var(--glow-blue-mid));
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateY(100%);
  z-index: -1;
}

.tab-button:hover {
  color: var(--text-primary);
  border-color: var(--glow-blue-start);
}

.tab-button.active {
  color: white;
  border-color: var(--glow-blue-start);
}

.tab-button.active::before {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Glowing Button (CTA style)
   ============================================ */
.glow-button {
  position: relative;
  padding: 1rem 2rem;
  background: var(--disney-blue-primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.glow-button::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    var(--glow-blue-start),
    var(--glow-green)
  );
  border-radius: inherit;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.3s ease;
  z-index: -1;
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(0, 160, 227, 0.5),
    0 10px 30px rgba(0, 160, 227, 0.3);
}

.glow-button:hover::before {
  opacity: 1;
}

.glow-button:active {
  transform: translateY(0);
}

/* ============================================
   Icon with Glow Background
   ============================================ */
.icon-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0, 160, 227, 0.1);
  border-radius: 12px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.icon-glow svg,
.icon-glow img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px rgba(0, 160, 227, 0.6));
}

.icon-glow:hover {
  background: rgba(0, 160, 227, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 160, 227, 0.4);
}

/* ============================================
   Glassmorphism Utility Classes
   ============================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 160, 227, 0.2);
}

/* ============================================
   Gradient Text
   ============================================ */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--glow-blue-start),
    var(--glow-green)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-blue {
  background: linear-gradient(
    135deg,
    var(--glow-blue-start),
    var(--glow-blue-mid)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Shimmer Effect (loading state)
   ============================================ */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 160, 227, 0.2),
    transparent
  );
  animation: shimmer 2s infinite;
}

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

/* ============================================
   Mobile Responsiveness
   ============================================ */
@media (max-width: 768px) {
  .glow-card-tilt:hover {
    transform: translateY(-5px); /* Remove 3D tilt on mobile */
  }

  .tab-navigation {
    gap: 0.5rem;
  }

  .tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* ============================================
   Accessibility: Reduce motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .glow-card,
  .glow-card-tilt,
  .tab-button,
  .glow-button,
  .icon-glow,
  .scanning-glow::after,
  .animated-border-glow::before,
  .shimmer::before {
    animation: none;
    transition: none;
  }
}
