/**
 * Stylesheet cho công cụ Làm Đẹp Code (JS/CSS/HTML Beautifier)
 */

.hihi-beautify-container {
    --primary-indigo: #4f46e5;
    --primary-indigo-hover: #4338ca;
    --primary-purple: #9333ea;
}

/* Kiểu dáng các Tab chọn ngôn ngữ */
.lang-tab-btn {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-tab-btn.active {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Animations */
.animate-slideDown {
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tùy chỉnh Textarea mã nguồn (Dark Editor Theme) */
textarea#code-input,
textarea#code-output {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px !important;
    line-height: 1.6;
    tab-size: 4;
    -moz-tab-size: 4;
    transition: all 0.2s ease;
}

/* Tùy chỉnh Scrollbar cho Editor */
textarea#code-input::-webkit-scrollbar,
textarea#code-output::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

textarea#code-input::-webkit-scrollbar-track,
textarea#code-output::-webkit-scrollbar-track {
    background: #020617; /* Slate 950 */
    border-bottom-right-radius: 1rem;
    border-top-right-radius: 1rem;
}

textarea#code-input::-webkit-scrollbar-thumb,
textarea#code-output::-webkit-scrollbar-thumb {
    background: #334155; /* Slate 700 */
    border-radius: 10px;
    border: 2px solid #020617;
}

textarea#code-input::-webkit-scrollbar-thumb:hover,
textarea#code-output::-webkit-scrollbar-thumb:hover {
    background: #475569; /* Slate 600 */
}

/* Thao tác chọn văn bản */
textarea#code-input::selection,
textarea#code-output::selection {
    background: rgba(99, 102, 241, 0.3); /* Indigo selection */
    color: #ffffff;
}

/* Vùng thả tệp tin */
#editor-dropzone.dragover {
    transform: scale(1.005);
}

#editor-dropzone.dragover textarea#code-input {
    border: 2px dashed #4f46e5;
    background-color: #0b0f19;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .hihi-beautify-container {
        border-radius: 1.5rem;
        padding: 1rem;
    }
}
