/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 上浮动画 */
@keyframes floatUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 缩放动画 */
@keyframes scale {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 波浪动画 */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 闪烁动画 */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 横向移动动画 */
@keyframes moveHorizontal {
    0% {
        transform: translateX(-10px);
    }
    50% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(-10px);
    }
}

/* 优化的上浮渐变动画 */
@keyframes smoothFloatUp {
    0% {
        transform: translateY(15px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 图片加载动画 */
@keyframes imageReveal {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* 加载点动画 */
@keyframes loadingDots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
    100% { content: ""; }
}

/* 应用动画的类 */
.fade-in {
    animation: fadeIn 0.7s ease forwards;
    will-change: opacity;
}

.float-up {
    animation: smoothFloatUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    will-change: transform, opacity;
}

.scale-in {
    animation: scale 0.5s ease forwards;
}

.rotate {
    animation: rotate 10s linear infinite;
}

.wave {
    animation: wave 3s ease-in-out infinite;
}

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

.move-horizontal {
    animation: moveHorizontal 5s ease-in-out infinite;
}

/* 动画延迟类 */
.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;
}

/* 山峰详情动画 */
.detail-enter {
    animation: floatUp 0.5s ease forwards;
}

/* 山峰标记特效 */
.point-marker.active {
    animation: scale 0.5s ease forwards, pulse 2s infinite;
}

/* 页面过渡动画 */
.page-transition {
    animation: fadeIn 0.5s ease forwards;
}

/* 滚动提示动画 */
.scroll-hint {
    animation: moveHorizontal 2s ease-in-out infinite;
}

/* 云朵装饰 */
.cloud-decoration {
    position: absolute;
    opacity: 0.7;
}

/* 鸟飞动画 */
@keyframes birdFly {
    0% {
        transform: translateX(-100%) translateY(0);
    }
    50% {
        transform: translateX(0) translateY(-20px);
    }
    100% {
        transform: translateX(100%) translateY(0);
    }
}

.bird-animation {
    animation: birdFly 15s linear infinite;
}

/* 加载指示器 */
.image-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 图片容器样式 */
.detail-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 18px;
}

/* 图片加载完成动画 */
.detail-image.loaded {
    animation: imageReveal 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* 按钮加载状态 */
.explore-btn.loading {
    background: linear-gradient(135deg, #2980b9, #3498db);
    pointer-events: none;
}

.loading-dots::after {
    content: "";
    animation: loadingDots 1.5s infinite;
    display: inline-block;
    width: 12px;
    text-align: left;
}

/* 吸引注意力的脉动 */
@keyframes attention {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.attention {
    animation: attention 1s ease-in-out 2;
}

/* 卡片内容渐入效果 */
.detail-header.fade-in,
.detail-description.fade-in,
.detail-history.fade-in,
.detail-attractions.fade-in,
.detail-footer.fade-in {
    animation-delay: 0.1s;
}

.attraction-item.fade-in {
    animation-name: smoothFloatUp;
}

/* 占位图像样式 */
.placeholder-image {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-align: center;
}

/* 骨架屏动画 */
@keyframes shimmerAnimation {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.skeleton-loading {
    position: relative;
}

.skeleton-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: shimmerAnimation;
    animation-timing-function: linear;
    background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
    background-size: 800px 104px;
}

.skeleton-title {
    height: 28px;
    width: 70%;
    margin: 0 auto 10px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.skeleton-subtitle {
    height: 16px;
    width: 50%;
    margin: 0 auto 10px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.skeleton-image {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    background-color: #f0f0f0;
}

.skeleton-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.skeleton-text:last-child {
    width: 80%;
}

.skeleton-item {
    height: 40px;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* 优化滚动体验 */
.detail-content {
    scroll-snap-type: y proximity;
}

.detail-header,
.detail-image-container,
.detail-description,
.detail-history,
.detail-attractions,
.detail-footer {
    scroll-snap-align: start;
}

/* 优化动画性能 */
.detail-image.loaded {
    animation: imageReveal 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    transform-origin: center;
    will-change: opacity, transform, filter;
}