/* =====================================================
   0G DA - Product-Specific Styles
   ===================================================== */

/* Solution Banner Enhancement */
.solution-banner-text {
    font-size: 1.25rem;
    line-height: 1.6;
}

/* ==================== AI-Native Section ==================== */
.ai-use-cases {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.ai-use-case {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    transition: all 0.3s ease;
}

.ai-use-case:hover {
    border-color: var(--color-purple-500);
    background: rgba(146, 0, 225, 0.05);
    transform: translateY(-4px);
}

.ai-use-case-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-purple-700), var(--color-purple-500));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 24px;
    color: white;
}

.ai-use-case h4 {
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    font-size: 1rem;
}

.ai-use-case p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ==================== Metrics Section ==================== */
/* DA page uses 4-column grid for stats */
.metrics-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* DA metrics don't have charts, center the content */
#metrics .metric-card {
    text-align: center;
}

#metrics .metric-value {
    justify-content: center;
}

#metrics .metric-header {
    justify-content: center;
}

/* ==================== Erasure Coding Flow Visualization ==================== */
.erasure-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: 10px;
}

.data-blob {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.blob-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-purple-700), var(--color-purple-500));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    animation: blob-pulse 2s ease-in-out infinite;
}

@keyframes blob-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(146, 0, 225, 0); transform: scale(1); }
    50% { box-shadow: 0 0 15px rgba(146, 0, 225, 0.4); transform: scale(1.05); }
}

.blob-label {
    color: var(--color-gray-500);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.encode-arrow {
    color: var(--color-gray-600);
    font-size: 12px;
    animation: arrow-flow 1.5s ease-in-out infinite;
}

@keyframes arrow-flow {
    0%, 100% { opacity: 0.4; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(3px); }
}

/* Chunk Grid - Erasure Encoded Data */
.chunk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.chunk {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    animation: chunk-appear 2s ease-out infinite;
}

.chunk.filled {
    background: linear-gradient(135deg, var(--color-purple-700), var(--color-purple-500));
}

.chunk.parity {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    animation-delay: 0.5s;
}

.chunk:nth-child(1) { animation-delay: 0s; }
.chunk:nth-child(2) { animation-delay: 0.1s; }
.chunk:nth-child(3) { animation-delay: 0.2s; }
.chunk:nth-child(4) { animation-delay: 0.3s; }
.chunk:nth-child(5) { animation-delay: 0.4s; }
.chunk:nth-child(6) { animation-delay: 0.5s; }
.chunk:nth-child(7) { animation-delay: 0.6s; }
.chunk:nth-child(8) { animation-delay: 0.7s; }
.chunk:nth-child(9) { animation-delay: 0.8s; }

@keyframes chunk-appear {
    0%, 10% { opacity: 0; transform: scale(0); }
    30%, 100% { opacity: 1; transform: scale(1); }
}

/* Node Distribution */
.node-distribution {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.da-node {
    width: 28px;
    height: 28px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid var(--color-success);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-success);
    font-size: 12px;
    animation: node-receive 2s ease-out infinite;
}

.da-node:nth-child(1) { animation-delay: 1s; }
.da-node:nth-child(2) { animation-delay: 1.2s; }
.da-node:nth-child(3) { animation-delay: 1.4s; }

@keyframes node-receive {
    0%, 40% { opacity: 0.3; box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
    60%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(34, 197, 94, 0.4); }
}

/* ==================== KZG Commitment Flow Visualization ==================== */
.commitment-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: 10px;
}

.commit-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.commit-node {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.commit-node:not(.certificate):not(.l1) {
    background: linear-gradient(135deg, var(--color-purple-700), var(--color-purple-500));
    color: white;
    animation: commit-pulse 2s ease-in-out infinite;
}

.commit-node.certificate {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    animation: certificate-glow 2s ease-in-out infinite 0.5s;
}

.commit-node.l1 {
    background: rgba(98, 126, 234, 0.2);
    border: 2px solid #627eea;
    color: #627eea;
    animation: l1-anchor 2s ease-in-out infinite 1s;
}

@keyframes commit-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(146, 0, 225, 0); transform: scale(1); }
    50% { box-shadow: 0 0 15px rgba(146, 0, 225, 0.5); transform: scale(1.05); }
}

@keyframes certificate-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
}

@keyframes l1-anchor {
    0%, 100% { box-shadow: 0 0 0 rgba(98, 126, 234, 0); }
    50% { box-shadow: 0 0 20px rgba(98, 126, 234, 0.5); }
}

.commit-arrow {
    color: var(--color-gray-600);
    font-size: 14px;
    animation: arrow-down 1.5s ease-in-out infinite;
}

@keyframes arrow-down {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(3px); }
}

.commit-label {
    color: var(--color-gray-500);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================== Reconstruction Visual (Optional) ==================== */
.reconstruction-demo {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
}

.reconstruction-label {
    color: var(--color-gray-500);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.reconstruction-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    justify-items: center;
}

.recon-chunk {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(146, 0, 225, 0.3);
    border: 1px solid var(--color-purple-700);
}

.recon-chunk.available {
    background: var(--color-purple-500);
    animation: recon-available 3s ease-out infinite;
}

.recon-chunk.missing {
    background: rgba(255, 255, 255, 0.05);
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.2);
}

@keyframes recon-available {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .ai-use-cases {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ai-use-cases {
        grid-template-columns: 1fr;
    }

    .solution-banner-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 640px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .erasure-flow {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-4);
    }

    .encode-arrow {
        display: none;
    }

    .commitment-flow {
        padding: var(--space-3);
    }

    .chunk-grid {
        margin: var(--space-2) 0;
    }

    .node-distribution {
        flex-direction: row;
    }
}
