/* Bố cục chính */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Đảm bảo body cao tối thiểu bằng viewport */
}

.container {
    flex-grow: 1; /* Container chính mở rộng để đẩy footer xuống */
}

/* Menu styling */
.menu-container {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #e5e7eb;
    max-width: 1400px;
    margin: 20px auto;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.menu-container h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0;
    display: inline-block;
    margin-right: 1rem;
}

.menu-container ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
    padding: 0;
    justify-content: center;
}

.menu-container li {
    display: inline-block;
}

.menu-container li button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-container li button.active {
    background-color: #ffffff;
    color: #3b82f6;
    font-weight: bold;
}

.menu-container li button:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.menu-container li button:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Footer styling */
footer {
    background-color: #1E293B;
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #374151;
    color: #9CA3AF;
}

footer p {
    margin: 0;
}

footer #counter {
    color: #93C5FD;
    font-weight: bold;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .menu-container {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        margin: 0;
        padding: 1rem;
        border-radius: 10px;
    }
    .content-container {
        margin-top: 80px;
    }
}

/* Content container */
.content-container {
    margin-top: 40px;
    padding-top: 20px;
}

/* JSON Specific Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
}

.json-display-container {
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1f2937;
}

.json-display-container::-webkit-scrollbar {
    width: 8px;
}

.json-display-container::-webkit-scrollbar-track {
    background: #1f2937;
}

.json-display-container::-webkit-scrollbar-thumb {
    background-color: #4b5563;
    border-radius: 4px;
}

.json-display-container::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}

.CodeMirror {
    height: 24rem !important;
    border-radius: 0.375rem;
}

input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #6b7280;
    border-radius: 50%;
    background-color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

input[type="radio"]:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
    box-shadow: inset 0 0 0 3px #1f2937;
}

input[type="radio"]:hover {
    border-color: #a5b4fc;
}

label {
    color: #d1d5db;
    font-size: 0.875rem;
    transition: color 0.2s ease-in-out;
}

label:hover {
    color: #ffffff;
}

.copy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1f2937;
    border: 1px solid #4b5563;
    transition: all 0.2s ease-in-out;
    width: 40px;
}

button:hover {
    background-color: #4b5563;
    border-color: #6b7280;
}

#result, #resultValue {
    background-color: #1a253b;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    min-height: 40px;
}

#result {
    border-color: #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

#result .bracket {
    color: #ffffff;
}

#result .dot {
    color: #10b981;
}

#result .key {
    color: #c084fc;
}

#result .number {
    color: #50fa7b;
}

#result .quote {
    color: #f97316;
}

#resultValue {
    border-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
    white-space: pre-wrap;
    word-wrap: break-word;
}

#result:hover, #resultValue:hover {
    background-color: #4b5563;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.text-orange-400 {
    color: #f97316;
}

.text-purple-400 {
    color: #c084fc;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-boolean {
    color: #50fa7b;
}

.bg-gray-800.p-4.rounded-lg.flex-1 {
    max-width: 550px;
}

.checkbox-custom {
    appearance: none;
    width: 18px;
    height: 18px;
    background-color: #1f2937;
    border: 2px solid #6b7280;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.checkbox-custom:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.checkbox-custom:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-custom:hover:not(:checked) {
    border-color: #a5b4fc;
    background-color: #374151;
}

.checkbox-label {
    color: #d1d5db;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.checkbox-label:hover {
    color: #ffffff;
}

.checkbox-separator {
    color: #6b7280;
    font-size: 1rem;
}


.td-fit {
    white-space: nowrap; /* Vừa với nội dung */
}
.td-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}