/* ========================================
   Arwes 风格特效 - Arwes Effects
   ======================================== */

/* ==================== 文字特效 ==================== */

/* 打字机效果 */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    50% { border-color: transparent; }
}

.typewriter-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--accent-primary);
    animation: 
        typewriter 3s steps(40) 1s 1 normal both,
        blink-caret 0.75s step-end infinite;
}

/* 闪烁效果 */
@keyframes flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 77.999%, 79%, 100% {
        opacity: 1;
    }
    20%, 21.999%, 63%, 63.999%, 78%, 78.999% {
        opacity: 0.4;
    }
}

.flicker-text {
    animation: flicker 3s linear infinite;
}

/* 霓虹发光文字 */
.neon-text {
    text-shadow:
        0 0 5px var(--accent-primary),
        0 0 10px var(--accent-primary),
        0 0 20px var(--accent-primary),
        0 0 40px var(--accent-primary);
}

/* 脉冲文字效果 */
@keyframes text-pulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px var(--accent-primary);
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 20px var(--accent-primary), 0 0 30px var(--accent-primary);
    }
}

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

/* 扫描线文字效果 */
.scanline-text {
    position: relative;
    display: inline-block;
}

.scanline-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

/* ==================== 卡片特效 ==================== */

/* 全息效果 */
@keyframes hologram {
    0% {
        opacity: 0.5;
        background-position: 0 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
        background-position: 10px 10px;
    }
}

.hologram-card {
    position: relative;
    overflow: hidden;
}

.hologram-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 212, 255, 0.1) 25%,
        transparent 25%,
        transparent 50%,
        rgba(0, 212, 255, 0.1) 50%,
        rgba(0, 212, 255, 0.1) 75%,
        transparent 75%
    );
    background-size: 10px 10px;
    animation: hologram 2s linear infinite;
    pointer-events: none;
    z-index: 0;
}

/* 科技感边框 - 角落装饰 */
.tech-border {
    position: relative;
}

.tech-border::before,
.tech-border::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    z-index: 1;
}

.tech-border::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.tech-border::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* 发光边框 */
.glow-border {
    border: 1px solid var(--accent-primary);
    box-shadow: 
        0 0 5px rgba(0, 212, 255, 0.2),
        0 0 10px rgba(0, 212, 255, 0.2),
        0 0 20px rgba(0, 212, 255, 0.2),
        inset 0 0 5px rgba(0, 212, 255, 0.1);
}

/* ==================== 动画效果 ==================== */

/* 淡入动画 */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fade-in 0.6s ease-out;
}

/* 滑入动画 */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slide-in-left 0.6s ease-out;
}

.slide-in-right {
    animation: slide-in-right 0.6s ease-out;
}

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

.scale-in {
    animation: scale-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 旋转进入 */
@keyframes rotate-in {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.rotate-in {
    animation: rotate-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 脉冲加载 */
@keyframes pulse-loading {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

.pulse-loading {
    animation: pulse-loading 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 旋转加载 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-loading {
    animation: spin 1s linear infinite;
}

/* 环形加载器 */
.loading-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==================== 交互效果 ==================== */

/* 点击波纹效果 */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
}

/* 悬停发光效果 */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 
        0 0 10px rgba(0, 212, 255, 0.3),
        0 0 20px rgba(0, 212, 255, 0.2),
        0 0 30px rgba(0, 212, 255, 0.1);
}

/* 悬停上浮效果 */
.hover-float {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-float:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 悬停缩放效果 */
.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ==================== 背景效果 ==================== */

/* 移动的网格线 */
@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.animated-grid {
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 2s linear infinite;
}

/* 粒子背景效果 */
@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(20px);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: particle-float 10s linear infinite;
}

/* 扫描线背景 */
.scanlines-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

/* ==================== 按钮特效 ==================== */

/* 赛博朋克按钮 */
.cyber-btn {
    position: relative;
    overflow: hidden;
    background: var(--arwes-primary);
    border: none;
    padding: 15px 30px;
    color: var(--bg-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cyber-btn::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.5s;
}

.cyber-btn:hover::before {
    left: 100%;
}

.cyber-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 霓虹按钮 */
.neon-btn {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow:
        0 0 10px var(--accent-primary),
        0 0 20px var(--accent-primary),
        0 0 30px var(--accent-primary);
}

/* ==================== 输入框特效 ==================== */

/* 赛博输入框 */
.cyber-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 15px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
    position: relative;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 
        0 0 10px rgba(0, 212, 255, 0.3),
        inset 0 0 10px rgba(0, 212, 255, 0.1);
}

/* 扫描线输入框 */
.scanline-input {
    position: relative;
}

.scanline-input::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.scanline-input:focus-within::after {
    transform: scaleX(1);
}

/* ==================== 数据展示特效 ==================== */

/* 数字滚动效果 */
@keyframes number-scroll {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.number-scroll {
    display: inline-block;
    animation: number-scroll 0.5s ease-out;
}

/* 进度条动画 */
@keyframes progress-fill {
    from { width: 0; }
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--arwes-primary);
    animation: progress-fill 1s ease-out;
}

/* ==================== 响应式动画 ==================== */

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

/* ==================== 工具类 ==================== */

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

/* 动画持续时间 */
.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.6s; }
.duration-slow { animation-duration: 1s; }

/* 动画迭代次数 */
.animate-once { animation-iteration-count: 1; }
.animate-infinite { animation-iteration-count: infinite; }
