/* =========================================================
   NoroHentai
   Main Style
========================================================= */

:root {
    --bg: #050505;
    --bg-soft: #0b0b0b;
    --card: #101010;
    --card-hover: #151515;

    --red: #e50914;
    --red-light: #ff2633;
    --red-dark: #a70009;

    --white: #ffffff;
    --text: #f5f5f5;
    --muted: #8b8b8b;
    --border: rgba(255, 255, 255, 0.08);

    --radius: 16px;
    --shadow: 0 15px 45px rgba(0, 0, 0, 0.45);

    --container: 1250px;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(229, 9, 20, 0.14),
            transparent 35%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    line-height: 1.7;

    overflow-x: hidden;
}


body::selection {
    background: var(--red);
    color: white;
}


a {
    color: inherit;
    text-decoration: none;
}


button,
input {
    font: inherit;
}


img {
    display: block;
    max-width: 100%;
}


/* =========================================================
   SCROLLBAR
========================================================= */

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


::-webkit-scrollbar-track {
    background: #050505;
}


::-webkit-scrollbar-thumb {
    background: #292929;
    border-radius: 20px;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}


/* =========================================================
   LOADER
========================================================= */

#loader {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 28px;

    background:
        radial-gradient(
            circle,
            rgba(229, 9, 20, 0.12),
            transparent 45%
        ),
        #050505;

    transition:
        opacity 0.45s ease,
        visibility 0.45s ease;
}


#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


.loader-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}


.loader-mark {
    width: 55px;
    height: 55px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            145deg,
            var(--red-light),
            var(--red-dark)
        );

    color: white;

    font-size: 27px;
    font-weight: 900;

    border-radius: 15px;

    box-shadow:
        0 0 35px rgba(229, 9, 20, 0.35);
}


.loader-name {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
}


.loader-name span {
    color: var(--red);
}


.loader-progress {
    width: 170px;
    height: 3px;

    background: #202020;

    overflow: hidden;

    border-radius: 20px;
}


.loader-progress span {
    display: block;

    width: 45%;
    height: 100%;

    background: var(--red);

    border-radius: inherit;

    animation:
        loaderProgress 1.2s
        infinite ease-in-out;
}


@keyframes loaderProgress {

    0% {
        transform: translateX(-130%);
    }

    100% {
        transform: translateX(330%);
    }

}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position: sticky;

    top: 0;

    z-index: 1000;

    width: 100%;

    height: 76px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 30px;

    background:
        rgba(5, 5, 5, 0.88);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    border-bottom:
        1px solid var(--border);
}


.logo {
    display: flex;

    align-items: center;

    gap: 10px;

    min-width: max-content;
}


.logo-mark {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            145deg,
            var(--red-light),
            var(--red-dark)
        );

    border-radius: 11px;

    font-weight: 900;
    font-size: 21px;

    box-shadow:
        0 5px 25px rgba(229, 9, 20, 0.22);
}


.logo-name {
    font-size: 19px;

    font-weight: 900;

    letter-spacing: 1.5px;
}


.logo-name span {
    color: var(--red);
}


.desktop-nav {
    display: flex;

    align-items: center;

    gap: 8px;
}


.desktop-nav a {
    position: relative;

    padding:
        10px 16px;

    color: #a7a7a7;

    font-size: 14px;

    transition:
        color 0.25s ease,
        background 0.25s ease;
}


.desktop-nav a::after {
    content: "";

    position: absolute;

    right: 16px;
    left: 16px;

    bottom: 3px;

    height: 2px;

    background: var(--red);

    transform:
        scaleX(0);

    transform-origin: center;

    transition:
        transform 0.25s ease;
}


.desktop-nav a:hover,
.desktop-nav a.active {
    color: white;
}


.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    transform: scaleX(1);
}


/* =========================================================
   MENU BUTTON
========================================================= */

