/* ========== CYBERPUNK ENHANCEMENTS ========== */
/* 为Zeus Chain添加炫酷的赛博朋克风格效果 */

/* 全局变量 */
:root {
    --cyber-blue: #00d9ff;
    --cyber-pink: #ff006e;
    --cyber-purple: #8b5cf6;
    --cyber-yellow: #ffd60a;
    --neon-glow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor;
    --neon-glow-strong: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor, 0 0 80px currentColor;
}

/* ========== 动态背景网格 ========== */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

/* ========== 霓虹灯效果 ========== */
.neon-text {
    text-shadow: var(--neon-glow);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

.neon-text-strong {
    text-shadow: var(--neon-glow-strong);
    animation: neonPulseStrong 1.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from { text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor; }
    to { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor; }
}

@keyframes neonPulseStrong {
    from { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor; }
    to { text-shadow: 0 0 20px currentColor, 0 0 40px currentColor, 0 0 80px currentColor, 0 0 100px currentColor; }
}

/* ========== 玻璃态效果 ========== */
.glassmorphism {
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 32px 0 rgba(99, 102, 241, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.glassmorphism-strong {
    background: rgba(30, 30, 45, 0.8);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow:
        0 8px 32px 0 rgba(99, 102, 241, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ========== 悬浮3D效果 ========== */
.hover-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow:
        0 20px 60px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.3);
}

/* ========== 炫光边框 ========== */
.glow-border {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #d946ef, #8b5cf6, #6366f1);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientRotate 3s ease infinite;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes gradientRotate {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========== 数据流动效果 ========== */
.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.data-stream::before,
.data-stream::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(99, 102, 241, 0.8),
        transparent
    );
    animation: dataFlow 3s linear infinite;
}

.data-stream::before {
    left: 10%;
    animation-delay: 0s;
}

.data-stream::after {
    left: 90%;
    animation-delay: 1.5s;
}

@keyframes dataFlow {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* ========== 脉冲光环 ========== */
.pulse-ring {
    position: relative;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

/* ========== 扫描线效果 ========== */
.scanlines {
    position: relative;
    overflow: hidden;
}

.scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(99, 102, 241, 0.03) 51%
    );
    background-size: 100% 4px;
    pointer-events: none;
    animation: scanlines 8s linear infinite;
    z-index: 10;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* ========== 全息投影效果 ========== */
.holographic {
    position: relative;
    background: linear-gradient(
        45deg,
        rgba(99, 102, 241, 0.1),
        rgba(139, 92, 246, 0.1),
        rgba(217, 70, 239, 0.1),
        rgba(139, 92, 246, 0.1),
        rgba(99, 102, 241, 0.1)
    );
    background-size: 400% 400%;
    animation: holographicShift 8s ease infinite;
}

.holographic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: holographicScan 3s ease-in-out infinite;
}

@keyframes holographicShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes holographicScan {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ========== 粒子光点 ========== */
.particle-dots {
    position: relative;
}

.particle-dots::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(99, 102, 241, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-20px) translateX(20px); }
}

/* ========== 能量波纹 ========== */
.energy-ripple {
    position: relative;
    overflow: hidden;
}

.energy-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.4) 0%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    animation: energyPulse 3s ease-out infinite;
}

@keyframes energyPulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 500px;
        height: 500px;
        opacity: 0;
    }
}

/* ========== 数字雨效果 ========== */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* ========== 炫彩渐变文字 ========== */
.gradient-text {
    background: linear-gradient(
        135deg,
        #6366f1 0%,
        #8b5cf6 25%,
        #d946ef 50%,
        #8b5cf6 75%,
        #6366f1 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========== 发光按钮增强 ========== */
.cyber-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cyber-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cyber-button:hover::before {
    width: 300px;
    height: 300px;
}

.cyber-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 0 20px rgba(99, 102, 241, 0.6),
        0 0 40px rgba(99, 102, 241, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ========== 卡片翻转效果 ========== */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* ========== 光束效果 ========== */
.light-beam {
    position: relative;
    overflow: hidden;
}

.light-beam::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: beamSweep 3s ease-in-out infinite;
}

@keyframes beamSweep {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* ========== 故障效果 ========== */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitchTop 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
    animation: glitchBottom 2.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitchTop {
    0%, 90%, 100% { transform: translateX(0); }
    92% { transform: translateX(-2px); }
    94% { transform: translateX(2px); }
}

@keyframes glitchBottom {
    0%, 90%, 100% { transform: translateX(0); }
    91% { transform: translateX(2px); }
    93% { transform: translateX(-2px); }
}

/* ========== 增强现有元素 ========== */
/* 为卡片添加炫酷效果 */
.stat-card,
.pool-card,
.my-stat-card,
.highlight-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before,
.pool-card::before,
.my-stat-card::before,
.highlight-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #d946ef, #8b5cf6, #6366f1);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientRotate 4s ease infinite;
    filter: blur(10px);
}

.stat-card:hover::before,
.pool-card:hover::before,
.my-stat-card:hover::before,
.highlight-card:hover::before {
    opacity: 0.6;
}

/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .cyber-grid {
        background-size: 30px 30px;
    }

    .neon-text-strong {
        text-shadow: var(--neon-glow);
    }

    .hover-3d:hover {
        transform: translateY(-5px);
    }
}

/* ========== 性能优化 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
