@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Ẩn thanh cuộn nhưng vẫn cuộn được cho Toolbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#drawing-canvas {
    touch-action: none;
    background-color: #ffffff;
    cursor: none;
}

/* Brush Preview Cursor */
#brush-cursor {
    position: fixed;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 50;
    display: none;
    backdrop-filter: invert(0.2);
    transition: opacity 0.2s ease, transform 0.1s ease;
}

/* Nút công cụ */
.tool-btn {
    transition: all 0.2s ease;
}

.tool-btn.active {
    background-color: #1e293b;
    color: #ffffff !important;
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Nút công cụ AI đặc biệt */
.ai-tool-btn.active {
    background: #0f172a;
    color: #ffffff !important;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.4);
    border: none;
}

.color-btn {
    transition: all 0.15s ease;
    position: relative;
}

.color-btn.active {
    transform: scale(1.25);
    border: 2px solid #cbd5e1;
    box-shadow: 0 0 0 2px white inset;
}

.custom-color-wrapper {
    position: relative;
    overflow: hidden;
}

.custom-color-wrapper input[type="color"] {
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.fade-enter {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Tối ưu giao diện thanh trượt (Range Slider) cao cấp */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
    width: 100%;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #0f172a;
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 0 0 2px #fff, 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #cbd5e1;
    border-radius: 2px;
}

/* Thanh cuộn ngang cao cấp (Premium Scrollbar) cho Toolbar */
.custom-scrollbar {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.custom-scrollbar::-webkit-scrollbar {
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 30px;
    /* Thụt lề 2 đầu để thanh cuộn lọt thỏm ở giữa */
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    /* Slate-400 mờ sang trọng */
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Export dialog option buttons */
.exp-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.exp-btn:hover {
    border-color: #94a3b8;
    color: #1e293b;
}

.exp-btn.exp-active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 2px 8px -2px rgba(15,23,42,0.35);
}