.menu-button {
    display: none;

    width: 42px;
    height: 42px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: #111;

    color: white;

    cursor: pointer;

    font-size: 20px;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu {
    position: fixed;

    top: 76px;

    right: 15px;
    left: 15px;

    z-index: 999;

    display: none;

    padding: 10px;

    background:
        rgba(12, 12, 12, 0.97);

    border:
        1px solid var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow);
}


.mobile-menu.show {
    display: block;
}


.mobile-menu a {
    display: block;

    padding: 13px 15px;

    border-radius: 10px;

    color: #aaa;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.mobile-menu a:hover {
    background: rgba(229, 9, 20, 0.1);
    color: white;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;

    min-height: 570px;

    max-width: 1250px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    padding: 80px 30px;

    overflow: hidden;
}


.hero-background {
    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 75% 45%,
            rgba(229, 9, 20, 0.17),
            transparent 30%
        );

    pointer-events: none;
}


.hero-content {
    position: relative;

    z-index: 2;

    max-width: 620px;
}


.hero-label {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 18px;

    color: #999;

    font-size: 12px;

    letter-spacing: 2px;
}


.hero-label span {
    width: 7px;
    height: 7px;

    background: var(--red);

    border-radius: 50%;

    box-shadow:
        0 0 15px var(--red);
}


.hero h1 {
    font-size:
        clamp(45px, 7vw, 82px);

    line-height: 1.08;

    font-weight: 900;

    letter-spacing: -3px;
}


.hero h1 strong {
    color: var(--red);

    text-shadow:
        0 0 45px rgba(229, 9, 20, 0.2);
}


.hero p {
    max-width: 570px;

    margin-top: 25px;

    color: #909090;

    font-size: 16px;

    line-height: 2;
}


.hero-button {
    display: inline-flex;

    align-items: center;

    gap: 18px;

    margin-top: 30px;

    padding:
        13px 20px;

    background:
        linear-gradient(
            135deg,
            var(--red-light),
            var(--red-dark)
        );

    border-radius: 11px;

    font-size: 14px;

    font-weight: 800;

    box-shadow:
        0 12px 35px rgba(229, 9, 20, 0.22);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.hero-button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 17px 45px rgba(229, 9, 20, 0.32);
}


.hero-button span {
    font-size: 18px;
}


/* =========================================================
   HERO DECORATION
========================================================= */

.hero-decoration {
    position: absolute;

    inset: 0;

    pointer-events: none;
}


.hero-circle {
    position: absolute;

    border: 1px solid
        rgba(229, 9, 20, 0.12);

    border-radius: 50%;
}


.circle-1 {
    width: 500px;
    height: 500px;

    right: -100px;
    top: 30px;
}


.circle-2 {
    width: 350px;
    height: 350px;

    right: -25px;
    top: 105px;
}


.circle-3 {
    width: 200px;
    height: 200px;

    right: 50px;
    top: 180px;

    border-color:
        rgba(229, 9, 20, 0.22);
}


/* =========================================================
   SECTIONS
========================================================= */

.section {
    max-width: var(--container);

    margin: 0 auto;

    padding:
        55px 30px;
}


.section-heading {
    display: flex;

    align-items: end;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 28px;
}


.section-heading > div:first-child > span {
    color: var(--red);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 3px;
}


.section-heading h2 {
    margin-top: 3px;

    font-size: 30px;

    font-weight: 900;
}


/* =========================================================
   SEARCH
========================================================= */

.search-wrapper {
    position: relative;

    width: 270px;
}


.search-wrapper input {
    width: 100%;

    height: 44px;

    padding:
        0 17px 0 42px;

    outline: none;

    background: #0e0e0e;

    color: white;

    border:
        1px solid var(--border);

    border-radius: 12px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.search-wrapper input::placeholder {
    color: #666;
}


.search-wrapper input:focus {
    border-color:
        rgba(229, 9, 20, 0.5);

    box-shadow:
        0 0 0 3px
        rgba(229, 9, 20, 0.08);
}


.search-wrapper span {
    position: absolute;

    left: 14px;

    top: 50%;

    transform:
        translateY(-50%);

    color: #777;

    font-size: 21px;

    pointer-events: none;
}


/* =========================================================
   MANGA GRID
========================================================= */

.manga-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   MANGA CARD
========================================================= */

.manga-card {
    min-width: 0;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #111,
            #0b0b0b
        );

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2);
}


