/*
Theme Name: Tiện Ích Trực Tuyến
Theme URI: http://tienich.biz/
Author: AI Assistant
Author URI: http://tienich.biz/
Description: Theme tổng hợp các công cụ trực tuyến miễn phí, xử lý nhanh gọn bằng Javascript. Giao diện Dark/Light mode hiện đại.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: tienich
*/

/* Core styles and Scrollbar */
body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Tool Animations */
.tool-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tool-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Nav Styles */
.nav-item {
    border-right: 3px solid transparent;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: #f8fafc;
}

.dark .nav-item:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

.nav-item.active {
    background-color: #eff6ff;
    color: #3b82f6;
    border-right-color: #3b82f6;
    font-weight: 600;
}

.dark .nav-item.active {
    background-color: rgba(30, 58, 138, 0.3);
    color: #60a5fa;
    border-right-color: #60a5fa;
}

.btn-custom {
    transition: all 0.2s;
}

.btn-custom:active {
    transform: scale(0.95);
}

/* Toast */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 20px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark #toast {
    background-color: #e2e8f0;
    color: #0f172a;
}

#toast.show {
    visibility: visible;
    animation: fadeinToast 0.5s, fadeoutToast 0.5s 2.5s;
}

@keyframes fadeinToast {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeoutToast {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.mobile-menu-overlay.active {
    display: block;
}
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px 20px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.tool-panel {
    display: none;
}

.tool-panel.active {
    display: block;
}