/* アニメーション定義 */

/* 波のアニメーション */
@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 魚の泳ぎアニメーション */
@keyframes swim {
    0% {
        transform: translateX(-100px) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(25vw) translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateX(50vw) translateY(20px) rotate(-5deg);
    }
    75% {
        transform: translateX(75vw) translateY(-15px) rotate(3deg);
    }
    100% {
        transform: translateX(110vw) translateY(0) rotate(0deg);
    }
}

/* 浮遊アニメーション */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* バウンスアニメーション */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* パルスアニメーション */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255,107,107,0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(255,107,107,0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(255,107,107,0.3);
    }
}

/* キラキラアニメーション */
@keyframes sparkle {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* フェードイン */
@keyframes fadeIn {
    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 rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ポップアップ */
@keyframes popup {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 点滅 */
@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

/* 波打ち */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* スクロールアニメーション用クラス */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

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

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

/* アニメーション遅延クラス */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* ホバーエフェクト */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.1);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* 特殊エフェクト */
.shimmer {
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.7) 50%, transparent 60%);
    background-size: 200% 100%;
    background-position: -100% 0;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* 音波エフェクト */
.sound-wave {
    position: relative;
}

.sound-wave::before,
.sound-wave::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid currentColor;
    border-radius: 50%;
    opacity: 0;
}

.sound-wave.active::before {
    animation: ripple 1.5s ease-out infinite;
}

.sound-wave.active::after {
    animation: ripple 1.5s ease-out 0.5s infinite;
}

/* 水滴エフェクト */
.water-drop {
    position: relative;
    overflow: hidden;
}

.water-drop::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 180, 216, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.water-drop:active::after {
    width: 300px;
    height: 300px;
}

/* カウントダウンアニメーション */
@keyframes countdown-flip {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(-90deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

.countdown-flip {
    animation: countdown-flip 0.6s ease-in-out;
}

/* ローディングアニメーション */
@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    margin: 0 2px;
    animation: loading-dots 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* テキストグラデーションアニメーション */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animate {
    background: linear-gradient(270deg, #00B4D8, #FFB700, #FF6B6B, #00B4D8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}