/* Two Pointers Visualization Styles */

.two-pointers-viz {
    background: var(--code-bg, #1e1e1e);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    max-width: 600px;
}

[data-theme="dark"] .two-pointers-viz {
    background: #1a1a1a;
    border: 1px solid #333;
}

.viz-header h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary, #fff);
    font-size: 1.1rem;
}

.array-display {
    display: flex;
    gap: 8px;
    margin: 1.5rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.array-cell {
    position: relative;
    background: #2a2a2a;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 1rem 0.75rem 0.5rem;
    min-width: 50px;
    text-align: center;
    transition: all 0.3s ease;
}

.array-cell.left-pointer {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
}

.array-cell.right-pointer {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.2);
}

.pointer-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.pointer-label.left {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
}

.pointer-label.right {
    color: #ec4899;
    background: rgba(236, 72, 153, 0.2);
}

.cell-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Fira Code', monospace;
    margin-bottom: 0.25rem;
}

.cell-index {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Fira Code', monospace;
}

.viz-controls {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.viz-message {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #3b82f6;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #3b82f6;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    .two-pointers-viz {
        padding: 1rem;
    }

    .array-cell {
        min-width: 45px;
        padding: 0.75rem 0.5rem 0.5rem;
    }

    .cell-value {
        font-size: 1rem;
    }
}