.manga-card:hover {
    transform:
        translateY(-7px);

    border-color:
        rgba(229, 9, 20, 0.38);

    box-shadow:
        0 20px 45px
        rgba(0, 0, 0, 0.5);
}


/* =========================================================
   MANGA COVER
========================================================= */

.manga-cover {
    position: relative;

    width: 100%;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #171717,
            #090909
        );
}


/*
    أهم جزء للصور
*/

.manga-cover img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    object-position: center;

    background: #111;

    transition:
        transform 0.5s ease,
        opacity 0.35s ease,
        filter 0.35s ease;
}


/*
    Zoom عند Hover
*/

.manga-card:hover
.manga-cover img {
    transform: scale(1.055);

    filter:
        brightness(1.05);
}


/*
    تأثير سفلي فوق الصورة
*/

.manga-cover::after {
    content: "";

    position: absolute;

    right: 0;
    left: 0;

    bottom: 0;

    height: 45%;

    background:
        linear-gradient(
            transparent,
            rgba(0, 0, 0, 0.7)
        );

    pointer-events: none;
}


/* =========================================================
   STATUS
========================================================= */

.manga-status {
    position: absolute;

    top: 11px;
    right: 11px;

    z-index: 3;

    padding:
        4px 9px;

    background:
        rgba(5, 5, 5, 0.82);

    border:
        1px solid
        rgba(255, 255, 255, 0.12);

    border-radius: 8px;

    color: white;

    font-size: 10px;

    font-weight: 800;

    backdrop-filter:
        blur(8px);
}


.manga-status::before {
    content: "";

    display: inline-block;

    width: 5px;
    height: 5px;

    margin-left: 5px;

    background: var(--red);

    border-radius: 50%;
}


/* =========================================================
   MANGA INFO
========================================================= */

.manga-info {
    padding:
        13px 13px 15px;
}


.manga-title {
    overflow: hidden;

    color: white;

    font-size: 14px;

    font-weight: 800;

    line-height: 1.6;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.manga-meta {
    margin-top: 4px;

    color: #666;

    font-size: 11px;
}


/* =========================================================
   LOADING BOX
========================================================= */

.loading-box {
    grid-column: 1 / -1;

    min-height: 150px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    padding: 30px;

    color: #777;

    background: #0b0b0b;

    border:
        1px solid var(--border);

    border-radius: 15px;

    text-align: center;
}


.loading-box strong {
    color: var(--red);
}


/* =========================================================
   POPULAR
========================================================= */

.popular-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 15px;
}


.popular-card {
    position: relative;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px;

    background: #0e0e0e;

    border:
        1px solid var(--border);

    border-radius: 14px;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}


.popular-card:hover {
    transform: translateY(-4px);

    border-color:
        rgba(229, 9, 20, 0.3);
}


.popular-card img {
    width: 52px;
    height: 68px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 8px;

    background: #181818;
}


.popular-rank {
    color: var(--red);

    font-size: 12px;

    font-weight: 900;
}


.popular-info {
    min-width: 0;
}


.popular-info h3 {
    overflow: hidden;

    font-size: 12px;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.popular-info p {
    margin-top: 3px;

    color: #666;

    font-size: 10px;
}


/* =========================================================
   READER PAGE
========================================================= */

.reader-page {
    max-width: 1150px;

    margin: 0 auto;

    padding:
        55px 25px 80px;
}


.manga-header {
    display: grid;

    grid-template-columns:
        280px minmax(0, 1fr);

    gap: 35px;

    padding: 25px;

    background:
        linear-gradient(
            145deg,
            #111,
            #090909
        );

    border:
        1px solid var(--border);

    border-radius: 20px;

    box-shadow:
        var(--shadow);
}


.manga-main-cover {
    width: 100%;

    aspect-ratio: 2 / 3;

    object-fit: cover;

    object-position: center;

    border-radius: 15px;

    background: #151515;

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.45);
}


