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

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

@keyframes wave {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-25px);
  }
}

@keyframes parallax-slow {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50px);
  }
}

@keyframes particle-drift {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(100px, -100px) rotate(360deg);
    opacity: 0;
  }
}

/* Glassmorphism effects */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Particle system */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(20, 184, 166, 0.6);
  border-radius: 50%;
  animation: particle-drift 8s infinite linear;
}

.particle:nth-child(2n) {
  background: rgba(6, 182, 212, 0.4);
  animation-duration: 12s;
  animation-delay: -2s;
}

.particle:nth-child(3n) {
  background: rgba(34, 197, 94, 0.3);
  animation-duration: 10s;
  animation-delay: -4s;
}

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

.float:nth-child(2n) {
  animation-delay: -2s;
  animation-duration: 8s;
}

.float:nth-child(3n) {
  animation-delay: -4s;
  animation-duration: 7s;
}

/* Bubble effects */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(20, 184, 166, 0.1));
  animation: bubble 15s infinite linear;
  pointer-events: none;
}

.bubble:nth-child(1) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
}
.bubble:nth-child(2) {
  left: 20%;
  width: 15px;
  height: 15px;
  animation-delay: -2s;
}
.bubble:nth-child(3) {
  left: 35%;
  width: 25px;
  height: 25px;
  animation-delay: -4s;
}
.bubble:nth-child(4) {
  left: 50%;
  width: 18px;
  height: 18px;
  animation-delay: -6s;
}
.bubble:nth-child(5) {
  left: 70%;
  width: 22px;
  height: 22px;
  animation-delay: -8s;
}
.bubble:nth-child(6) {
  left: 85%;
  width: 16px;
  height: 16px;
  animation-delay: -10s;
}

/* Parallax layers */
.parallax-bg {
  transform: translateZ(0);
  will-change: transform;
}

/* Wave patterns */
.wave-pattern {
  background: linear-gradient(45deg, transparent 30%, rgba(20, 184, 166, 0.1) 50%, transparent 70%);
  animation: wave 4s ease-in-out infinite;
}

/* Coral-inspired decorative elements */
.coral-decoration {
  background: linear-gradient(135deg, #14b8a6, #06b6d4, #10b981);
  clip-path: polygon(50% 0%, 80% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 20% 20%);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(20, 184, 166, 0.1);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0f766e, #0284c7);
}

/* Prose styling */
.prose h1 {
  @apply text-4xl md:text-5xl lg:text-6xl font-bold bg-gradient-to-r from-teal-400 to-cyan-400 bg-clip-text text-transparent;
}

.prose h2 {
  @apply text-2xl md:text-3xl lg:text-4xl font-bold text-teal-300 mb-6;
}

.prose h3 {
  @apply text-xl md:text-2xl font-semibold text-cyan-300 mb-4;
}

.prose p {
  @apply text-gray-200 leading-relaxed mb-4;
}

.prose ul {
  @apply text-gray-200 space-y-2;
}

.prose li {
  @apply flex items-start;
}

.prose li::before {
  content: "🐠";
  @apply mr-2 mt-1;
}

/* Responsive utilities */
@media (max-width: 1024px) {
  .particle {
    display: none;
  }

  .bubble {
    animation-duration: 20s;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .glass {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
  }

  .glass-dark {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .float,
  .bubble,
  .particle,
  .wave-pattern {
    animation: none;
  }
}
