/* Performance and Contrast Fixes */

/* Disable heavy animations */
.shape,
.particle,
.hologram-container,
.matrix-column {
    will-change: auto !important;
}

/* Simplify particle animation */
.particle {
    animation: particle-rise 15s linear infinite !important;
}

/* Reduce shape animations */
.shape {
    animation: float-random 30s infinite ease-in-out !important;
}

/* Fix floating cards contrast and position */
.floating-cards {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 5;
}

.float-card {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.95), rgba(45, 27, 105, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 217, 255, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #FFFFFF !important;
    font-weight: 600;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 217, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: float-card 3s ease-in-out infinite;
    animation-delay: var(--delay);
    transition: all 0.3s ease;
}

.float-card:hover {
    transform: scale(1.05);
    border-color: rgba(0, 217, 255, 0.6);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 217, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.float-card i {
    font-size: 1.25rem;
    color: #00D9FF !important;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

.float-card span {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

@keyframes float-card {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(-10px) translateY(-5px);
    }
}

/* Optimize robot cards */
.robot-card {
    /* Remove heavy shadows on hover */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.robot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Disable transform on features for performance */
.feature-card:hover {
    transform: translateY(-3px) !important;
}

/* Optimize price cards */
.price-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card:hover {
    transform: translateY(-3px);
}

.price-card.popular {
    transform: scale(1.05) !important;
}

/* Fix badge contrast */
.badge {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9), rgba(45, 27, 105, 0.9)) !important;
    backdrop-filter: blur(15px);
    border: 1.5px solid rgba(0, 217, 255, 0.4);
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 217, 255, 0.2);
}

/* Reduce animation complexity */
@keyframes gradient-border {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

/* Simplify morph animation */
@keyframes morph {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 60% 30% 70% 40%;
        transform: scale(1);
    }
    50% {
        border-radius: 30% 70% 40% 60% / 70% 60% 40% 30%;
        transform: scale(1.1);
    }
}

/* Responsive adjustments for floating cards */
@media (max-width: 1200px) {
    .floating-cards {
        right: 10px;
    }
}

@media (max-width: 992px) {
    .floating-cards {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin-top: 2rem;
        flex-wrap: wrap;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .shape,
    .particle,
    .cyber-grid,
    .matrix-rain,
    .neon-lines {
        display: none !important;
    }
    
    .float-card {
        animation: none !important;
    }
    
    .floating-cards {
        position: static;
        transform: none;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 2rem;
    }
    
    .float-card {
        min-width: 150px;
    }
}

/* GPU optimization */
.hero,
.hero-bg-animation,
.floating-shapes {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Reduce blur for performance */
@supports not (backdrop-filter: blur(10px)) {
    .float-card,
    .badge,
    .glass-element {
        background: rgba(15, 15, 30, 0.95) !important;
    }
}

/* Fix white text visibility */
.hero * {
    color: #FFFFFF;
}

.hero .hero-title,
.hero .hero-description,
.hero .stat-label {
    color: #FFFFFF !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Ensure stat numbers are visible */
.stat-number {
    background: linear-gradient(135deg, #00D9FF, #FF10F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Optimize animations frame rate */
* {
    animation-timing-function: steps(60) !important;
}

/* Smooth animations only for non-heavy elements */
.btn,
.nav-link,
.card {
    animation-timing-function: ease !important;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}