/* ==========================================================================
   INFINITE SCROLL
   ========================================================================== */
#infinite-scroll-sentinel {
    padding: 40px 0;
    text-align: center;
    width: 100%;
    grid-column: 1 / -1; /* span full grid width */
}

.scroll-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
}

.scroll-status.scroll-loading {
    display: flex;
}

.scroll-status.scroll-end {
    display: flex;
}

.scroll-status.scroll-error {
    display: flex;
    color: var(--red);
}

/* Loading dots animation */
.scroll-dots {
    display: flex;
    gap: 4px;
}
.scroll-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    animation: scrollDotPulse 1.2s ease-in-out infinite;
}
.scroll-dots span:nth-child(2) { animation-delay: 0.15s; }
.scroll-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes scrollDotPulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.scroll-end-line {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #555;
}
.scroll-end-line::before,
.scroll-end-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
    max-width: 120px;
}

/* ==========================================================================
   SEARCH PAGE - REDESIGN
   ========================================================================== */

/* Search hero section */
body.search .c-search-header__wrapper {
    padding: 40px 0 0;
}

body.search .c-search-header__wrapper .container {
    max-width: 1200px;
}

body.search .search-hero-title {
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

body.search .search-hero-sub {
    text-align: center;
    color: #888;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}

/* Search bar improvements */
body.search .c-search-header__wrapper .search-content .search-form {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

body.search .c-search-header__wrapper .search-content .search-form .search-field {
    height: 52px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    padding: 0 120px 0 20px;
    transition: border-color .25s, box-shadow .25s;
}

body.search .c-search-header__wrapper .search-content .search-form .search-field:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(209,53,53,0.12);
    outline: none;
}

body.search .c-search-header__wrapper .search-content .search-form .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    height: 42px;
    border-radius: 50px;
    padding: 0 24px;
    font-weight: 700;
    background: var(--red);
    border: none;
}

body.search .c-search-header__wrapper .search-content .search-form .search-submit:hover {
    background: var(--red-lighter);
}

/* Filters section redesign */
.search-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.search-filters .filter-title {
    font-size: 11px;
    font-weight: 800;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-right: 2px;
}

.search-filters .btn {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.03);
    transition: all .2s;
}

.search-filters .btn:hover {
    border-color: rgba(255,255,255,0.15);
    color: #ddd;
    background: rgba(255,255,255,0.06);
}

.search-filters .btn.active,
.search-filters .btn:active,
.search-filters .btn:focus,
.search-filters .btn.active:hover {
    background-color: var(--red) !important;
    border-color: var(--red) !important;
    color: #fff !important;
}

.search-filters .dropdown-toggle::after {
    margin-left: 6px;
    font-size: 9px;
}

.search-filters .dropdown-menu {
    background: #222;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    margin-top: 8px;
}

.search-filters .dropdown-menu .dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    border: none;
}

.search-filters .dropdown-menu .dropdown-item:hover {
    background: rgba(255,255,255,0.06);
}

@media (min-width: 768px) {
    .vertical.divider {
        width: 1px;
        height: 28px;
        background: rgba(255,255,255,0.06);
        margin: 0 6px;
    }
}

/* Reset filter button redesign */
.reset-filter {
    margin-top: 0;
    margin-left: auto;
}

.text-ui-light .reset-filter button.btn,
.reset-filter button.btn {
    font-weight: 700;
    font-size: 13px;
    color: var(--red);
    border: 1px solid rgba(209,53,53,0.25);
    border-radius: 50px;
    padding: 6px 14px;
    background: none;
    transition: all .2s;
}

.reset-filter button.btn:hover {
    background: rgba(209,53,53,0.1) !important;
    border-color: var(--red) !important;
    color: var(--red) !important;
}

/* Results bar */
.search-wrap > .h4,
.c-blog__heading.style-2 {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ==========================================================================
   NOVEL CARDS - REDESIGN
   ========================================================================== */
.search-lists {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 20px;
}

.search-lists .manga__item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    transition: all .25s;
    width: 100%;
}

.search-lists .manga__item:hover {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.search-lists .manga__item .manga__thumb {
    flex: 0 0 100px;
    width: 100px;
}

.search-lists .manga__item .manga__thumb img {
    width: 100px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.search-lists .manga__item .manga__content {
    flex: 1;
    min-width: 0;
    position: relative;
    background: none;
    padding: 0;
}

.search-lists .manga__item .manga__content h2 a {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    transition: color .2s;
}

.search-lists .manga__item:hover .manga__content h2 a {
    color: var(--red) !important;
}

.search-lists .manga__item .manga-excerpt {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    max-height: 40px;
    margin-bottom: 8px;
}

/* Genre chips in cards */
.search-lists .manga__item .manga-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.search-lists .manga__item .manga-genres .genre-item {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #999;
}

.search-lists .manga__item .manga-genres .genre-item i {
    display: none; /* hide the circle icon */
}

.search-lists .manga__item .manga-genres .genre-item + .genre-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    margin-left: 0;
}

.search-lists .manga__item .manga-genres .genre-item + .genre-item + .genre-item {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    margin-left: 0;
}

/* Stats row */
.search-lists .manga__item .manga-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.search-lists .manga__item .manga-info i {
    margin-right: 3px;
    font-size: 10px;
}

.search-lists .manga__item .manga-info .total {
    color: #999;
}

/* ==========================================================================
   NOVEL DIRECTORY / ARCHIVE - REDESIGN
   ========================================================================== */

/* Genre sidebar refinement */
body.archive .c-page .entry-header .entry-title .item-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.3px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .search-lists {
        grid-template-columns: 1fr;
    }

    .search-filters {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .search-filters .filter-title {
        display: none;
    }

    .vertical.divider {
        display: none;
    }

    .reset-filter {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
    }

    .search-hero-title {
        font-size: 22px !important;
    }

    .search-lists .manga__item .manga__thumb img {
        width: 80px;
        height: 112px;
    }

    .search-lists .manga__item .manga__thumb {
        flex: 0 0 80px;
        width: 80px;
    }

    .search-lists .manga__item .manga__content h2 a {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .search-lists .manga__item {
        padding: 12px;
        gap: 12px;
    }
}