.manga-details {
    display: flex;

    flex-direction: column;

    justify-content: center;

    min-width: 0;
}


.manga-label {
    color: var(--red);

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 3px;
}


.manga-details h1 {
    margin-top: 8px;

    font-size:
        clamp(30px, 5vw, 52px);

    line-height: 1.2;

    font-weight: 900;
}


.manga-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 17px;
}


.manga-tag {
    padding:
        5px 10px;

    background: #171717;

    border:
        1px solid var(--border);

    border-radius: 8px;

    color: #bbb;

    font-size: 11px;
}


.manga-description {
    max-width: 750px;

    margin-top: 20px;

    color: #929292;

    line-height: 2;

    font-size: 14px;
}


.manga-author {
    margin-top: 15px;

    color: #777;

    font-size: 13px;
}


.start-reading {
    align-self: flex-start;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    margin-top: 25px;

    padding:
        12px 23px;

    background:
        linear-gradient(
            135deg,
            var(--red-light),
            var(--red-dark)
        );

    border-radius: 10px;

    font-size: 13px;

    font-weight: 900;

    box-shadow:
        0 10px 30px
        rgba(229, 9, 20, 0.2);

    transition:
        transform 0.25s ease;
}


.start-reading:hover {
    transform:
        translateY(-3px);
}


/* =========================================================
   CHAPTER LIST
========================================================= */

.chapters-heading {
    margin-top: 45px;

    margin-bottom: 15px;

    font-size: 23px;
}


.chapter-list {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.chapter-item {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding:
        15px 17px;

    background: #0d0d0d;

    border:
        1px solid var(--border);

    border-radius: 11px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.chapter-item:hover {
    background: #131313;

    border-color:
        rgba(229, 9, 20, 0.28);

    transform:
        translateX(-3px);
}


.chapter-name {
    color: #eee;

    font-size: 13px;

    font-weight: 800;
}


.chapter-date {
    margin-top: 3px;

    color: #666;

    font-size: 10px;
}


.read-chapter {
    flex-shrink: 0;

    color: var(--red);

    font-size: 11px;

    font-weight: 900;
}


/* =========================================================
   CHAPTER READER
========================================================= */

.chapter-page {
    max-width: 950px;

    margin: 0 auto;

    padding:
        35px 15px 80px;
}


.chapter-header {
    position: sticky;

    top: 76px;

    z-index: 50;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

    padding:
        12px 15px;

    background:
        rgba(10, 10, 10, 0.92);

    backdrop-filter:
        blur(15px);

    border:
        1px solid var(--border);

    border-radius: 13px;
}


.chapter-title {
    min-width: 0;

    overflow: hidden;

    color: white;

    font-size: 13px;

    font-weight: 800;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.chapter-controls {
    display: flex;

    gap: 7px;
}


.chapter-controls a {
    padding:
        7px 11px;

    background: #171717;

    border:
        1px solid var(--border);

    border-radius: 8px;

    color: #aaa;

    font-size: 10px;
}


.chapter-controls a:hover {
    color: white;

    border-color:
        rgba(229, 9, 20, 0.3);
}


#chapterImages {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 0;

    overflow: hidden;

    background: #080808;

    border-radius: 10px;
}


#chapterImages img {
    width: 100%;

    height: auto;

    display: block;

    margin: 0;

    padding: 0;

    object-fit: contain;

    background: #080808;
}


.chapter-loading {
    width: 100%;

    min-height: 180px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px;

    color: #777;

    text-align: center;
}


#chapterLoading.hidden {
    display: none;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    margin-top: 60px;

    padding:
        35px 25px;

    border-top:
        1px solid var(--border);

    text-align: center;

    background: #070707;
}


.footer-brand {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    font-weight: 900;

    letter-spacing: 1.5px;
}


.footer-mark {
    width: 32px;
    height: 32px;

    display: grid;

    place-items: center;

    background: var(--red);

    border-radius: 9px;

    font-size: 15px;
}


