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

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

/* フェードインアップ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* パルスアニメーション */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* グロー効果 */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

/* シェイクアニメーション */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

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

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

/* スライドイン（左から） */
@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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ミッション完了エフェクト */
@keyframes missionComplete {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 星キラキラエフェクト */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* レベルアップエフェクト */
@keyframes levelUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

/* ===================================
   アニメーションクラス
   =================================== */

.animate-fadeIn {
    animation: fadeIn 0.5s ease-in;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

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

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

.animate-scaleIn {
    animation: scaleIn 0.4s ease-out;
}

/* ===================================
   遅延アニメーション
   =================================== */

.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-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-glow:hover {
    animation: glow 1s ease-in-out infinite;
}

/* ===================================
   ページトランジション
   =================================== */

.page-transition {
    animation: fadeIn 0.3s ease-in;
}

/* ===================================
   ローディングアニメーション
   =================================== */

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    margin: 0 5px;
    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;
}

/* ===================================
   通知アニメーション
   =================================== */

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 2rem;
    background: var(--success-color);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.5s ease-out, fadeIn 0.5s ease-out;
    z-index: 9999;
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--secondary-color);
}

/* ===================================
   パーティクルエフェクト
   =================================== */

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 1s ease-out forwards;
}

/* ===================================
   スクロールアニメーション
   =================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

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

/* ===================================
   ボタンクリックエフェクト
   =================================== */

.btn-click-effect {
    position: relative;
    overflow: hidden;
}

.btn-click-effect::after {
    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;
}

.btn-click-effect:active::after {
    width: 300px;
    height: 300px;
}
