.manga-card p,
.manga-card strong {
    display: -webkit-box;
    -webkit-box-orient: vertical
}

#chapterList,
.chapter-grid {
    scrollbar-color: rgba(0, 123, 255, 0.3) rgba(0, 0, 0, 0.1)
}

#characterSection,
#tagsSection,
#watchlist h2 {
    margin: 2rem 0
}

body {
    font-family: "Kumbh Sans", sans-serif;
    background: #111;
    color: #fff;
    margin: 0;
    padding: 0;
    flex-direction: column;
    align-items: center
}

h2 {
    font-size: 16px
}

.main {
    width: 100%;
    max-width: none;
    padding: 0;
    display: grid;
    grid-template-columns: auto 1fr
}

.section_one {
    width: 100%;
    margin-left: 0;
    grid-column: 2;
    min-height: 100vh
}

.section_two {
    width: 100%;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto
}

.about_section_two {
    display: block;
    margin: 0 auto;
    width: 100%
}

center {
    display: contents
}

.sidenav_container {
    position: sticky;
    top: 0;
    height: 100vh;
    grid-column: 1
}

.search-box {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 1rem;
    display: flex;
    gap: 10px;
    padding: 0 20px
}

.results,
.watchlist-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    width: 100%
}

.search-box input {
    flex: 1;
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .05);
    color: #fff
}

#watchlist h2,
.mangaDetails h2 {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    -webkit-text-fill-color: transparent;
    text-align: center
}

.results {
    padding: 20px
}

.manga-card {
    background: rgba(32, 32, 32, .8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 1rem;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    min-height: 380px;
    transition: .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column
}

#chapterList button,
.searchbtn {
    background: #007bff;
    transition: background-color .3s;
    cursor: pointer
}

.manga-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, .2);
    border-color: rgba(129, 236, 236, .3)
}

.manga-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: .8rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2)
}

.manga-card strong {
    font-size: 16pxrem;
    color: #fff;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin-bottom: .5rem;
    line-height: 1.2;
    height: 2.4em
}

#chapterList,
.manga-card p {
    overflow-y: auto;
    scrollbar-width: thin
}

.manga-card p {
    font-size: .8rem;
    color: #aaa;
    margin: .5rem 0;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    flex-grow: 1;
    overflow-x: hidden;
    scrollbar-color: #555 transparent
}

.manga-card p::-webkit-scrollbar {
    width: 4px
}

.manga-card p::-webkit-scrollbar-track {
    background: 0 0
}

.manga-card p::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px
}

.card-buttons {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: .8rem
}

.searchbtn {
    padding: .75rem 1rem;
    color: #fff;
    border: none;
    border-radius: 4px
}

#chapterList button.watched-chapter,
#chapterList button:hover,
#chapterList ul li button.current-chapter:hover,
.searchbtn:hover {
    background-color: #0056b3
}

.mangaDetails h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    -webkit-background-clip: text;
    background-clip: text
}

.mangaDetails img {
    display: block;
    max-width: 300px;
    height: auto;
    margin: 0 auto 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
    transition: transform .3s
}

.mangaDetails img:hover {
    transform: scale(1.02)
}

.mangaDetails p {
    font-size: 1rem;
    line-height: 1.6;
    color: #eee;
    margin-bottom: 1.5rem;
    text-align: justify
}

#detailsSection {
    background: rgba(255, 255, 255, .05);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0
}

#detailsSection p {
    margin: .5rem 0;
    font-size: .95rem;
    color: #ddd
}

#characterSection h3,
#tagsSection h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #00b4db
}

.tag {
    display: inline-block;
    padding: .5rem 1rem;
    background: rgba(0, 180, 219, .1);
    border: 1px solid rgba(0, 180, 219, .3);
    border-radius: 50px;
    margin: .3rem;
    font-size: .9rem;
    color: #00b4db;
    transition: .3s
}

.tag:hover {
    background: rgba(0, 180, 219, .2);
    transform: translateY(-2px)
}

.character-card {
    background: rgba(255, 255, 255, .05);
    border-radius: 12px;
    padding: 1rem;
    margin: .5rem;
    width: 150px;
    text-align: center;
    transition: transform .3s
}

.character-card:hover {
    transform: translateY(-5px)
}

.character-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: .8rem
}

.character-card h4 {
    font-size: .9rem;
    color: #fff;
    margin: .5rem 0
}

.character-card p {
    font-size: .8rem;
    color: #aaa;
    margin: 0
}

#chapterList h3 {
    margin-top: 1rem;
    margin-bottom: .5rem;
    color: #eee
}

#chapterList ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center
}

#chapterList li {
    margin: 0
}

#chapterList button {
    padding: .75rem 1rem;
    color: #fff;
    border: none;
    border-radius: 8px
}

