/* 自定义动画样式 - 保持之前的 style.css 内容，并追加新的全息特效 */

/* --- 移动端全屏优化核心样式 --- */
* {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

input,
textarea,
.selectable-text {
    user-select: text;
    -webkit-user-select: text;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background-color: #0f172a;
}

.app-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- 基础动画 --- */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out forwards;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

.glitch-effect {
    text-shadow: 2px 2px 0px #4f46e5, -2px -2px 0px #ff00ff;
}

/* 摄像头扫描线 */
@keyframes scan-line {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

.camera-scan-line {
    animation: scan-line 2s ease-in-out infinite;
}

/* 人脸框呼吸效果 */
@keyframes face-guide-pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.02);
    }
}

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

/* 角落装饰闪烁 */
@keyframes corner-blink {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.corner-decoration {
    animation: corner-blink 1.5s ease-in-out infinite;
}

/* 倒计时数字缩放 */
@keyframes countdown-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown-number {
    animation: countdown-pop 0.5s ease-out;
}

/* --- 特工证高级视觉效果 (增强版) --- */

/* 1. 高级流光扫描 (Holographic Sweep) */
@keyframes holo-scan {
    0% {
        transform: translateY(-100%) rotate(15deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(200%) rotate(15deg);
        opacity: 0;
    }
}

.holo-scan-overlay::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 50%;
    background: linear-gradient(to bottom,
            transparent,
            rgba(79, 70, 229, 0.4),
            /* Indigo glint */
            rgba(255, 255, 255, 0.6),
            /* White core */
            rgba(79, 70, 229, 0.4),
            transparent);
    transform: rotate(15deg);
    animation: holo-scan 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: overlay;
}

/* 2. 微光纹理 (Shimmer Texture) */
@keyframes shimmer-bg {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 200%;
    }
}

.shimmer-bg-animate {
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0) 40%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 60%);
    background-size: 200% 200%;
    animation: shimmer-bg 6s linear infinite;
}

/* 3. 信号干扰 (Glitch Text) */
@keyframes text-glitch {
    0% {
        transform: translate(0);
    }

    2% {
        transform: translate(-2px, 1px);
    }

    4% {
        transform: translate(2px, -1px);
    }

    6% {
        transform: translate(0);
    }

    100% {
        transform: translate(0);
    }
}

.glitch-text-anim:hover {
    animation: text-glitch 0.5s infinite;
}

/* 全息彩虹效果 (旧，保留) */
@keyframes holographic {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.holographic-effect {
    background: linear-gradient(135deg,
            rgba(255, 0, 128, 0.3) 0%,
            rgba(0, 255, 255, 0.3) 25%,
            rgba(255, 255, 0, 0.3) 50%,
            rgba(0, 128, 255, 0.3) 75%,
            rgba(255, 0, 128, 0.3) 100%);
    background-size: 400% 400%;
    animation: holographic 4s ease infinite;
}

/* 社交分享按钮悬停效果 */
@keyframes share-btn-glow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
    }
}

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

/* 成功页面背景粒子效果 */
@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-10px) translateX(-10px);
        opacity: 0.5;
    }

    75% {
        transform: translateY(-30px) translateX(5px);
        opacity: 0.6;
    }
}

.floating-particle {
    animation: float-particle 6s ease-in-out infinite;
}