.footer-brand span {
    color: var(--red);
}


footer p {
    margin-top: 10px;

    color: #555;

    font-size: 11px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .manga-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }


    .popular-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 800px) {

    .navbar {
        height: 68px;

        padding:
            0 17px;
    }


    .desktop-nav {
        display: none;
    }


    .menu-button {
        display: grid;

        place-items: center;
    }


    .mobile-menu {
        top: 68px;
    }


    .hero {
        min-height: 500px;

        padding:
            60px 20px;
    }


    .hero h1 {
        letter-spacing: -2px;
    }


    .hero-decoration {
        opacity: 0.5;
    }


    .section {
        padding:
            40px 17px;
    }


    .section-heading {
        align-items: stretch;

        flex-direction: column;
    }


    .search-wrapper {
        width: 100%;
    }


    .manga-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 12px;
    }


    .manga-info {
        padding:
            10px;
    }


    .manga-title {
        font-size: 12px;
    }


    .manga-meta {
        font-size: 10px;
    }


    .reader-page {
        padding:
            25px 15px 60px;
    }


    .manga-header {
        grid-template-columns:
            150px minmax(0, 1fr);

        gap: 20px;

        padding: 18px;
    }


    .manga-details h1 {
        font-size: 27px;
    }


    .manga-description {
        font-size: 12px;

        line-height: 1.9;
    }

}


@media (max-width: 520px) {

    .logo-name {
        font-size: 15px;
    }


    .logo-mark {
        width: 36px;
        height: 36px;

        font-size: 18px;
    }


    .hero {
        min-height: 470px;

        align-items: flex-end;

        padding-bottom: 55px;
    }


    .hero h1 {
        font-size: 46px;
    }


    .hero p {
        font-size: 13px;

        line-height: 1.9;
    }


    .section-heading h2 {
        font-size: 24px;
    }


    .manga-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }


    .manga-card {
        border-radius: 12px;
    }


    .manga-cover {
        aspect-ratio: 2 / 3;
    }


    .manga-status {
        top: 7px;
        right: 7px;

        padding:
            3px 7px;

        font-size: 8px;
    }


    .manga-info {
        padding:
            9px 9px 11px;
    }


    .manga-title {
        font-size: 11px;
    }


    .popular-grid {
        grid-template-columns: 1fr;
    }


    .manga-header {
        display: flex;

        flex-direction: column;

        padding: 15px;
    }


    .manga-main-cover {
        width: 170px;

        margin: 0 auto;
    }


    .manga-details {
        text-align: right;
    }


    .manga-details h1 {
        font-size: 25px;
    }


    .manga-description {
        font-size: 12px;
    }


    .start-reading {
        width: 100%;
    }


    .chapter-header {
        top: 68px;

        flex-direction: column;

        align-items: stretch;
    }


    .chapter-controls {
        width: 100%;
    }


    .chapter-controls a {
        flex: 1;

        text-align: center;
    }


    #chapterImages {
        border-radius: 0;
    }

}


/* =========================================================
   RED GLOW DETAILS
========================================================= */

.manga-card:hover .manga-status {
    border-color:
        rgba(229, 9, 20, 0.4);
}


.manga-card:hover .manga-title {
    color: #fff;
}


::selection {
    background: var(--red);
    color: #fff;
   }


/* =========================================================
   MODERN CATALOG FILTERS
========================================================= */

.catalog-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.search-wrapper {
    width: min(390px, 100%);
}

