/* K-Tools — theme + ẩn scrollbar (vẫn cuộn được) */

:root {
    --kt-bg: #0f1419;
    --kt-bg-soft: #151c24;
    --kt-surface: #ffffff;
    --kt-surface-muted: #f0f3f8;
    --kt-border: #e2e8f0;
    --kt-text: #1e293b;
    --kt-text-muted: #64748b;
    --kt-accent: #2563eb;
    --kt-accent-hover: #1d4ed8;
    --kt-sidebar: #111827;
    --kt-sidebar-elevated: #1f2937;
    --kt-gold: #eab308;
    --kt-radius: 10px;
    --kt-radius-sm: 6px;
    --kt-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --kt-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Ẩn scrollbar toàn trang + mọi vùng overflow (Firefox / IE / Chromium / Safari) */
html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent;
}

*,
*::before,
*::after {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
}

html {
    scroll-behavior: smooth;
}

body.kt-app {
    margin: 0;
    min-height: 100vh;
    font-family: var(--kt-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--kt-text);
    background: linear-gradient(160deg, #e8eef7 0%, #f4f6fb 45%, #eef2f9 100%);
}

/* —— Sidebar —— */
.menu-toggle {
    display: none;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 12px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    background: var(--kt-accent);
    color: #fff;
    box-shadow: var(--kt-shadow);
    transition: background 0.2s, transform 0.15s;
}

.menu-toggle:hover {
    background: var(--kt-accent-hover);
}

.menu-toggle:active {
    transform: scale(0.96);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.28s ease;
        left: unset !important;
        right: 0 !important;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
    }

    .sidebar.active {
        transform: translateX(0);
        z-index: 1000;
    }

    .content {
        margin-left: 0 !important;
        overflow-x: hidden;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.sidebar {
    width: 260px;
    height: 100vh;
    height: 100dvh;
    flex-shrink: 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, var(--kt-sidebar) 0%, #0b0f14 100%);
    color: #e5e7eb;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar a {
    color: inherit;
    text-decoration: none;
}

.sidebar h2 {
    height: 64px;
    margin: 0;
    padding: 0 18px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f8fafc;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(255, 255, 255, 0.06));
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar>ul {
    list-style: none;
    margin: 0;
    padding: 8px 0 24px;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow: auto;
}

.sidebar>ul>li {
    padding: 10px 14px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kt-gold);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar .submenu {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.sidebar .submenu li {
    margin: 2px 0;
}

.sidebar .submenu a {
    display: block;
    padding: 10px 12px 10px 14px;
    border-radius: var(--kt-radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #cbd5e1;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar .submenu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-left-color: var(--kt-accent);
}

.sidebar .submenu a:focus-visible {
    outline: 2px solid var(--kt-accent);
    outline-offset: 2px;
}

/* —— Main content —— */
.content {
    margin-left: 260px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px 24px 40px;
    box-sizing: border-box;
}

.content>h2:first-child {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--kt-text);
}

/* Form controls (trang tool) */
textarea,
input[type="text"],
input[type="search"],
input[type="number"],
select {
    font-family: inherit;
    font-size: 14px;
    color: var(--kt-text);
    background: var(--kt-surface);
    border: 1px solid var(--kt-border);
    border-radius: var(--kt-radius-sm);
    padding: 10px 12px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--kt-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

button {
    margin: 8px 8px 8px 0;
    padding: 10px 18px;
    border: none;
    border-radius: var(--kt-radius-sm);
    background: var(--kt-accent);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

button:hover {
    background: var(--kt-accent-hover);
}

button:active {
    transform: translateY(1px);
}

button:focus-visible {
    outline: 2px solid var(--kt-accent);
    outline-offset: 2px;
}

textarea {
    width: 48%;
    min-height: 220px;
    resize: vertical;
}

@media (max-width: 900px) {
    textarea {
        width: 100%;
        margin-bottom: 12px;
    }
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.result {
    margin-top: 20px;
    padding: 16px;
    background: var(--kt-surface);
    border-radius: var(--kt-radius);
    border: 1px solid var(--kt-border);
    box-shadow: var(--kt-shadow);
}

.same {
    color: #15803d;
    font-weight: 700;
}

.diff {
    color: #b91c1c;
    font-weight: 700;
}

/* Pre / code blocks trong các trang tool */
pre {
    border-radius: var(--kt-radius-sm);
}

label {
    cursor: pointer;
    color: var(--kt-text);
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--kt-accent);
}