body {
    font-family: "Kumbh Sans", sans-serif;
    background: #111;
    color: #fff;
    margin: 0;
    padding: 0rem;
    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;
}

.search-box input {
    flex: 1;
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.results {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    width: 100%;
    padding: 20px;
}

.watchlist-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    width: 100%;
}

.manga-card {
    background: rgba(32, 32, 32, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    min-height: 380px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.manga-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(129, 236, 236, 0.3);
}

.manga-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.manga-card strong {
    font-size: 16pxrem;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    height: 2.4em;
}

.manga-card p {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow-y: auto;
    flex-grow: 1;
    overflow-x: hidden;

    /* Scrollbar style */
    scrollbar-width: thin;
    /* For Firefox */
    scrollbar-color: #555 transparent;
    /* Thumb + Track */
}

/* Chrome, Edge, Safari */
.manga-card p::-webkit-scrollbar {
    width: 4px;
    /* Super slim */
}

.manga-card p::-webkit-scrollbar-track {
    background: transparent;
    /* No ugly background */
}

.manga-card p::-webkit-scrollbar-thumb {
    background-color: #555;
    /* Scrollbar color */
    border-radius: 10px;
    /* Round edges */
}


.card-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.8rem;
}

.searchbtn {
    padding: 0.75rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.searchbtn:hover {
    background-color: #0056b3;
}

/* Manga Reader Page Styles */


.mangaDetails h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #00b4db, #0083b0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.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, 0.3);
    transition: transform 0.3s ease;
}

.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, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

#detailsSection p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #ddd;
}

#tagsSection {
    margin: 2rem 0;
}

#tagsSection h3,
#characterSection h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #00b4db;
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 180, 219, 0.1);
    border: 1px solid rgba(0, 180, 219, 0.3);
    border-radius: 50px;
    margin: 0.3rem;
    font-size: 0.9rem;
    color: #00b4db;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(0, 180, 219, 0.2);
    transform: translateY(-2px);
}

#characterSection {
    margin: 2rem 0;
}

.character-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem;
    width: 150px;
    text-align: center;
    transition: transform 0.3s ease;
}

.character-card:hover {
    transform: translateY(-5px);
}

.character-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
}

.character-card h4 {
    font-size: 0.9rem;
    color: #fff;
    margin: 0.5rem 0;
}

.character-card p {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
}

#chapterList h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #eee;
}

#chapterList ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

#chapterList li {
    margin: 0;
}

#chapterList button {
    padding: 0.75rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#chapterList button:hover {
    background-color: #0056b3;
}

#chapterList button.watched-chapter {
    background-color: #0056b3;
}

.chapter-button {
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.2);
    color: #007bff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chapter-button:hover {
    background: rgba(0, 123, 255, 0.12);
}

.chapter-button.watched {
    opacity: 0.5;
    background: rgba(0, 184, 148, 0.05);
    border-color: rgba(0, 184, 148, 0.2);
    color: #00b894;
}

.chapter-button.watched::before {
    content: '✓';
    left: 20px;
    right: auto;
    opacity: 1;
}




#chapterList {
    border-radius: 12px;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 123, 255, 0.3) rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

/* Custom Scrollbar Styling */
.chapter-grid {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 123, 255, 0.3) rgba(0, 0, 0, 0.1);
}

.chapter-grid::-webkit-scrollbar {
    width: 8px;
}

.chapter-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.chapter-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.chapter-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, 0.5);
}


















.view-btn {
    padding: 0.5rem 1rem;
    background: #15797077;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: dotted;
}














#chapterList ul li button {
    background-color: #1f5f22c7;
    /* Green */
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#chapterList ul li button:hover {
    background-color: #3e8e41;
}

#chapterList ul li button.watched-chapter {
    background-color: #555;
    /* Darker color for watched chapters */
    color: #ddd;
}

#chapterList ul li button.watched-chapter:hover {
    background-color: #333;
}

/* Style for the currently watched chapter */
#chapterList ul li button.current-chapter {
    background-color: #007bff;
    /* Blue color for current chapter */
    color: #fff;
}

#chapterList ul li button.current-chapter:hover {
    background-color: #0056b3;
}

/* Player Styles */
.player {
    width: 100%;
    height: 100vh;
    border: none;
    border-radius: 8px;
    margin-top: 50px;
}

















/* Responsive adjustments */
@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: 0.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: 0.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;
    }
}

@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: 0.6rem;
    }

    .card-buttons {
        flex-direction: column;
    }

    .view-btn,
    .watchlist-btn,
    .remove-btn {
        width: 100%;
        padding: 0.5rem;
    }



    .mangaDetails {
        padding: 1rem;
        margin: 0.5rem;
        margin-bottom: 10px;
    }

    .chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.6rem;
        padding: 0.8rem;
    }



    #chapterList {
        padding: 1rem;
        margin: 1rem;
    }

    #chapterList h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

/* Light mode adjustments */
body.light .manga-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light .manga-card strong {
    color: #333;
}

body.light .manga-card p {
    color: #666;
}

body.light .empty-watchlist {
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#watchlist h2 {
    text-align: center;
    margin: 2rem 0;
    font-size: 16pxrem;
    background: linear-gradient(135deg, #00b4db, #0083b0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    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, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%) translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

/* Light mode adjustments for manga reader */
body.light .mangaDetails {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light .mangaDetails p {
    color: #333;
}

body.light #detailsSection {
    background: rgba(0, 0, 0, 0.05);
}

body.light #detailsSection p {
    color: #444;
}

body.light .tag {
    background: rgba(0, 180, 219, 0.1);
    color: #007bff;
}

body.light .character-card {
    background: rgba(0, 0, 0, 0.05);
}

body.light .character-card h4 {
    color: #333;
}

body.light .character-card p {
    color: #666;
}

body.light #chapterList {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light .chapter-button {
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.2);
    color: #007bff;
}

body.light .chapter-button:hover {
    background: rgba(0, 123, 255, 0.12);
}

body.light .chapter-button.watched {
    opacity: 0.5;
    background: rgba(0, 184, 148, 0.08);
    border-color: rgba(0, 184, 148, 0.15);
    color: #00b894;
}