/* Custom site-themed scrollbar styles
   - Matches the site's primary purple gradient and teal accents
   - Global defaults, plus container-specific overrides for the dark sidebar
*/

:root {
    --scrollbar-width: 10px;
    --scrollbar-track-bg: rgba(0, 0, 0, 0.04);
    --scrollbar-thumb-start: #667eea; /* primary button start */
    --scrollbar-thumb-end: #764ba2;   /* primary button end */
    --scrollbar-thumb-hover-start: #5b63d9;
    --scrollbar-thumb-hover-end: #5a2f8f;
    --scrollbar-sidebar-start: #1abc9c; /* teal accent */
    --scrollbar-sidebar-end: #16a085;
}

/* WebKit browsers (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}
*::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px;
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--scrollbar-thumb-start), var(--scrollbar-thumb-end));
    border-radius: 999px;
    border: 3px solid var(--scrollbar-track-bg);
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--scrollbar-thumb-hover-start), var(--scrollbar-thumb-hover-end));
}

/* Container-specific: dark sidebar should use teal thumb for contrast */
.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--scrollbar-sidebar-start), var(--scrollbar-sidebar-end));
    border: 3px solid rgba(255,255,255,0.06);
}
.sidebar {
    scrollbar-color: rgba(26,188,156,0.9) transparent; /* Firefox */
}

/* Comments and left-thread panes use a softer purple thumb */
.comments::-webkit-scrollbar-thumb,
.thread-left::-webkit-scrollbar-thumb,
.thread-right::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(102,126,234,0.9), rgba(118,75,162,0.9));
    border: 2px solid rgba(255,255,255,0.8);
}
.comments, .thread-left, .thread-right {
    scrollbar-color: rgba(102,126,234,0.9) transparent;
}

/* Firefox global fallback */
* {
    scrollbar-width: thin;
    scrollbar-color: linear-gradient(180deg, var(--scrollbar-thumb-start), var(--scrollbar-thumb-end)) transparent;
}

/* Accessibility: small focus outline offset */
:focus-visible {
    outline-offset: 2px;
}

@media screen and (max-width: 768px) {
    /* Push content down so it doesn't overlap navbar */
    .main-content {
        margin-top: 60px;
    }
}