.chapter-button {
    background: rgba(0, 123, 255, .08);
    border: 1px solid rgba(0, 123, 255, .2);
    color: #007bff;
    padding: .75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: .3s, opacity .3s;
    position: relative;
    overflow: hidden
}

.chapter-button:hover,
body.light .chapter-button:hover {
    background: rgba(0, 123, 255, .12)
}

.chapter-button.watched {
    opacity: .5;
    background: rgba(0, 184, 148, .05);
    border-color: rgba(0, 184, 148, .2);
    color: #00b894
}

.chapter-button.watched::before {
    content: '✓';
    left: 20px;
    right: auto;
    opacity: 1
}

#chapterList {
    border-radius: 12px;
    max-height: 500px;
    padding: 1rem
}

.chapter-grid {
    scrollbar-width: thin
}

.chapter-grid::-webkit-scrollbar {
    width: 8px
}

.chapter-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, .1);
    border-radius: 4px
}

.chapter-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, .3);
    border-radius: 4px;
    transition: background .3s
}

#chapterList ul li button,
.view-btn {
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background-color .3s
}

.chapter-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, .5)
}

.view-btn {
    padding: .5rem 1rem;
    background: #15797077;
    border-radius: 4px;
    text-decoration: dotted
}

#chapterList ul li button {
    background-color: #1f5f22c7;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 4px 2px;
    border-radius: 5px
}

#chapterList ul li button:hover {
    background-color: #3e8e41
}

#chapterList ul li button.watched-chapter {
    background-color: #555;
    color: #ddd
}

#chapterList ul li button.watched-chapter:hover {
    background-color: #333
}

#chapterList ul li button.current-chapter {
    background-color: #007bff;
    color: #fff
}

.player {
    width: 100%;
    height: 100vh;
    border: none;
    border-radius: 8px;
    margin-top: 50px
}

@media (min-width:1600px) {

    .results,
    .watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr))
    }
}

@media (max-width:768px) {
    .main {
        grid-template-columns: 1fr
    }

    .section_one {
        grid-column: 1;
        margin-left: 0
    }

    .sidenav_container {
        position: fixed;
        z-index: 100
    }

    .results,
    .watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 15px
    }

    .manga-card {
        min-height: 340px;
        padding: .8rem
    }

    .search-box,
    .watchlist-toggle {
        padding: 0 15px
    }

    .mangaDetails {
        padding: 1.5rem;
        margin: 1rem
    }

    .mangaDetails img {
        max-width: 200px
    }

    .chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: .8rem;
        padding: 1rem
    }

    .player {
        height: 100vh
    }

    #chapterList {
        border-radius: 12px;
        max-height: 500px;
        overflow-y: auto
    }

    #chapterList h3 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem
    }
}

body.light .empty-watchlist,
body.light .manga-card,
body.light .mangaDetails {
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(0, 0, 0, .1)
}

@media (max-width:480px) {

    .results,
    .watchlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 10px
    }

    .manga-card {
        min-height: 300px;
        padding: .6rem
    }

    .card-buttons {
        flex-direction: column
    }

    .remove-btn,
    .view-btn,
    .watchlist-btn {
        width: 100%;
        padding: .5rem
    }

    .mangaDetails {
        padding: 1rem;
        margin: .5rem .5rem 10px
    }

    .chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: .6rem;
        padding: .8rem
    }

    #chapterList {
        padding: 1rem;
        margin: 1rem
    }

    #chapterList h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem
    }
}

body.light .character-card h4,
body.light .manga-card strong,
body.light .mangaDetails p {
    color: #333
}

body.light .character-card p,
body.light .empty-watchlist,
body.light .manga-card p {
    color: #666
}

#watchlist h2 {
    font-size: 16pxrem;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700
}

.empty-watchlist {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
    grid-column: 1/-1;
    background: rgba(32, 32, 32, .5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .1)
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    padding: .8rem 1.5rem;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 184, 148, .3);
    animation: .3s ease-out slideIn;
    z-index: 1000
}

@keyframes slideIn {
    from {
        transform: translateX(100%) translateY(100%);
        opacity: 0
    }

    to {
        transform: translateX(0) translateY(0);
        opacity: 1
    }
}

body.light #detailsSection,
body.light .character-card {
    background: rgba(0, 0, 0, .05)
}

body.light #detailsSection p {
    color: #444
}

body.light .tag {
    background: rgba(0, 180, 219, .1);
    color: #007bff
}

body.light #chapterList {
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(0, 0, 0, .1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .08)
}

body.light .chapter-button {
    background: rgba(0, 123, 255, .08);
    border: 1px solid rgba(0, 123, 255, .2);
    color: #007bff
}

body.light .chapter-button.watched {
    opacity: .5;
    background: rgba(0, 184, 148, .08);
    border-color: rgba(0, 184, 148, .15);
    color: #00b894
}