/* ========================================
   掃除日記 - アニメーションスタイルシート
   ======================================== */

/* ----------------------------------------
   1. Keyframe Animations
   ---------------------------------------- */

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

/* フェードイン */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* スライドイン（上から） */
@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スライドイン（下から） */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スライドイン（左から） */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スライドイン（右から） */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 拡大フェードイン */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* パルス */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 回転 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

/* シェイク */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* グラデーション移動 */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 波紋エフェクト */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ----------------------------------------
   2. Animation Classes
   ---------------------------------------- */

/* フェードインアニメーション */
.animate-fadeIn {
    animation: fadeIn 0.6s ease-out;
}

/* スライドインアニメーション */
.animate-slideInTop {
    animation: slideInTop 0.6s ease-out;
}

.animate-slideInBottom {
    animation: slideInBottom 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

/* 拡大アニメーション */
.animate-scaleIn {
    animation: scaleIn 0.6s ease-out;
}

/* パルスアニメーション */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 回転アニメーション */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* バウンスアニメーション */
.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* シェイクアニメーション */
.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ----------------------------------------
   3. Hover Effects
   ---------------------------------------- */

/* カードホバー */
.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.15);
}

/* ボタンホバー */
.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* リンクホバー */
.hover-underline {
    position: relative;
    overflow: hidden;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* ----------------------------------------
   4. Loading Animations
   ---------------------------------------- */

/* ローディングスピナー */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ローディングドット */
.loading-dots {
    display: inline-flex;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

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

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

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

/* ----------------------------------------
   5. Special Effects
   ---------------------------------------- */

/* グラデーション背景アニメーション */
.gradient-animated {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

/* 波紋ボタン */
.ripple-button {
    position: relative;
    overflow: hidden;
}

.ripple-button::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-button:active::before {
    width: 300px;
    height: 300px;
}

/* パーティクルエフェクト */
.particles {
    position: relative;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

/* ----------------------------------------
   6. Transition Utilities
   ---------------------------------------- */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.2s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}

/* ----------------------------------------
   7. Animation Delays
   ---------------------------------------- */

.delay-100 {
    animation-delay: 0.1s;
}

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

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

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

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

/* ----------------------------------------
   8. Scroll Animations (AOS Override)
   ---------------------------------------- */

[data-aos] {
    transition-property: transform, opacity;
}

[data-aos][data-aos][data-aos-duration="400"] {
    transition-duration: 0.4s;
}

[data-aos][data-aos][data-aos-duration="600"] {
    transition-duration: 0.6s;
}

[data-aos][data-aos][data-aos-duration="800"] {
    transition-duration: 0.8s;
}

[data-aos][data-aos][data-aos-easing="ease-in-out"] {
    transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

/* カスタムAOSアニメーション */
[data-aos="zoom-in-up"] {
    transform: scale(0.6) translateY(40px);
    opacity: 0;
}

[data-aos="zoom-in-up"].aos-animate {
    transform: scale(1) translateY(0);
    opacity: 1;
}