/* Web3 3D Dynamic Icon System for Dreamle Mining - Enhanced Version */
/* Web3 3D动态图标系统 - 增强版本 */

:root {
    /* === Web3图标色彩系统 === */
    --icon-primary: #00ff88;
    --icon-secondary: #00d4aa;
    --icon-accent: #0099cc;
    --icon-warning: #fbbf24;
    --icon-error: #ef4444;
    --icon-success: #10b981;
    --icon-info: #3b82f6;

    /* 新增霓虹色彩 */
    --icon-neon-green: #39ff14;
    --icon-neon-blue: #00ffff;
    --icon-neon-purple: #bf00ff;
    --icon-neon-pink: #ff1493;
    
    /* 渐变色彩 - 增强版 */
    --icon-gradient-primary: linear-gradient(135deg, #00ff88 0%, #00d4aa 50%, #0099cc 100%);
    --icon-gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --icon-gradient-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --icon-gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --icon-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);

    /* 新增霓虹渐变 */
    --icon-gradient-neon: linear-gradient(135deg, #39ff14 0%, #00ffff 50%, #bf00ff 100%);
    --icon-gradient-holographic: linear-gradient(45deg, #00ff88 0%, #00d4aa 25%, #0099cc 50%, #bf00ff 75%, #00ff88 100%);
    --icon-gradient-cyber: linear-gradient(135deg, #00ffff 0%, #ff1493 50%, #39ff14 100%);
    
    /* === 3D效果系统 - 增强版 === */
    --icon-shadow-3d: 0 4px 8px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.15);
    --icon-shadow-hover: 0 8px 25px rgba(0, 255, 136, 0.4), 0 12px 35px rgba(0, 0, 0, 0.2);
    --icon-shadow-active: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    --icon-glow-primary: 0 0 20px rgba(0, 255, 136, 0.6);
    --icon-glow-secondary: 0 0 15px rgba(0, 212, 170, 0.5);
    --icon-glow-accent: 0 0 12px rgba(0, 153, 204, 0.4);

    /* 新增霓虹发光效果 */
    --icon-glow-neon: 0 0 30px rgba(57, 255, 20, 0.8), 0 0 60px rgba(57, 255, 20, 0.4);
    --icon-glow-cyber: 0 0 25px rgba(0, 255, 255, 0.7), 0 0 50px rgba(255, 20, 147, 0.3);
    --icon-glow-holographic: 0 0 35px rgba(191, 0, 255, 0.6), 0 0 70px rgba(0, 255, 136, 0.3);

    /* 3D变换预设 */
    --icon-transform-hover: translateY(-3px) rotateX(15deg) rotateY(10deg) scale(1.1);
    --icon-transform-active: translateY(1px) rotateX(-10deg) scale(0.95);
    --icon-transform-float: translateY(-2px) rotateZ(2deg);
    
    /* === 动画系统 === */
    --icon-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --icon-transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --icon-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --icon-transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --icon-transition-elastic: 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* === 尺寸系统 === */
    --icon-xs: 16px;
    --icon-sm: 20px;
    --icon-md: 24px;
    --icon-lg: 32px;
    --icon-xl: 48px;
    --icon-2xl: 64px;
    --icon-3xl: 96px;
}

/* === 基础Web3图标类 === */
.web3-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-md);
    height: var(--icon-md);
    position: relative;
    cursor: pointer;
    transition: var(--icon-transition-normal);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.web3-icon svg,
.web3-icon img {
    width: 100%;
    height: 100%;
    transition: var(--icon-transition-normal);
    filter: drop-shadow(var(--icon-shadow-3d));
}

/* === 3D变换效果 === */
.web3-icon:hover {
    transform: translateY(-2px) rotateX(10deg) rotateY(5deg);
    filter: drop-shadow(var(--icon-shadow-hover));
}

.web3-icon:active {
    transform: translateY(1px) rotateX(-5deg) scale(0.95);
    filter: drop-shadow(var(--icon-shadow-active));
}

/* === 尺寸变体 === */
.web3-icon--xs { width: var(--icon-xs); height: var(--icon-xs); }
.web3-icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.web3-icon--md { width: var(--icon-md); height: var(--icon-md); }
.web3-icon--lg { width: var(--icon-lg); height: var(--icon-lg); }
.web3-icon--xl { width: var(--icon-xl); height: var(--icon-xl); }
.web3-icon--2xl { width: var(--icon-2xl); height: var(--icon-2xl); }
.web3-icon--3xl { width: var(--icon-3xl); height: var(--icon-3xl); }

/* === 颜色变体 === */
.web3-icon--primary {
    color: var(--icon-primary);
}

.web3-icon--primary:hover {
    color: var(--icon-secondary);
    filter: drop-shadow(var(--icon-glow-primary));
    animation: iconPulse 2s ease-in-out infinite;
}

.web3-icon--secondary {
    color: var(--icon-secondary);
}

.web3-icon--secondary:hover {
    color: var(--icon-accent);
    filter: drop-shadow(var(--icon-glow-secondary));
}

.web3-icon--warning {
    color: var(--icon-warning);
}

.web3-icon--error {
    color: var(--icon-error);
}

.web3-icon--success {
    color: var(--icon-success);
}

.web3-icon--info {
    color: var(--icon-info);
}

/* === 特殊效果变体 === */
.web3-icon--glow {
    position: relative;
    overflow: visible;
}

.web3-icon--glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--icon-primary) 0%, transparent 70%);
    opacity: 0;
    transition: var(--icon-transition-normal);
    z-index: -1;
    border-radius: 50%;
}

