/* Custom ByteByteGo Animations for Dark Mode */
@keyframes flowData {
    0% { stroke-dashoffset: 100; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
.animated-line {
    stroke-dasharray: 10;
    animation: flowData 2s linear infinite;
}

@keyframes packetMove {
    0% { left: 0%; opacity: 0; transform: scale(0.5); }
    10% { opacity: 1; transform: scale(1); }
    90% { opacity: 1; transform: scale(1); }
    100% { left: 100%; opacity: 0; transform: scale(0.5); }
}
.data-packet { animation: packetMove 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.data-packet-delayed { animation: packetMove 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite 1.25s; }

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 40px 5px rgba(59, 130, 246, 0.8); transform: scale(1.02); }
}
.ai-core-glow { animation: pulseGlow 3s ease-in-out infinite; }

@keyframes heatmapFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-5px) scale(1.1); opacity: 0.8; }
}
.heat-dot { animation: heatmapFloat 4s ease-in-out infinite; }

/* Video Card & Modal Styles */
.video-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.video-card:hover {
    transform: translateY(-10px) scale(1.02);
}
.video-overlay {
    background: linear-gradient(0deg, rgba(11, 17, 32, 0.9) 0%, rgba(11, 17, 32, 0.4) 50%, rgba(11, 17, 32, 0) 100%);
}
.modal-enter {
    animation: modalScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Navigation Buttons & Animations */
.nav-btn-bounce {
    animation: navBounce 2s infinite ease-in-out;
}
@keyframes navBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* Architecture Diagram Particles */
.particle-container {
    perspective: 1000px;
}

.data-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    filter: blur(1px);
    opacity: 0;
    animation: moveParticle 4s linear infinite;
}

@keyframes moveParticle {
    0% { left: 0%; opacity: 0; transform: scale(0.5); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; transform: scale(1); }
}

/* Architecture Connection Lines */
.arch-line {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 3;
    stroke-dasharray: 8 12;
    opacity: 0.8;
    transition: all 0.3s;
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
}

.connection-group:hover .arch-line {
    opacity: 1;
    stroke-width: 4;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.8));
}

@keyframes lineFlow {
    to { stroke-dashoffset: -200; }
}

.arch-line {
    animation: lineFlow 15s linear infinite;
}

/* Specific line colors for different stages */
.connection-group [stroke="#10b981"] {
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5));
}
.connection-group:hover [stroke="#10b981"] {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
}

/* Smooth Entrance */
.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Infinite Marquee Showcase */
.marquee-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    padding: 2rem 0;
}

.marquee-content {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marquee-scroll 60s linear infinite;
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% { transform: translateX(calc(-50% - 0.75rem)); }
    100% { transform: translateX(0); }
}

.video-card-wide {
    width: 400px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .video-card-wide {
        width: 300px;
    }
}
