/* 
 * 猫份证主题动画效果
 * 添加丰富的视觉效果和交互动画
 */

/* 猫爪背景动画 */
.paw-animation {
    position: fixed;
    width: 40px;
    height: 40px;
    background-image: url('../images/paw-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* 猫爪点击效果 */
.paw-click {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('../images/paw-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    animation: pawClick 0.5s ease forwards;
}

@keyframes pawClick {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* 页面过渡动画 */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-transition-active .page-transition-overlay {
    opacity: 0.2;
    pointer-events: all;
}

/* 内容淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 猫咪卡片悬停动画 */
.cat-card {
    transition: all 0.3s ease;
}

.cat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 猫爪加载动画 */
.paw-loading {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.paw-loading div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: paw-loading 1.2s linear infinite;
}

.paw-loading div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.paw-loading div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
}

.paw-loading div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
}

.paw-loading div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
}

.paw-loading div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
}

.paw-loading div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
}

.paw-loading div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
}

.paw-loading div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
}

.paw-loading div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
}

@keyframes paw-loading {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 卡片内容动画 */
.card-content-animation {
    transition: all 0.5s ease;
}

.card-content-animation:hover .card-icon {
    transform: scale(1.1) rotate(10deg);
}

.card-content-animation:hover .card-title {
    transform: translateY(-3px);
    color: var(--primary-color);
}

/* 猫咪统计数字增长动画 */
.counter-value {
    display: inline-block;
    transition: all 0.8s ease;
}

.counter-animate {
    animation: counterPulse 0.4s ease;
}

@keyframes counterPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: var(--primary-color);
    }
    100% {
        transform: scale(1);
    }
}

/* 页面滚动进度指示器 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1001;
    transition: width 0.2s ease;
}
