/* =====================================
   ITCH SUMMER WAVES
   Ocean Wave Effects für Itch.io Highlights
   ===================================== */

/* Wave Container */
.itch-summer-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none !important;
    z-index: -1 !important;
    overflow: hidden;
}

/* Base Wave Styles */
.summer-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(14, 165, 233, 0.1) 30%,
        rgba(6, 182, 212, 0.15) 60%,
        rgba(3, 105, 161, 0.2) 100%);
    border-radius: 50% 50% 0 0;
    animation: waveMotion 15s ease-in-out infinite;
    pointer-events: none !important;
}

/* Multiple Wave Layers */
.summer-wave-1 {
    animation-delay: 0s;
    opacity: 0.8;
    animation-duration: 12s;
}

.summer-wave-2 {
    animation-delay: -4s;
    opacity: 0.6;
    animation-duration: 18s;
    height: 80%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(16, 185, 129, 0.08) 30%,
        rgba(5, 150, 105, 0.12) 60%,
        rgba(4, 120, 87, 0.15) 100%);
}

.summer-wave-3 {
    animation-delay: -8s;
    opacity: 0.4;
    animation-duration: 20s;
    height: 60%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(249, 115, 22, 0.06) 30%,
        rgba(234, 88, 12, 0.08) 60%,
        rgba(194, 65, 12, 0.1) 100%);
}

/* Wave Animation */
@keyframes waveMotion {
    0%, 100% {
        transform: translateX(-50%) translateY(0) scaleY(1);
    }
    25% {
        transform: translateX(-45%) translateY(-10px) scaleY(1.1);
    }
    50% {
        transform: translateX(-55%) translateY(0) scaleY(0.9);
    }
    75% {
        transform: translateX(-48%) translateY(-5px) scaleY(1.05);
    }
}

/* Foam Effects */
.wave-foam {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: repeating-linear-gradient(90deg,
        transparent 0px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.05) 20px,
        transparent 30px);
    animation: foamFlow 8s linear infinite;
    border-radius: 50% 50% 0 0;
}

@keyframes foamFlow {
    0% {
        transform: translateX(0);
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(-30px);
        opacity: 0.6;
    }
}

/* Beach Sand Effect */
.beach-sand {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(251, 191, 36, 0.1) 50%,
        rgba(245, 158, 11, 0.15) 100%);
    z-index: -1;
}

.beach-sand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(217, 119, 6, 0.1) 0%, transparent 50%);
    animation: sandShimmer 20s ease-in-out infinite;
}

@keyframes sandShimmer {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Wave Particles */
.wave-particle-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
    overflow: hidden;
}

.wave-droplet {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.8) 0%, transparent 100%);
    border-radius: 50%;
    animation: dropletSplash 6s ease-out infinite;
}

.wave-droplet:nth-child(odd) {
    animation-delay: 0s;
    animation-duration: 5s;
}

.wave-droplet:nth-child(even) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.wave-droplet:nth-child(3n) {
    animation-delay: -4s;
    animation-duration: 6s;
}

@keyframes dropletSplash {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        transform: translateY(-20px) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateY(-40px) scale(0.5);
        opacity: 0.5;
    }
    100% {
        transform: translateY(-60px) scale(0);
        opacity: 0;
    }
}

/* Summer Sun Reflection */
.sun-reflection {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 200px;
    height: 100px;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(251, 191, 36, 0.1) 30%,
        rgba(249, 115, 22, 0.15) 50%,
        rgba(251, 191, 36, 0.1) 70%,
        transparent 100%);
    border-radius: 50%;
    transform: translateX(-50%) skewY(-10deg);
    animation: sunReflection 10s ease-in-out infinite;
    filter: blur(20px);
}

@keyframes sunReflection {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-50%) skewY(-10deg) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateX(-50%) skewY(-5deg) scale(1.2);
    }
}

/* Tide Pool Effects */
.tide-pool {
    position: absolute;
    bottom: 20px;
    width: 60px;
    height: 30px;
    background: radial-gradient(ellipse, 
        rgba(6, 182, 212, 0.3) 0%, 
        rgba(3, 105, 161, 0.2) 50%, 
        transparent 100%);
    border-radius: 50%;
    animation: tidePoolRipple 8s ease-in-out infinite;
}

.tide-pool:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.tide-pool:nth-child(2) {
    left: 60%;
    animation-delay: -3s;
    width: 40px;
    height: 20px;
}

.tide-pool:nth-child(3) {
    left: 85%;
    animation-delay: -6s;
    width: 50px;
    height: 25px;
}

@keyframes tidePoolRipple {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Itch.io Wave Integration */
.itch-wave-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(250, 92, 92, 0.1) 20%,
        rgba(250, 92, 92, 0.15) 50%,
        rgba(250, 92, 92, 0.1) 80%,
        transparent 100%);
    animation: itchAccentFlow 12s linear infinite;
    border-radius: 0 0 50% 50%;
}

@keyframes itchAccentFlow {
    0% {
        transform: translateX(-100px);
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(100px);
        opacity: 0.5;
    }
}

/* Responsive Wave Adjustments */
@media (max-width: 768px) {
    .itch-summer-waves {
        height: 120px;
    }
    
    .summer-wave {
        animation-duration: calc(var(--base-duration, 15s) * 1.2);
    }
    
    .sun-reflection {
        width: 150px;
        height: 75px;
    }
    
    .tide-pool {
        width: 40px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .itch-summer-waves {
        height: 80px;
    }
    
    .wave-foam,
    .sun-reflection,
    .tide-pool {
        display: none;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .summer-wave {
        background: linear-gradient(180deg, 
            transparent 0%, 
            rgba(14, 165, 233, 0.3) 50%,
            rgba(3, 105, 161, 0.4) 100%);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .summer-wave,
    .wave-foam,
    .wave-droplet,
    .sun-reflection,
    .tide-pool,
    .itch-wave-accent {
        animation: none;
    }
    
    .beach-sand::before {
        animation: none;
        opacity: 0.6;
    }
}
