/* ==========================================================================
   小岛凪直播 - 动画样式表
   包含：关键帧动画、入场动画、光效、悬停效果
   ========================================================================== */

/* ==================== 关键帧动画 ==================== */

/* 光晕浮动 */
@keyframes float-glow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* 徽章圆点脉冲 */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* 滚轮滑动 */
@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 14px);
    }
}

/* 播放按钮呼吸 */
@keyframes pulse-play {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), 0 0 60px rgba(191, 0, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 240, 255, 0.7), 0 0 90px rgba(191, 0, 255, 0.5);
    }
}

/* 淡入 */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 上浮淡入 */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 缩放淡入 */
@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 左滑淡入 */
@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 右滑淡入 */
@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 标题霓虹闪烁 */
@keyframes neon-flicker {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 20px rgba(0, 240, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 240, 255, 0.8), 0 0 40px rgba(0, 240, 255, 0.5);
    }
}

/* 渐变背景流动 */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 边框流光 */
@keyframes border-glow {
    0%, 100% {
        border-color: rgba(0, 240, 255, 0.3);
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    }
    50% {
        border-color: rgba(191, 0, 255, 0.5);
        box-shadow: 0 0 25px rgba(191, 0, 255, 0.3);
    }
}

/* 数字递增光效 */
@keyframes count-glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.8));
    }
}

/* ==================== 入场动画基类 ==================== */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 不同方向的入场动画 ==================== */
[data-animate="fade-left"] {
    transform: translateX(-40px);
}

[data-animate="fade-left"].animated {
    transform: translateX(0);
}

[data-animate="fade-right"] {
    transform: translateX(40px);
}

[data-animate="fade-right"].animated {
    transform: translateX(0);
}

[data-animate="scale"] {
    transform: scale(0.9);
}

[data-animate="scale"].animated {
    transform: scale(1);
}

/* ==================== 英雄区标题动画 ==================== */
.hero-title .title-line {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: fade-in-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-title .title-line:nth-child(1) { animation-delay: 0.3s; }
.hero-title .title-line:nth-child(2) { animation-delay: 0.5s; }
.hero-title .title-line:nth-child(3) { animation-delay: 0.7s; }
.hero-title .title-line:nth-child(4) { animation-delay: 0.9s; }

/* ==================== 标题霓虹效果 ==================== */
.title-gradient {
    position: relative;
}

.title-gradient::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--gradient-cyan-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(15px);
    opacity: 0.5;
    z-index: -1;
}

/* ==================== 按钮流光效果 ==================== */
.btn-primary::before,
.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before,
.btn-premium:hover::before {
    left: 100%;
}

/* ==================== 卡片悬停3D效果 ==================== */
.service-card,
.stat-card,
.pricing-card {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==================== 案例图片悬停 ==================== */
.case-item {
    position: relative;
    overflow: hidden;
}

.case-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.8s;
    pointer-events: none;
    z-index: 3;
}

.case-item:hover::after {
    left: 100%;
}

/* ==================== 导航栏链接下划线 ==================== */
.nav-link {
    position: relative;
}

/* ==================== 表单输入聚焦光效 ==================== */
.form-group input,
.form-group select,
.form-group textarea {
    position: relative;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1),
                0 0 20px rgba(0, 240, 255, 0.2),
                inset 0 0 10px rgba(0, 240, 255, 0.05);
}

/* ==================== 时间线节点动画 ==================== */
.timeline-dot {
    animation: pulse-dot 2s infinite;
}

/* ==================== 数据数字光效 ==================== */
.stat-num,
.hero-stat-num {
    animation: count-glow 3s infinite;
}

/* ==================== 滚动指示器动画 ==================== */
.scroll-indicator {
    animation: fade-in 1s ease 1.5s both;
}

/* ==================== 加载动画 ==================== */
.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    margin: 0 3px;
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

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

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== 减少动效（无障碍） ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }

    .hero-title .title-line {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
