/* GTA SAMP MBC Crypto RP - Crypto Effects & Animations */

/* Advanced Crypto Background Effects */
.crypto-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-crypto);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 10s infinite ease-in-out;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Blockchain Animation */
.blockchain-chain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chain-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-crypto);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-crypto);
    opacity: 0.6;
}

.chain-link {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-crypto), transparent);
    opacity: 0.3;
    transform-origin: left center;
}

/* Crypto Price Ticker Animation */
.price-ticker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    position: relative;
}

.price-change {
    position: relative;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-change.up {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success-crypto);
    animation: priceUp 0.5s ease;
}

.price-change.down {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger-crypto);
    animation: priceDown 0.5s ease;
}

@keyframes priceUp {
    0% { transform: translateY(2px); opacity: 0.5; }
    50% { transform: translateY(-2px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes priceDown {
    0% { transform: translateY(-2px); opacity: 0.5; }
    50% { transform: translateY(2px); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Mining Animation */
.mining-animation {
    position: relative;
    display: inline-block;
}

.mining-rig-3d {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: rigRotate3d 8s linear infinite;
}

@keyframes rigRotate3d {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.gpu-3d {
    position: absolute;
    width: 30px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-crypto), var(--secondary-crypto));
    border: 1px solid var(--primary-crypto);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.gpu-3d:nth-child(1) {
    transform: translateZ(20px);
}

.gpu-3d:nth-child(2) {
    transform: translateZ(0px);
}

.gpu-3d:nth-child(3) {
    transform: translateZ(-20px);
}

.fan-3d {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 50%;
    animation: fanSpin3d 1s linear infinite;
}

@keyframes fanSpin3d {
    0% { transform: translate(-50%, -50%) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) rotateZ(360deg); }
}

/* Hash Rate Display */
.hashrate-display {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-crypto);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hashrate-value {
    position: relative;
}

.hashrate-value::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 6px;
    height: 6px;
    background: var(--success-crypto);
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
}

/* Mining Progress Bar */
.mining-progress {
    width: 100%;
    height: 8px;
    background: var(--darker-crypto);
    border: 1px solid var(--border-crypto);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.mining-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-crypto), var(--success-crypto));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mining-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Crypto Transaction Animation */
.transaction-animation {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tx-pulse {
    width: 10px;
    height: 10px;
    background: var(--success-crypto);
    border-radius: 50%;
    animation: txPulse 2s ease-in-out infinite;
}

@keyframes txPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

.tx-arrow {
    animation: txMove 3s ease-in-out infinite;
}

@keyframes txMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Wallet Balance Animation */
.wallet-balance {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-crypto);
    position: relative;
}

.wallet-balance.updating {
    animation: balanceUpdate 0.5s ease;
}

@keyframes balanceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Staking Animation */
.staking-pool {
    position: relative;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

.staking-pool::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-crypto), var(--secondary-crypto), var(--primary-crypto));
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    animation: stakingGlow 3s ease-in-out infinite;
}

@keyframes stakingGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.3; }
}

.staking-apy {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--success-crypto);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Trading Chart Animations */
.chart-line {
    stroke: var(--primary-crypto);
    stroke-width: 2;
    fill: none;
    animation: drawLine 2s ease-in-out;
}

.chart-area {
    fill: url(#chartGradient);
    opacity: 0.8;
    animation: fadeIn 1s ease-in;
}

@keyframes drawLine {
    0% {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 0.8; }
}

/* Order Book Animation */
.order-book-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-book-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: currentColor;
    opacity: 0.1;
    transition: width 0.3s ease;
}

.order-book-item.sell {
    color: var(--danger-crypto);
}

.order-book-item.buy {
    color: var(--success-crypto);
}

.order-book-item:hover {
    transform: translateX(5px);
}

/* Crypto Button Effects */
.crypto-button {
    position: relative;
    background: linear-gradient(135deg, var(--primary-crypto), var(--secondary-crypto));
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.crypto-button::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 ease;
}

.crypto-button:hover::before {
    left: 100%;
}

.crypto-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

/* Loading Animation */
.crypto-loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-crypto);
    border-top: 3px solid var(--primary-crypto);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Animations */
.success-flash {
    animation: successFlash 0.5s ease;
}

@keyframes successFlash {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(0, 255, 136, 0.2); }
}

.error-flash {
    animation: errorFlash 0.5s ease;
}

@keyframes errorFlash {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(255, 68, 68, 0.2); }
}

/* Notification Animation */
.crypto-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(26, 31, 46, 0.95);
    border: 1px solid var(--primary-crypto);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.crypto-notification.success {
    border-color: var(--success-crypto);
}

.crypto-notification.error {
    border-color: var(--danger-crypto);
}

.crypto-notification.warning {
    border-color: var(--warning-crypto);
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.crypto-notification.hiding {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal Crypto Effects */
.crypto-modal .modal-content {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95), rgba(10, 14, 26, 0.95));
    border: 1px solid var(--primary-crypto);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.crypto-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-crypto), var(--secondary-crypto));
    border-bottom: none;
}

.crypto-modal .modal-header h3 {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Form Crypto Effects */
.crypto-form .form-group input:focus {
    border-color: var(--primary-crypto);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.crypto-form .form-group input:focus + label {
    color: var(--primary-crypto);
}

/* Tab Crypto Effects */
.crypto-tabs .tab-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-tabs .tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-crypto);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.crypto-tabs .tab-btn.active::before,
.crypto-tabs .tab-btn:hover::before {
    width: 100%;
}

.crypto-tabs .tab-btn.active {
    color: var(--primary-crypto);
}

/* Card Crypto Effects */
.crypto-card {
    position: relative;
    background: rgba(26, 31, 46, 0.8);
    border: 1px solid var(--border-crypto);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.crypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-crypto);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.crypto-card:hover::before {
    transform: scaleX(1);
}

.crypto-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-crypto);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.2);
}

/* Glow Effects */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glow-effect:hover::after {
    opacity: 1;
}

/* Neon Text Effects */
.neon-text {
    color: var(--primary-crypto);
    text-shadow: 
        0 0 10px rgba(0, 212, 255, 0.8),
        0 0 20px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2);
}

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

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(0, 212, 255, 0.8),
            0 0 20px rgba(0, 212, 255, 0.6),
            0 0 30px rgba(0, 212, 255, 0.4),
            0 0 40px rgba(0, 212, 255, 0.2);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(0, 212, 255, 1),
            0 0 25px rgba(0, 212, 255, 0.8),
            0 0 35px rgba(0, 212, 255, 0.6),
            0 0 45px rgba(0, 212, 255, 0.4);
    }
}

/* Responsive Crypto Effects */
@media (max-width: 768px) {
    .crypto-particles {
        display: none;
    }
    
    .blockchain-chain {
        display: none;
    }
    
    .floating-coins {
        display: none;
    }
    
    .crypto-animation {
        transform: scale(0.8);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .crypto-particles,
    .floating-coins,
    .blockchain-chain,
    .mining-rig-3d,
    .fan-3d,
    .tx-pulse,
    .staking-pool::before,
    .crypto-button::before {
        animation: none;
    }
    
    .crypto-card:hover,
    .crypto-button:hover,
    .order-book-item:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .crypto-particles,
    .floating-coins,
    .blockchain-chain,
    .crypto-animation,
    .crypto-loader {
        display: none;
    }
    
    .crypto-card {
        border: 1px solid #000;
        background: #fff;
        color: #000;
    }
    
    .neon-text {
        text-shadow: none;
        color: #000;
    }
}
