

/* html {
    font-family: Inter var;
} */

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #262626; /* Slightly lighter than bg-neutral-900 */
    border-radius: 3px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #404040; /* Slightly lighter than bg-neutral-800 */
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #525252; /* Even lighter for hover state */
}

/* For Firefox */
/* * {
    scrollbar-width: thin;
    scrollbar-color: #404040 #262626;
} */

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


.reader-text p {
    font-size: 20px;
    font-family: Lora, serif;
    text-align: justify;
    color: #cfcfcf;
    line-height: 1.6875;
    margin: .8em 0;
}


/* lazyloaded images */

.comic-image-container {
    display: flex;
    justify-content: center;
    background-color: #17171700;
}

.comic-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.lazy-container {
    overflow: hidden;
    position: relative;
}

.lazy-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBzdHlsZT0iY29sb3I6IzkwOTA5MDsiIGZpbGw9Im5vbmUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtaW1hZ2UtZG93biI+PHBhdGggZD0iTTEwLjMgMjFINWEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmgxNGEyIDIgMCAwIDEgMiAydjEwbC0zLjEtMy4xYTIgMiAwIDAgMC0yLjgxNC4wMTRMNiAyMSIvPjxwYXRoIGQ9Im0xNCAxOSAzIDN2LTUuNSIvPjxwYXRoIGQ9Im0xNyAyMiAzLTMiLz48Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.lazy-container.loaded::before {
    opacity: 0;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

.lazy-container::before .loaded {

}


#sticky-header {
    position: sticky;
    top: 0;
    transition: transform 0.3s ease-in-out;
    transform: translateY(var(--header-translate, 0));
    z-index: 10;
  }
  
  #sticky-navbar {
    position: sticky;
    top: var(--navbar-top, 72px);
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
    transform: translateY(var(--navbar-translate, 0));
    z-index: 9;
  }

  /* Make navbar non-sticky in horizontal reading mode */
  body.horizontal-reading-mode #sticky-navbar {
    position: relative;
    top: 0;
  }


  .custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 115, 22, 0.3) rgba(64, 64, 64, 0.3);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(64, 64, 64, 0.3);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(249, 115, 22, 0.3);
    border-radius: 4px;
    border: 2px solid transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(249, 115, 22, 0.5);
}

/* Animation for new chapter badge */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   READER SETTINGS STYLES
   ======================================== */

/* Zoom Slider Styles */
#zoom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #404040;
    border-radius: 8px;
    outline: none;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f97316;
    cursor: pointer;
    border: 2px solid rgba(249, 115, 22, 0.2);
    transition: background 0.2s ease;
}

#zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f97316;
    cursor: pointer;
    border: 2px solid rgba(249, 115, 22, 0.2);
    transition: background 0.2s ease;
}

#zoom-slider::-webkit-slider-thumb:hover {
    background: #ea580c;
}

#zoom-slider::-moz-range-thumb:hover {
    background: #ea580c;
}

#zoom-slider:focus {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.3);
}

/* Reader Zoom Styles with CSS Variables */
:root {
    --reader-zoom-factor: 1;
    --reader-spacing: 0;
    --reader-overflow-x: hidden;
}

.reader-scaled .comic-image-container {
    position: relative;
    overflow: hidden;
    margin-bottom: var(--reader-spacing);
    width: 100%;
    display: flex;
    justify-content: center;
}

.reader-scaled .comic-image-container:not(.lazy-container),
.reader-scaled .comic-image-container.lazy-container.loaded {
    height: auto;
}

.reader-scaled .comic-image-container.lazy-container:not(.loaded) {
    height: calc(800px * var(--reader-zoom-factor));
    min-height: 200px;
}

.reader-scaled .reader-media {
    overflow-x: var(--reader-overflow-x);
    overflow-y: visible;
}

.reader-scaled .comic-image {
    display: block;
    margin: 0 auto;
}