/* MangaKu — Custom CSS */

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}
img[loading="lazy"] {
    opacity: 0;
}
img.loaded,
img:not([loading]) {
    opacity: 1;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Chapter list custom scrollbar */
#chapter-list::-webkit-scrollbar {
    width: 4px;
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swiper custom colors */
.swiper-button-next,
.swiper-button-prev {
    color: #6366f1 !important;
}
.swiper-pagination-bullet-active {
    background: #6366f1 !important;
}

/* Reader images — no gap in strip mode */
.reader-strip img {
    display: block;
    max-width: 100%;
}

/* Manga card hover effect */
.manga-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.manga-card:hover {
    transform: translateY(-2px);
}

/* Admin sidebar active link */
.sidebar-active {
    background-color: #4f46e5;
    color: white;
}

/* Toast notification */
#toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: #1f2937;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
#toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Page transition */
.page-content {
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
