/* Custom scrollbar and utilities */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Clean horizontal scroll for nav */
.category-nav-scroll {
    overflow-x: auto;
    scrollbar-width: none; /* Modern Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
.category-nav-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar completely */
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.85);
    border-bottom: 1px solid rgba(255,255,255, 0.1);
}

/* Modal backdrop overlay */
.modal-overlay {
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

/* --- Accessibility Modifications --- */

/* Text Scaling */
.acc-text-sm { font-size: 0.875rem !important; }
.acc-text-base { font-size: 1rem !important; }
.acc-text-lg { font-size: 1.125rem !important; }
.acc-text-xl { font-size: 1.25rem !important; }
.acc-text-2xl { font-size: 1.5rem !important; }

/* Global Scaling (applied to html for REM scaling) */
html.acc-scale-110 { font-size: 17.6px; } /* 16 * 1.1 */
html.acc-scale-120 { font-size: 19.2px; }
html.acc-scale-130 { font-size: 20.8px; }
html.acc-scale-140 { font-size: 22.4px; }
html.acc-scale-150 { font-size: 24px; }

/* Letter Spacing */
.acc-spacing-1 { letter-spacing: 0.05em !important; }
.acc-spacing-2 { letter-spacing: 0.1em !important; }
.acc-spacing-3 { letter-spacing: 0.2em !important; }


/* Contrast Modes */
.acc-high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}
.acc-high-contrast *:not(button):not(input):not(textarea) {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}
.acc-high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

.acc-inverted {
    filter: invert(1) hue-rotate(180deg);
}
.acc-inverted img, .acc-inverted .no-invert {
    filter: invert(1) hue-rotate(180deg);
}

.acc-grayscale {
    filter: grayscale(1);
}

/* Readability Tools */
.acc-highlight-links a, .acc-highlight-links button {
    outline: 2px solid #ef4444 !important;
    outline-offset: 2px !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

.acc-readable-font * {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: 0.05em !important;
    line-height: 1.6 !important;
}

.acc-big-cursor, .acc-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='black' stroke='white' stroke-width='1'%3E%3Cpath d='M7 2l12 11.2l-5.8 0.5l3.3 7.3l-2.2 1l-3.2-7.4L7 18z'/%3E%3C/svg%3E"), auto !important;
}

/* Reading Guide Line */
.acc-reading-guide {
    position: fixed;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(239, 68, 68, 0.6);
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