.web3-icon--glow:hover::before {
    opacity: 0.3;
    animation: glowPulse 1.5s ease-in-out infinite;
}

.web3-icon--gradient {
    background: var(--icon-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.web3-icon--holographic {
    position: relative;
    background: linear-gradient(45deg, 
        var(--icon-primary) 0%, 
        var(--icon-secondary) 25%, 
        var(--icon-accent) 50%, 
        var(--icon-secondary) 75%, 
        var(--icon-primary) 100%);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicShift 3s ease-in-out infinite;
}

/* === 动画关键帧 === */
@keyframes iconPulse {
    0%, 100% {
        transform: translateY(-2px) rotateX(10deg) rotateY(5deg) scale(1);
    }
    50% {
        transform: translateY(-4px) rotateX(15deg) rotateY(8deg) scale(1.05);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes holographicShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes iconBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0) rotateX(0);
    }
    40%, 43% {
        transform: translateY(-8px) rotateX(10deg);
    }
    70% {
        transform: translateY(-4px) rotateX(5deg);
    }
    90% {
        transform: translateY(-2px) rotateX(2deg);
    }
}

@keyframes iconShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px) rotateZ(-1deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px) rotateZ(1deg);
    }
}

/* === 新增Web3动画效果 === */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    50% {
        transform: translateY(-8px) rotateZ(2deg);
    }
}

@keyframes iconGlitch {
    0%, 100% {
        transform: translateX(0);
        filter: hue-rotate(0deg);
    }
    20% {
        transform: translateX(-2px);
        filter: hue-rotate(90deg);
    }
    40% {
        transform: translateX(2px);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translateX(-1px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translateX(1px);
        filter: hue-rotate(360deg);
    }
}

@keyframes iconMatrix {
    0% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
    25% {
        opacity: 0.7;
        transform: scale(1.1) rotateY(90deg);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9) rotateY(180deg);
    }
    75% {
        opacity: 0.7;
        transform: scale(1.1) rotateY(270deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(360deg);
    }
}

@keyframes iconNeonPulse {
    0%, 100% {
        filter: drop-shadow(var(--icon-glow-neon)) brightness(1);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(var(--icon-glow-cyber)) brightness(1.3);
        transform: scale(1.05);
    }
}

/* === 状态动画 - 增强版 === */
.web3-icon--loading {
    animation: iconSpin 1s linear infinite;
}

.web3-icon--bounce {
    animation: iconBounce 1s ease-in-out;
}

.web3-icon--shake {
    animation: iconShake 0.5s ease-in-out;
}

/* === 新增Web3特效类 === */
.web3-icon--float {
    animation: iconFloat 3s ease-in-out infinite;
}

.web3-icon--glitch {
    animation: iconGlitch 2s ease-in-out infinite;
}

.web3-icon--matrix {
    animation: iconMatrix 4s ease-in-out infinite;
}

.web3-icon--neon-pulse {
    animation: iconNeonPulse 2s ease-in-out infinite;
}

.web3-icon--cyber {
    background: var(--icon-gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(var(--icon-glow-cyber));
}

.web3-icon--holographic-enhanced {
    background: var(--icon-gradient-holographic);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicShift 3s ease-in-out infinite, iconFloat 4s ease-in-out infinite;
    filter: drop-shadow(var(--icon-glow-holographic));
}

/* === 容器和组合 === */
.web3-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--icon-transition-normal);
    position: relative;
    overflow: hidden;
}

.web3-icon-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.web3-icon-container:hover::before {
    left: 100%;
}

.web3-icon-container:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--icon-primary);
    transform: translateY(-2px);
    box-shadow: var(--icon-shadow-hover);
}

.web3-icon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--icon-gradient-primary);
    border: none;
    border-radius: 12px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: var(--icon-transition-normal);
    position: relative;
    overflow: hidden;
}

.web3-icon-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--icon-shadow-hover);
}

.web3-icon-button:active {
    transform: translateY(0) scale(0.98);
}

.web3-icon-badge {
    position: relative;
}

.web3-icon-badge::after {
    content: attr(data-badge);
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    background: var(--icon-error);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconBounce 0.5s ease-out;
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .web3-icon {
        width: var(--icon-lg);
        height: var(--icon-lg);
    }
    
    .web3-icon-container {
        padding: 12px;
    }
    
    .web3-icon-button {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* === 减少动画支持 === */
@media (prefers-reduced-motion: reduce) {
    .web3-icon,
    .web3-icon-container,
    .web3-icon-button {
        transition: none;
        animation: none;
    }
    
    .web3-icon:hover {
        transform: none;
    }
    
    .web3-icon--loading {
        animation: none;
    }
}
