:root {
    --bg-main: #0f172a;
    --bg-header: #1e293b;
    --indigo-primary: #6366f1;
    --indigo-soft: #818cf8;
    --text-muted: #64748b;
}

/* Scrollbar Personalizada */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Estilos de Visualización JSON */
.json-node {
    margin-left: 1.5rem;
    position: relative;
    border-left: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.2s;
}

.json-node:hover {
    border-left-color: rgba(99, 102, 241, 0.3);
}

.json-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: default;
    transition: background-color 0.1s;
}

.json-line[data-path]:hover {
    background-color: rgba(99, 102, 241, 0.08);
    cursor: pointer;
}

.json-line.selected {
    background-color: rgba(99, 102, 241, 0.15) !important;
}

.json-key {
    color: #94a3b8;
    font-weight: 600;
}

.clickable-key:hover {
    color: #818cf8;
    text-decoration: underline;
}

.json-string { color: #2dd4bf; }
.json-number { color: #fbbf24; }
.json-boolean { color: #f472b6; }
.json-null { color: #94a3b8; font-style: italic; }

.toggle-btn {
    position: absolute;
    left: -1.2rem;
    cursor: pointer;
    font-size: 10px;
    color: #64748b;
    user-select: none;
    transition: transform 0.2s, color 0.2s;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    color: #818cf8;
}

.node-collapsed > .json-node {
    display: none;
}

.collapsed-placeholder {
    color: #475569;
    font-size: 0.8em;
    margin-left: 4px;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#path-bar.show {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para Pantallas Pequeñas */
@media (max-width: 1024px) {
    main {
        height: auto;
        overflow: visible;
    }
    textarea {
        height: 300px !important;
        position: relative !important;
    }
    #json-viewer {
        height: auto;
        min-height: 400px;
    }
    #path-bar {
        position: fixed;
        bottom: 1rem;
        z-index: 100;
        opacity: 1;
        transform: translateY(0);
    }
}