.search-wrapper input {
    height: 48px;
    padding-right: 18px;
    padding-left: 48px;
    border-radius: 14px;
    background:
        linear-gradient(145deg, #141414, #0d0d0d);
    border: 1px solid rgba(255,255,255,.09);
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

.search-wrapper input:focus {
    border-color: rgba(229,9,20,.6);
    box-shadow: 0 0 0 4px rgba(229,9,20,.09),
                0 12px 35px rgba(0,0,0,.25);
}

.clear-filters {
    height: 48px;
    padding: 0 15px;
    border: 1px solid rgba(229,9,20,.28);
    border-radius: 14px;
    background: rgba(229,9,20,.08);
    color: #ff6970;
    cursor: pointer;
    transition: .2s ease;
}

.clear-filters:hover {
    background: rgba(229,9,20,.16);
    transform: translateY(-1px);
}

.catalog-filters {
    margin: 24px 0 26px;
    padding: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
    border: 1px solid var(--border);
    border-radius: 18px;
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.filter-title span {
    font-size: 14px;
    font-weight: 900;
}

.filter-title small {
    color: #666;
    font-size: 11px;
}

.genre-filters {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 1px 5px;
    scrollbar-width: thin;
}

.genre-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: #111;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
    transition: .2s ease;
}

.genre-chip:hover {
    color: #fff;
    border-color: rgba(229,9,20,.35);
    transform: translateY(-1px);
}

.genre-chip.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--red-light), var(--red-dark));
    box-shadow: 0 7px 22px rgba(229,9,20,.18);
}

.manga-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.card-genre {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    color: #777;
    font-size: 9px;
}

.manga-card {
    border-radius: 18px;
    background: linear-gradient(160deg, #141414, #090909);
}

.manga-info {
    padding: 13px 14px 15px;
}

.manga-title {
    font-size: 13px;
    line-height: 1.55;
}

.manga-cover {
    box-shadow: inset 0 -70px 80px rgba(0,0,0,.2);
}

/* =========================================================
   MOBILE CATALOG
========================================================= */

@media (max-width: 700px) {

    .catalog-tools {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        width: 100%;
    }

    .clear-filters {
        width: 100%;
    }

    .catalog-filters {
        margin-top: 18px;
        padding: 14px;
        border-radius: 15px;
    }

    .genre-filters {
        margin-inline: -3px;
        padding-inline: 3px;
    }

}

/* =========================================================
   PRO UI REFRESH
========================================================= */

:root {
    --ease: cubic-bezier(.22,.8,.24,1);
    --red-glow: rgba(229,9,20,.22);
}

button, a, input, select {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid rgba(229,9,20,.7);
    outline-offset: 3px;
}

/* Search + filters */
.catalog-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.status-select-wrap {
    position: relative;
    min-width: 150px;
}

.status-select-wrap::after {
    content: "⌄";
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-52%);
    color: #888;
    pointer-events: none;
    font-size: 15px;
}

.status-filter {
    width: 100%;
    height: 48px;
    appearance: none;
    padding: 0 15px 0 35px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: linear-gradient(145deg,#141414,#0c0c0c);
    color: #ddd;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,.14);
    transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}

.status-filter:hover {
    border-color: rgba(229,9,20,.32);
    transform: translateY(-1px);
}

.status-filter:focus {
    border-color: rgba(229,9,20,.6);
    box-shadow: 0 0 0 4px rgba(229,9,20,.08), 0 10px 30px rgba(0,0,0,.2);
    outline: none;
}

.status-filter option {
    background: #111;
    color: #fff;
}

/* Tall scrollable genre picker */
.catalog-filters {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 0%, rgba(229,9,20,.08), transparent 28%),
        linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
    box-shadow: 0 15px 45px rgba(0,0,0,.16);
}

.genre-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    grid-auto-rows: minmax(44px, auto);
    max-height: 185px;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
    gap: 9px;
    padding: 3px 4px 7px 2px;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a transparent;
}

.genre-filters::-webkit-scrollbar {
    width: 5px;
}

.genre-filters::-webkit-scrollbar-track {
    background: transparent;
}

.genre-filters::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 99px;
}

.genre-chip {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 12px;
    background: rgba(18,18,18,.9);
    color: #aaa;
    border: 1px solid rgba(255,255,255,.075);
    box-shadow: inset 0 1px rgba(255,255,255,.025);
    transition: transform .2s var(--ease), color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.genre-chip:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(229,9,20,.38);
    background: rgba(229,9,20,.07);
}

