/* Modern Next-Gen Enhancements */

/* Cyber Grid Background */
.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Neural Network Animation */
.neural-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.float-item {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    animation: float-around 15s infinite ease-in-out;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.float-item:nth-child(1) { animation-delay: 0s; }
.float-item:nth-child(2) { animation-delay: 2s; }
.float-item:nth-child(3) { animation-delay: 4s; }
.float-item:nth-child(4) { animation-delay: 6s; }

@keyframes float-around {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(90deg); }
    50% { transform: translateY(0) rotate(180deg); }
    75% { transform: translateY(30px) rotate(270deg); }
}

/* Glitch Text Effect */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    color: white;
    animation: glitch-skew 1s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff, 2px 2px #ff00ff;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    5% { clip: rect(70px, 9999px, 71px, 0); }
    10% { clip: rect(60px, 9999px, 62px, 0); }
    100% { clip: rect(82px, 9999px, 29px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    100% { clip: rect(21px, 9999px, 46px, 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(-2deg); }
    20% { transform: skew(2deg); }
    30% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: rgba(255, 255, 255, 0.75); }
}

/* Glassmorphism Buttons */
.btn-glow {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 8px 48px rgba(102, 126, 234, 0.6); }
}

.btn-hologram {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-hologram::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: 0.5s;
}

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

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Tech Stats */
.tech-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-stat {
    text-align: center;
    flex: 1;
}

.tech-stat .stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-stat .stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* Holographic Container */
.holographic-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.hologram-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: rotate-ring 10s linear infinite;
}

.hologram-ring.delay-1 {
    animation-delay: -3.33s;
    border-color: rgba(118, 75, 162, 0.3);
}

.hologram-ring.delay-2 {
    animation-delay: -6.66s;
    border-color: rgba(139, 92, 246, 0.3);
}

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

.hero-logo.hologram {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.6));
    animation: hologram-flicker 3s infinite;
}

@keyframes hologram-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.hologram-glow {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

/* Data Stream */
.data-stream {
    position: absolute;
    top: 50%;
    right: -100px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-stream span {
    font-family: 'Courier New', monospace;
    color: rgba(16, 185, 129, 0.6);
    font-size: 1.2rem;
    animation: scroll-data 2s linear infinite;
}

.data-stream span:nth-child(2) { animation-delay: 0.5s; }
.data-stream span:nth-child(3) { animation-delay: 1s; }
.data-stream span:nth-child(4) { animation-delay: 1.5s; }

@keyframes scroll-data {
    0% { transform: translateY(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100px); opacity: 0; }
}

/* Modern Section Headers */
.section-header-modern {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* AI Visualization Section */
.ai-visualization {
    padding: 6rem 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.ai-visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1), transparent 70%);
    z-index: 0;
}

.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.ai-card {
    padding: 3rem 2rem;
    border-radius: 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.ai-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
}

.ai-card:hover::before {
    left: 100%;
}

.ai-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.ai-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent-primary);
}

.ai-icon .pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

.ai-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.ai-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    animation: progress-flow 2s ease-in-out;
}

@keyframes progress-flow {
    0% { width: 0; }
}

.progress-label {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* Modern Product Cards */
.modern-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.5);
}

.card-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s;
}

.modern-card:hover .card-glow {
    opacity: 0.5;
}

.product-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 10;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.featured-card {
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.3));
    mix-blend-mode: multiply;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.8), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.tech-specs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.spec {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.spec i {
    color: var(--accent-primary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cyber-grid {
        background-size: 30px 30px;
    }
    
    .float-item {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .glitch::before,
    .glitch::after {
        display: none;
    }
    
    .typewriter {
        white-space: normal;
        border-right: none;
        animation: none;
    }
    
    .tech-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .tech-stat .stat-value {
        font-size: 2rem;
    }
    
    .holographic-container {
        width: 300px;
        height: 300px;
    }
    
    .data-stream {
        display: none;
    }
    
    .gradient-text {
        font-size: 2rem;
    }
    
    .ai-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-badge {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
    }
    
    .gradient-text {
        font-size: 1.8rem;
    }
    
    .ai-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}