.visualization-container {
    flex-wrap: nowrap;
    flex-direction: column;
}

.mode-switch {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 30px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.mode-btn.active {
    background: var(--primary);
    color: white;
}

.network-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 2.25rem 0 0.85rem;
}

.device .viz-badge {
    width: 70px;
    height: 70px;
    border-radius: 18px;
}

.device .viz-badge svg {
    width: 32px;
    height: 32px;
}

.pipe {
    flex-grow: 1;
    margin: 0 1rem;
    position: relative;
    display: flex;
    align-items: center;
}

.pipe .viz-connector {
    width: 100%;
}

.packet {
    position: absolute;
    left: 0;
    background: #fff;
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
}

.hacker {
    position: absolute;
    left: 50%;
    top: -42px;
    transform: translateX(-50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tooltip {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 5px;
    opacity: 0;
    white-space: nowrap;
}

/* .controls flotan desde el main.css compartido (flujo bajo la animación) */
.visualization-container .controls {
    margin-top: 0.75rem;
}

@keyframes travel {
    0% {
        left: 0%;
        opacity: 1;
    }

    100% {
        left: 90%;
        opacity: 1;
    }
}

@keyframes lock {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}
