/* Bubble Container */
#bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    background: radial-gradient(circle, rgba(0, 255, 212, 0.3) 0%, rgba(69, 179, 157, 0.1) 100%);
    border-radius: 50%;
    animation: bubble-rise 6s linear infinite;
    opacity: 0.6;
}

/* Particle System */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--bioluminescent);
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

/* Ripple Effect */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

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

.ripple-effect:active::before {
    width: 300px;
    height: 300px;
}

/* Keyframe Animations */
@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0, 255, 212, 0.6);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 255, 212, 0.9), 0 0 40px rgba(0, 255, 212, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-30px) rotate(3deg);
    }
}

@keyframes wave-text {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-5px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-3px);
    }
}

@keyframes wave-move {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-25%) translateY(-10px);
    }
    50% {
        transform: translateX(-50%) translateY(0);
    }
    75% {
        transform: translateX(-75%) translateY(-10px);
    }
    100% {
        transform: translateX(-100%) translateY(0);
    }
}

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

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

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.rotate-in {
    animation: rotateIn 0.8s ease-out;
}

/* Hover Effects */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(0, 255, 212, 0.4);
    transform: translateY(-5px);
}

.hover-wave {
    position: relative;
    overflow: hidden;
}

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

.hover-wave:hover::before {
    left: 100%;
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 212, 0.3);
    border-left: 4px solid var(--bioluminescent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Page Transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--deep-ocean), var(--ocean-blue));
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
}

.page-transition .loading-content {
    text-align: center;
    color: var(--bioluminescent);
}

.page-transition .loading-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: glow-pulse 2s infinite;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .bubble {
        width: 15px;
        height: 15px;
    }
    
    .particle {
        width: 1px;
        height: 1px;
    }
    
    .floating-elements {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bubble,
    .particle,
    .floating-elements {
        display: none;
    }
}