.genre-chip.active {
    background: linear-gradient(135deg,var(--red-light),var(--red-dark));
    box-shadow: 0 8px 25px rgba(229,9,20,.2), inset 0 1px rgba(255,255,255,.14);
}

/* Cards */
.manga-card {
    position: relative;
    isolation: isolate;
    transition: transform .32s var(--ease), border-color .28s ease, box-shadow .32s var(--ease);
    will-change: transform;
}

.manga-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 0 1px rgba(229,9,20,.3), 0 18px 55px rgba(229,9,20,.08);
    transition: opacity .28s ease;
    z-index: -1;
}

.manga-card:hover::before { opacity: 1; }

.manga-status {
    border-radius: 999px;
    padding: 5px 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}

.manga-info {
    min-height: 76px;
}

/* More button */
.load-more-button {
    width: min(100%, 270px);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 28px auto 0;
    padding: 0 22px;
    border: 1px solid rgba(229,9,20,.38);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(229,9,20,.16), rgba(229,9,20,.05));
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
    box-shadow: 0 12px 35px rgba(0,0,0,.2);
    transition: transform .25s var(--ease), background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.load-more-button::after {
    content: "↓";
    font-size: 17px;
    transition: transform .25s var(--ease);
}

.load-more-button:hover {
    transform: translateY(-3px);
    border-color: rgba(229,9,20,.65);
    background: linear-gradient(135deg, rgba(229,9,20,.28), rgba(229,9,20,.08));
    box-shadow: 0 18px 45px rgba(229,9,20,.13);
}

.load-more-button:hover::after { transform: translateY(3px); }
.load-more-button:active { transform: translateY(-1px) scale(.985); }

/* Reader detail CTA */
.discord-join-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(88,101,242,.28);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(88,101,242,.13), rgba(88,101,242,.035));
    color: #fff;
    box-shadow: 0 12px 35px rgba(0,0,0,.16);
    transition: transform .28s var(--ease), border-color .28s ease, box-shadow .28s ease;
}

.discord-join-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    left: -80px;
    top: -95px;
    border-radius: 50%;
    background: rgba(88,101,242,.12);
    filter: blur(15px);
    pointer-events: none;
}

.discord-join-card:hover {
    transform: translateY(-3px);
    border-color: rgba(88,101,242,.55);
    box-shadow: 0 18px 45px rgba(0,0,0,.26), 0 0 30px rgba(88,101,242,.08);
}

.discord-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #5865F2;
    color: #fff;
    box-shadow: 0 9px 25px rgba(88,101,242,.28);
}

.discord-icon svg { width: 28px; height: 28px; }

