@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* Scrollbar Styling */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(71, 85, 105, 0.5);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.8);
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Bionic Reading Highlighting */
bionic-strong {
    font-weight: 700;
    color: inherit; /* Maintain text color context */
}

/* Smooth Transitions */
body, #sidebar, #readingContainer, #contentWrapper {
    transition: background-color 0.3s ease, color 0.3s ease, width 0.3s ease, transform 0.3s ease;
}

/* Range Slider Customization */
input[type=range] {
    -webkit-appearance: none; 
    background: transparent; 
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #0ea5e9;
    cursor: pointer;
    margin-top: -6px; 
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
    transition: background .15s ease-in-out;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e2e8f0;
    border-radius: 2px;
}

.dark input[type=range]::-webkit-slider-runnable-track {
    background: #334155;
}

/* Zen Mode Styling */
body.zen-mode #sidebar {
    transform: translateX(-100%);
    position: absolute;
}

body.zen-mode header {
    transform: translateY(-100%);
}

body.zen-mode #exitZenBtn {
    transform: translateY(0);
}

/* Loading Spinner Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #0ea5e9;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
.dark .spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: #0ea5e9;
}