.discord-join-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discord-join-text strong { font-size: 13px; }
.discord-join-text small { color: #8e94aa; font-size: 10px; }
.discord-arrow { margin-right: auto; color: #aeb3ff; font-size: 20px; transition: transform .25s var(--ease); }
.discord-join-card:hover .discord-arrow { transform: translateX(-4px); }

/* Chapter reader */
.chapter-body {
    background: #050505;
}

.reader-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px max(15px, calc((100vw - 1100px) / 2));
    background: rgba(5,5,5,.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.chapter-current-title {
    min-width: 0;
    overflow: hidden;
    color: #ddd;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.reader-back {
    flex: 0 0 auto;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    color: #aaa;
    background: #111;
    font-size: 11px;
    transition: .22s var(--ease);
}

.reader-back:hover { color: #fff; border-color: rgba(229,9,20,.35); transform: translateY(-1px); }

.chapter-reader {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 25px 14px 70px;
}

.chapter-images, #chapterImages {
    border: 1px solid rgba(255,255,255,.04);
    box-shadow: 0 20px 55px rgba(0,0,0,.25);
}

.chapter-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.chapter-nav-button {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 13px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 13px;
    background: linear-gradient(145deg,#151515,#0d0d0d);
    color: #aaa;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 9px 25px rgba(0,0,0,.15);
    transition: transform .24s var(--ease), color .2s ease, border-color .2s ease, background .2s ease;
}

.chapter-nav-button:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(229,9,20,.35);
    background: linear-gradient(145deg,#1a1a1a,#101010);
}

.chapter-nav-button.main {
    color: #fff;
    border-color: rgba(229,9,20,.35);
    background: linear-gradient(135deg, rgba(229,9,20,.18), rgba(229,9,20,.06));
}

.chapter-discord {
    max-width: 680px;
    margin: 22px auto 0;
}

/* smoother rendering */
.manga-grid, .popular-grid, .chapter-list {
    contain: layout paint;
}

.manga-cover img, .popular-card img, .manga-main-cover, #chapterImages img {
    backface-visibility: hidden;
    transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 800px) {
    .section-heading { align-items: stretch; flex-direction: column; }
    .catalog-tools { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .search-wrapper { width: 100%; }
    .status-select-wrap { min-width: 0; }
    .clear-filters { width: 100%; grid-column: 1 / -1; }
    .manga-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
    .popular-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
    .genre-filters { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: 205px; }
    .manga-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
    .manga-title { font-size: 12px; }
    .manga-info { min-height: 70px; padding: 10px 11px 12px; }
    .chapter-navigation { grid-template-columns: 1fr; }
    .chapter-nav-button.main { order: -1; }
    .reader-navbar { gap: 8px; }
    .reader-navbar .logo-name { display: none; }
    .chapter-current-title { font-size: 11px; }
    .discord-join-card { padding: 12px; }
    .discord-icon { width: 43px; height: 43px; flex-basis: 43px; }
}


/* Discord welcome modal */
.discord-welcome-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(0,0,0,.78); backdrop-filter: blur(9px); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.discord-welcome-overlay.is-visible { opacity: 1; visibility: visible; }
.discord-welcome-panel { position: relative; width: min(100%, 460px); padding: 34px 26px 24px; text-align: center; border: 1px solid rgba(88,101,242,.42); border-radius: 22px; background: radial-gradient(circle at 50% 0, rgba(88,101,242,.19), transparent 45%), #101116; box-shadow: 0 25px 90px rgba(0,0,0,.65); transform: translateY(12px) scale(.98); transition: transform .25s ease; }
.discord-welcome-overlay.is-visible .discord-welcome-panel { transform: translateY(0) scale(1); }
.discord-welcome-close { position: absolute; top: 10px; left: 13px; width: 34px; height: 34px; border: 0; border-radius: 10px; color: #b9bdd0; background: rgba(255,255,255,.07); font-size: 26px; cursor: pointer; }
.discord-welcome-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 19px; color: white; background: #5865f2; box-shadow: 0 10px 30px rgba(88,101,242,.32); font-size: 35px; font-weight: 900; }
.discord-welcome-eyebrow { color: #aab0ff; font-size: 10px; letter-spacing: 2px; font-weight: 800; }
.discord-welcome-panel h2 { margin: 8px 0 10px; color: #fff; font-size: clamp(20px, 5vw, 25px); line-height: 1.5; }
.discord-welcome-copy { color: #b6b8c5; font-size: 14px; line-height: 1.9; }
.discord-old-server-notice { margin: 18px 0; padding: 11px 12px; border: 1px solid rgba(255,190,70,.25); border-radius: 12px; background: rgba(255,190,70,.07); color: #f2d49a; font-size: 12px; line-height: 1.8; }
.discord-welcome-join { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; padding: 13px 16px; border-radius: 12px; background: #5865f2; color: white; font-weight: 800; transition: background .2s, transform .2s; }
.discord-welcome-join:hover { background: #4752c4; transform: translateY(-2px); }
.discord-welcome-join span { font-size: 18px; }
.discord-welcome-later { margin-top: 13px; padding: 7px 12px; border: 0; background: transparent; color: #8f93a5; font-size: 12px; cursor: pointer; }
.discord-welcome-later:hover { color: #fff; }
@media (max-width: 480px) { .discord-welcome-panel { padding: 30px 19px 20px; } }
