@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;700&display=swap');


html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.element::-webkit-scrollbar {
    width: 0
}

/* Footer Styles */
.site-footer {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3%;
    margin-top: auto;
    width: 100%;
    backdrop-filter: blur(5px);

}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 4rem;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
}

.footer-links a {
    color: #ccc;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

/* Floating Create Button */
.create-link-wrapper {
    position: fixed;
    bottom: 0px;
    right: 0px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.create-link-wrapper:hover {
    transform: scale(1.1) translateY(-2px) translateX(-5px);
    /* right: 20px;  Keep stable */
}

.create-link-wrapper img {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    width: 160px;
    /* Slightly smaller base size */
    height: auto;
    transition: filter 0.3s ease;
}

.create-link-wrapper:hover img {
    filter: drop-shadow(0 15px 25px rgba(221, 35, 35, 0.4)) brightness(1.1);
}

/* Create Button Responsiveness */
@media (max-width: 1400px) {
    .create-link-wrapper img {
        width: 130px;
    }
}

@media (max-width: 1024px) {
    .create-link-wrapper img {
        width: 100px;
    }
}

.icon::before {
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

body {
    background: linear-gradient(to bottom, rgb(255, 255, 255), rgba(0, 0, 0, 0.041)), url('../images/background/mainbackground2.jpg');
    background-size: cover;
    background-repeat: repeat;
    background-attachment: fixed;
    color: #FFFFFF;

    font-family: 'Manrope', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    animation: moveBackground 100s infinite alternate linear;
    display: flex;
    flex-direction: column;
}

/* Main Content Wrapper */
.main-content-layout {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    /* Or a constrained width like 1400px if desired */
    margin: 0 auto;
    padding-top: -10px;
    /* Space for fixed header/nav */
    padding-bottom: 50px;
    position: relative;
    box-sizing: border-box;
    top: 0;
}

.right-sidebar {
    width: 32%;
    display: flex;
    flex-direction: column;
    gap: 40px;

}


@keyframes moveBackground {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

a {
    text-decoration: none;
    color: #06070c;
}

a:hover {
    text-decoration: underline;

}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes softScaleIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#modal {
    position: fixed !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    margin: 0;
}

header .logo a {
    background-image: url("../images/logo2.png");
    background-size: 150px;
    background-repeat: no-repeat;
    display: inline-block;
    height: 100px;
    width: 240px;
    text-indent: -999999px;
    position: relative;
    top: -20px;
    left: 70px;
    transition: transform 0.3s ease-in-out;
}

li:first-child {
    float: left;
}

li {
    display: inline-block;
    padding-right: 7%;
    margin: 10px 0 0 0;
    font-size: 36px;
    transition: all 0.3s ease-in-out;
}

.topnav {
    list-style: none;
    font-family: 'Manrope', sans-serif;
    font-weight: bold;
    color: rgb(0, 0, 0);
    margin: 50px 0 0 0;
    text-align: right;
    transition: all 0.3s ease-in-out, text-decoration 0.3s ease-in-out;
    position: sticky;
    top: 0;

    /* Ensure navigation is above main content but not blocking other things */
}

.topnav .logout-link a {
    transition: color 0.3s ease-in-out, text-decoration 0.3s ease-in-out;
}

.topnav .logout-link:hover {
    color: #d31a1a;
    /* Logout */
    text-decoration: underline;
}

.topnav .adDash-link a {
    transition: color 0.3s ease-in-out, text-decoration 0.3s ease-in-out;
}

.topnav .adDash-link:hover {
    color: #d31a1a;
    /* Advertising */
    text-decoration: underline;
}

/*Topnav item colors*/
.topnav li:nth-of-type(1):hover {
    color: #d62c2c;

}

.topnav li:nth-of-type(2):hover {
    color: #d31a1a;
}

.topnav li:nth-of-type(3):hover {
    color: #2241eb;
    /* View Comics */
}

.topnav li:nth-of-type(4):hover {
    color: #d31a1a;
    /* Profile */
}

.topnav li:nth-of-type(5):hover {
    color: #000000;
    /* Notification Button */
}

.topnav li:nth-of-type(6):hover {
    color: #d31a1a;
    /*  */
}

.topnav li:nth-of-type(7):hover {
    color: #d31a1a;
    /*  */
}

section header {
    margin-top: -110px;
    font-family: 'Manrope';
    font-size: 42px;
    margin-bottom: 0px;
    transition: all 0.3s ease-in-out;
}

.home {
    margin-top: 50px;
    transition: all 0.3s ease-in-out;
}

.games {
    margin-top: 20px;
    transition: all 0.3s ease-in-out;
}

.leftsection {
    text-align: left;
    padding: 2%;
    transition: all 0.3s ease-in-out;
}

#sown {
    text-align: left;
    padding: 5%;
    align-self: normal;
    margin-top: 10%;
    transition: all 0.3s ease-in-out;
}

section {
    margin-top: 2%;
    text-align: center;
    padding: 2%;
    color: #151D21;
    transition: all 0.3s ease-in-out;
}

section nav {
    font-family: 'Manrope';
    font-size: 36px;
    line-height: 55px;
    text-align: left;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

section .mybutton {
    font-family: 'Manrope';
    font-size: 24px;
    color: #151D21;
    background: #ff7a7a;
    display: inline-flex;
    padding: 6px;
    margin-top: 30px;
    margin-right: 5%;
    margin-left: 5%;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.features {
    color: gray;
    padding: 20px;
    display: flex;
    flex-direction: row;
    position: relative;
    top: -90px;
    transition: all 0.3s ease-in-out;
    animation: moveFeatures 15s infinite alternate linear;
}

@keyframes moveFeatures {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(20px);
    }
}

.features figure {
    margin: auto;
    padding: 5px;
    text-align: center;
    width: 300px;
    transition: all 0.3s ease-in-out;
}

.features figure img {
    border-radius: 50%;
    width: 300px;
    height: 300px;
    transition: all 0.3s ease-in-out;
}

figure img:hover {
    filter: brightness(0.7);
    transition: all 0.3s ease-in-out;
}

figure figcaption {
    font-family: 'Manrope';
    font-size: 36px;
    margin-top: 10px;
    color: #151D21;
    margin-bottom: 100px;
    transition: all 0.3s ease-in-out;
}

figure figcaption a:hover {
    color: gray;
    transition: all 0.3s ease-in-out;
}

section .mybutton:hover {
    background: white;
    font-size: 26px;
    margin-top: 29px;
    transition: all 0.3s ease-in-out;
}

.par {
    margin-top: 500px;
    color: #151D21;
    height: 650px;
    transition: all 0.3s ease-in-out;
}

footer {
    font-family: 'Manrope';
    text-align: center;
    position: relative;
    /* Restored to flow */
    width: 100%;
    margin-top: auto;
    /* Pushes to bottom in flex column body */
    transition: all 0.3s ease-in-out;
}

@media screen and (max-width: 1140px) {
    section nav {
        font-family: 'Manrope';
        font-size: 24px;
        line-height: 36px;
        text-align: left;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.3s ease-in-out;
    }

    /* Added responsive logo styles */
    header .logo a {
        left: 40px;
        background-size: 120px;
        width: 180px;
        height: 80px;
        top: 0px;
        background-position: center;
    }

    li {
        font-size: 24px;
        transition: all 0.3s ease-in-out;
    }

    .features {
        display: flex;
        flex-direction: row;
        position: relative;
        top: -40px;
        transition: all 0.3s ease-in-out;
    }

    .features figure img {
        border-radius: 50%;
        width: 200px;
        height: 200px;
        transition: all 0.3s ease-in-out;
    }

    figure figcaption {
        font-family: 'Manrope';
        font-size: 24px;
        margin-top: 10px;
        margin-bottom: 100px;
        transition: all 0.3s ease-in-out;
    }
}

@media screen and (max-width: 760px) {
    .features {
        display: block;
        transition: all 0.3s ease-in-out;
    }

    li {
        font-size: 14px;
        transition: all 0.3s ease-in-out;
    }

    section header {
        font-size: 32px;
        transition: all 0.3s ease-in-out;
    }

    .games {
        margin-top: 50px;
        transition: all 0.3s ease-in-out;
    }

    .features figure:first-child {
        padding-top: 100px;
        transition: all 0.3s ease-in-out;
    }

    section nav {
        font-size: 16px;
        line-height: 36px;
        transition: all 0.3s ease-in-out;
    }

    footer {
        font-size: 10px;
        transition: all 0.3s ease-in-out;
    }


}

@media screen and (max-width: 600px) {
    li {
        font-size: 12px;
        transition: all 0.3s ease-in-out;
    }

    section nav {
        font-size: 14px;
        line-height: 26px;
        transition: all 0.3s ease-in-out;
    }

    section .mybutton {
        font-size: 12px;
        transition: all 0.3s ease-in-out;
    }

    section .mybutton:hover {
        background: white;
        font-size: 14px;
        margin-top: 29px;
        transition: all 0.3s ease-in-out;
    }
}

div.gallery {
    margin-left: 5%;
    border: 1px solid #000000;
    float: left;
    width: 450px;
    transition: all 0.3s ease-in-out;
}

div.gallery:hover {
    border: 1px solid #777;
    transition: all 0.3s ease-in-out;
}

div.gallery img {
    width: 100%;
    height: auto;
    transition: all 0.3s ease-in-out;
}

div.desc {
    padding: 15px;
    text-align: center;
    color: #151D21;
    transition: all 0.3s ease-in-out;
}

/*comic grid related */
.comadder {
    width: 230px;
    margin-left: auto;
    margin-right: auto;
}

.comic-item {
    max-width: 200px;

}



.comgridALL {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px;
    padding: 15px;
    position: relative;

    height: calc(100vh - 70px);
    top: 80px;

    background-color: #ffffff13;
    border: 1px solid #3a2c5a41;
    border-radius: 4rem;
    transition: all 0.3s ease-in-out;
    overflow-y: auto;
    /* Add vertical scrollbar if content overflows */
    scrollbar-width: thin;
    /* Width of the scrollbar */
    scrollbar-color: transparent transparent;
    /* Make scrollbar transparent */
}

.comgrid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 2fr);
    overflow-x: auto;
    width: 100%;

    gap: 20px;
    padding: 20px;
    position: relative;
    /* Changed from absolute */

    /* left: 50px; Removed */
    background-color: #ffffff13;
    border: 1px solid #3a2c5a41;
    border-radius: 4rem;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.main-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 70fr) minmax(0, 30fr);
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 2rem;
    box-sizing: border-box;
}

.comic-column {
    position: relative;
    min-width: 0;
    width: 100% !important;
    padding: 0 !important;
    top: 0 !important;
}

.right-sidebar {
    position: relative;
    min-width: 0;
    width: 100% !important;
    top: 0 !important;
    overflow-x: hidden;
}

@media (max-width: 1200px) {
    .main-content-layout {
        grid-template-columns: 1fr;
        padding: 10px 1rem;
    }
}

.comic-column2 {
    position: relative;
    /* Changed from absolute */
    width: 100%;
    /* Full width of sidebar */
    /* top: 0%; Removed */
    /* right: 1%; Removed */
}

.comgrid-trending-container {
    position: relative;
    width: 100%;
}

.comgrid-trending-wrapper {
    position: relative;
    width: 100%;
    min-height: 10px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    /* Clips comic images to rounded borders */
}

.comgrid-trending {
    position: relative;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 20px;
    gap: 20px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.comgrid-trending::-webkit-scrollbar {
    display: none;
}



.comgrid-trending>* {
    flex: 0 0 auto;
    /* max-width: 90%; Removed */
    /* min-width: 350px; Removed to respect card width */
    scroll-snap-align: center;
    /* Center the card */
    /* margin-right: 30px; Removed in favor of gap */
}

/* Scroll buttons for left/right */
.comgrid-trending-scroll-btn {
    position: absolute;
    top: 50%;
    /* Fixed from 180% */
    transform: translateY(-50%);
    z-index: 10;

    border: none;
    border-radius: 1em;
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 2rem;

    outline: none;
    overflow: visible !important;
}

.comgrid-trending-scroll-btn:hover {

    border-radius: 0.5em;
}

.comgrid-trending-scroll-btn.left {
    left: 2px;
    /* Half the button width (48px/2 = 24px, adjusted to -12px for overlap) */
}

.comgrid-trending-scroll-btn.right {
    right: 2px;
    /* Half the button width for border overlap */
}

/* Hide scroll buttons on small screens */
@media (max-width: 600px) {
    .comgrid-trending-scroll-btn {
        display: none;
    }
}

.header2 {
    position: relative;
    text-align: left;
    padding: 20px 0 10px 0;
    padding-left: 60px;
    font-size: 24px;
    font-weight: bold;
    color: black;
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
}

.header3 {
    position: relative;
    text-align: left;
    padding: 10px 0;
    padding-left: 60px;
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    color: black;
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
}



.comgrid:hover,
.comgrid2:hover,
.comgrid3:hover,
.comgridALL:hover,
.comgridADS:hover {
    border: 1.3px solid #34294d52;
    /* Adjust border size and color as needed */
    border-radius: 2px;
    scrollbar-color: #0000001f #ffffff5b;
}

.comgrid::-webkit-scrollbar,
.comgrid2::-webkit-scrollbar,
.comgrid3::-webkit-scrollbar,
.comgridALL::-webkit-scrollbar {
    width: 12px;
    /* Width of the scrollbar */
    height: 10px;
}

.comgrid::-webkit-scrollbar-thumb,
.comgrid2::-webkit-scrollbar-thumb,
.comgrid3::-webkit-scrollbar-thumb,
.comgridALL::-webkit-scrollbar-thumb {
    background-color: #a0baff1a;
    /* Color of the thumb */
    border-radius: 6px;
    /* Rounded corners for the thumb */
}

.comgrid::-webkit-scrollbar-track,
.comgrid2::-webkit-scrollbar-track,
.comgrid3::-webkit-scrollbar-track {
    background-color: #6446e960;
    /* Color of the track */
}

.comgrid2 {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 2fr);
    overflow-x: auto;
    width: 100%;
    gap: 20px;
    padding: 20px;
    position: relative;
    /* Changed from absolute */

    /* left: 50px; Removed */
    background-color: #ffffff13;
    border: 1px solid #3a2c5a41;
    /* Added thin black border */
    border-radius: 4rem;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.comgrid3 {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 2fr);
    overflow-x: auto;
    width: 100%;
    gap: 20px;
    padding: 20px;
    position: relative;
    /* Changed from absolute */

    /* left: 50px; Removed */
    background-color: #ffffff13;
    border: 1px solid #3a2c5a41;
    /* Added thin black border */
    border-radius: 4rem;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

/* Reset Internal Positions */
.comic-column2 {
    position: relative;
    /* Fixed duplicate */
    width: 100%;
    /* top: 0%; Removed */
    /* right: 1%; Removed */
}



.CompletedComics {
    position: relative;
    /* Changed from absolute */
    /* top: 900px; Removed */
    width: 100%;
    margin-top: 10px;
    /* Add spacing between sections */
}




.friendscomics {
    position: relative;
    /* Changed from absolute */
    /* top: 1480px; Removed */
    width: 100%;
    margin-top: 25px;
    /* Add spacing */
}

.comimage {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1.1px solid #00000080;
    transition: all 0.3s ease-in-out;

}

.comimage:hover,
.comimage2:hover {
    border: 1.6px solid #dd2323;
    /* Adjust border size and color as needed */
    border-radius: 2px;
}

.comimage2 {
    width: 100%;
    height: 250.5px;
    margin: auto;
    justify-content: center;

    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1.1px solid #00000080;
    transition: all 0.3s ease-in-out;

}


.comtitle {
    margin-top: 10px;
    font-weight: bold;
    color: black;
    transition: all 0.3s ease-in-out;
}

.comartist {
    margin-top: 5px;
    color: black;
    transition: all 0.3s ease-in-out;
}

.headerallcbutton {
    position: absolute;
    top: 200px;
    left: 50px;
    text-align: center;
    padding: 20px;

    font-size: 24px;
    font-weight: bold;
    color: black;
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
}

.filter-dropdown {
    position: absolute;
    top: 10px;
    left: 400px;
    text-align: center;
    padding: 20px;

    font-size: 24px;
    font-weight: bold;
    color: rgb(255, 255, 255);
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
}

#promoted {
    position: absolute;
    top: 30%;
    width: 29%;
    right: 3%;
}

.comgridADS {
    display: grid;
    grid-auto-flow: column;
    overflow-x: auto;
    width: 100%;
    gap: 20px;
    padding: 20px;
    position: absolute;

    /*left: 1370px;*/
    /* right: 50px; */
    background-color: #ffffff13;
    border: 1px solid #3a2c5a41;
    border-radius: 4rem;
    margin-top: 10px;
    transition: all 0.3s ease-in-out;
    scrollbar-width: thin;
    /* Width of the scrollbar */
    scrollbar-color: transparent transparent;
    /* Make scrollbar transparent */
    height: 1610px;
}


.header5 {
    position: relative;
    text-align: left;
    padding: 10px 0;
    margin-top: 20px;
    padding-left: 60px;
    font-size: 24px;
    font-weight: bold;
    color: black;
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
}

.headerMENU {
    position: absolute;
    top: 500px;
    right: 30px;
    text-align: center;
    padding: 6px;
    border: #555 solid 1px;
    border-radius: 0.5rem;
    font-size: 24px;
    font-weight: bold;
    color: black;
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
}

.content {
    flex: 1;
}




@keyframes background-slide {
    0% {
        background-position: 0% 0;
    }

    50% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0% 0;
    }
}

.top-users-section {
    position: relative;
    /* Changed from absolute */
    /* top: 380px; Removed */
    /* right: 50px; Removed */
    width: 100%;
    /* Fit to sidebar */
    background: url('../images/background/top-users-section.png') no-repeat center center;
    background-color: rgba(255, 255, 255, 0.904);
    background-blend-mode: overlay;
    animation: background-slide 20s linear infinite;
    border: 1px solid rgba(169, 133, 252, 0.25);
    border-radius: 20px;
    padding: 1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    z-index: 1;
    /* Changed from -1 to be visible on top */
    font-family: 'Manrope', sans-serif;
    margin-top: 50px;
}

.header4 {
    position: relative;
    text-align: left;
    padding: 10px 0;
    width: 100%;
    font-size: 24px;
    font-weight: bold;
    color: black;
    font-family: 'Manrope';
    transition: all 0.3s ease-in-out;
    margin-bottom: 10px;
}

.top-users-section h2 {
    margin-bottom: 0.5em;
    font-weight: 600;
    /* Define font weight for headers */
    color: #333;
    /* Improved contrast for better readability */
}

.top-users-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-users-section li {
    padding: 0.5em 0;
    border-bottom: 1px solid #e5e5e5;
    /* Lighter border color for subtle separation */
    font-size: 0.9em;
    color: #555;
    /* Darken the font color for better readability */
}

.top-users-section li:last-child {
    border-bottom: none;
}

.top-users-section .font-semibold {
    font-weight: 600;
    /* Ensure the font weight is consistent with the class name */
    color: #333;
}


.top-users-section .text-pink-500 {
    color: #d63384;
}



.logout-link {
    position: absolute;
    top: 0;
    right: 0;
    margin-right: 7px;
}

.adDash-link {
    position: absolute;
    top: 60px;
    right: 0;
    margin-right: 7px;
}

.logout-link img {
    vertical-align: middle;
    width: 49px;
    height: 51px;
    opacity: 85%;
}


#modal {
    position: fixed;
    /* Make the modal fixed to stay in place even when scrolling */
    top: 50%;
    /* Position halfway down the viewport */
    left: 50%;
    /* Position halfway across the viewport */
    transform: translate(-50%, -50%);
    /* Adjust the position to truly center the modal */
    z-index: 1000;
    /* Ensure the modal sits above other content */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    backdrop-filter: blur(2px);
}

.modal-overlay.hidden {
    display: none;
}

.dropbtn {
    background-color: #ffffff;
    color: #000000;
    padding: 16px;
    font-size: 16px;
    border: none;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 51;
    /* Higher than topnav */
    opacity: 0;
    /* Initialize opacity for animation */
    transition: opacity 1ss ease, visibility 1s;
    /* Smooth transition for opacity and visibility */
    visibility: hidden;
    /* Use visibility to hide the dropdown content */
}

.dropdown-content a {
    color: #000000;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #ffffff;
    color: #000000;
    display: block;
    opacity: 1;
    /* Set opacity to 1 to fully show the dropdown */
    visibility: visible;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    /* Set opacity to 1 to fully show the dropdown */
    visibility: visible;
    /* Make the dropdown content visible */
}

.dropdown:hover .dropbtn {
    background-color: #fff;
}



#profilepic {
    width: 60px;
    /* Increased size */
    height: 60px;
    /* Increased size */
    border-radius: 50%;
    border: 2px solid black;
    /* Made border thicker */
}

.artist-description {
    font-size: 1.25rem;
    /* Increased font size */
    margin-top: 20px;
    /* Increased top margin */
    text-align: center;
    color: #4B5563;
    /* Tailwind gray-600 hex value */
    line-height: 1.6;
    /* Improved line height for better readability */
}

.artist-profile {
    display: inline-block;
    vertical-align: top;
    margin-right: 10px;
}

.artist-profile .profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid black;
    margin-right: 5px;
}

/*Home button at the bottom right */
.create-link {
    position: fixed;
    bottom: 0px;
    right: 0px;
    display: block;
    z-index: 50;
}

.create-link a {
    display: block;
    position: fixed;
    width: 160px;
    height: 80px;
    bottom: 1px;
    right: 5px;
    transition: transform 0.3s ease-in-out;
    z-index: 999;
}

.create-link a:hover {
    transform: scale(1.1);
}

.create-link a img {
    pointer-events: none;
    transition: transform 0.3s ease-in-out;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.create-link a img:hover {
    transform: scale(1.1);
}

.filter-dropdown {
    position: fixed;
    right: 100px;
    font-size: 100%;
    /* Decreased font size for all child elements */
    width: auto;
    /* Adjusted width to fit content */
}

#filterButton {
    position: fixed;
    top: 35px;
    right: 600px;
    color: black;
    background: none;
    border: 0px solid black;
    border-radius: 3em;
    /* Decreased border radius */
    padding: 8px;
    /* Decreased padding */
    cursor: pointer;
    width: auto;
}

.filter-content {
    display: none;
    /* Hide by default, will be shown on hover */
    flex-direction: row;
    /* Layout items in a row */
    position: fixed;
    top: 35px;
    /* Align with the filter button vertically */
    right: 530px;
    /* Adjust the position to be next to the button */
    background-color: #f9f9f9;
    min-width: 140px;
    box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.filter-option {
    color: black;
    padding: 10px 14px;
    /* Decreased padding */
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.filter-option:hover {
    background-color: #f1f1f1;
}

/* Slider Arrows */
.slider-arrow {
    transition: all 0.3s ease;
    opacity: 1;
    border: 1px solid #e5e7eb !important;
}

.slider-arrow:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1) !important;
    background-color: #ffc7c7 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.slider-arrow i {
    color: #374151;
    font-size: 16px;
}

#sortButton {
    position: fixed;
    top: 35px;
    right: 400px;
    color: black;
    background: none;
    border: 0px solid black;
    border-radius: 3em;
    /* Decreased border radius */
    padding: 8px;
    /* Decreased padding */
    cursor: pointer;
    width: auto;
}

.sort-dropdown {
    position: fixed;
    right: 50px;
    font-size: 100%;
    /* Decreased font size for all child elements */
    width: auto;
    /* Adjusted width to fit content */
}

.sort-content {
    display: none;
    /* Hide by default, will be shown on hover */
    flex-direction: row;
    /* Layout items in a row */
    position: fixed;
    top: 35px;
    /* Align with the filter button vertically */
    right: 290px;
    /* Adjust the position to be next to the button */
    background-color: #f9f9f9;
    min-width: 140px;
    box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.sort-option {
    color: black;
    padding: 10px 14px;
    /* Decreased padding */
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.sort-option:hover {
    background-color: #f1f1f1;
}

.search {
    position: absolute;
    top: 16px;
    right: 950px;
    margin: 20px;
}

#searchInput {
    padding: 10px;
    color: black;
    margin-right: 1px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 40px;
    width: 400px;
}

#searchButton {
    padding: 8px 16px;
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#searchButton:hover {
    background-color: rgb(219, 219, 219);
    color: black;

}

.search2 {
    position: absolute;
    top: 16px;
    right: 950px;
    margin: 20px;
}

#searchInput2 {
    padding: 10px;
    color: black;
    margin-right: 1px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 40px;
    width: 400px;
    top: -8px;
    right: 40px;
    position: relative;
}

#searchButton2 {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#searchButton2:hover {
    background-color: rgb(219, 219, 219);
    color: black;

}

#topUsers {
    position: relative;
    top: 20%;
    right: 100px;
}

#notification_badge {
    background-color: #fa3e3e;
    border-radius: 50%;
    color: white;
    height: 18px;
    width: 19px;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 80%;
    right: -9.5%;
}

.category-selector {
    display: inline-flex;
    justify-content: center;

    position: absolute;

    right: 50%;
    left: 50%;
    top: 35%;
}

.category-btn {

    font-family: 'Manrope';
    background-color: #f0f0f0;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.1s;
    border-radius: 20px;
    font-weight: bold;
}

.category-btn.active {

    background-color: #313131;
    color: rgb(233, 233, 233);
}

.category-btn:hover:not(.active) {
    background-color: #ddd;
    color: rgb(0, 0, 0);

}

#usercontributionGRID {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px;
    padding: 15px;
    position: relative;

    height: calc(100vh - 135px);
    /* Adjust the height to fill the screen, minus the top offset and padding */
    top: 95px;

    background-color: #ffffff13;
    border: 1px solid #3a2c5a41;
    border-radius: 2rem;
    transition: all 0.3s ease-in-out;
    overflow-y: auto;
    /* Add vertical scrollbar if content overflows */
    scrollbar-width: thin;
    /* Width of the scrollbar */
    scrollbar-color: transparent transparent;
    /* Make scrollbar transparent */
}

/* Trending Comics Modern Card Design */
.trending-card {
    background: transparent;
    border-radius: 2px;
    box-shadow: none;
    overflow: visible;
    transition: transform 0.3s ease;
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Spacer to center first trending comic */
.trending-spacer {
    width: calc(50% - 200px);
    flex-shrink: 0;
}

.trending-card:hover {
    transform: translateY(-5px);
}

.trending-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f0f0f0;
    border: 1.1px solid rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.trending-card:hover .trending-card-image-wrapper {
    border: 1.6px solid #dd2323;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.trending-card-img {
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trending-card:hover .trending-card-img {
    transform: scale(1.05);
}

.trending-card-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    align-items: center;
    background: transparent;
}

.trending-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    width: 100%;
}

.trending-card-artist {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #555;
}

.trending-artist-pfp {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.trending-card-artist a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.trending-card-artist a:hover {
    color: #000;
    text-decoration: underline;
}

.trending-contribs {
    position: relative;
    display: flex;
    align-items: center;
}

.trending-contrib-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
}

.trending-contrib-btn:hover {
    color: #333;
}

.trending-contrib-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.596);
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    min-width: 150px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.trending-likes {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 50;
    /* Ensure clickability */
    position: relative;
    cursor: pointer;

    /* Push to right */
}

.trending-likes {
    margin-top: auto;
    font-size: 0.9rem;
    color: #ff4081;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Update Trending Scroll Buttons */
.comgrid-trending-scroll-btn {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.799);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #333;
}

.comgrid-trending-scroll-btn:hover {
    background: #fefefe39;
    transform: translateY(-50%) scale(1.06);
}

/* ========================================
   MOBILE OPTIMIZATION - RESPONSIVE DESIGN
   ======================================== */

/* Tablets and Small Laptops (768px - 1024px) */
@media (max-width: 1024px) {
    body {
        margin: 0;
        padding: 0;
    }

    /* Navigation adjustments */
    .topnav {
        margin: 20px 0 0 0;
        font-size: 24px;
    }

    header .logo a {
        left: 20px;
        background-size: 100px;
        width: 160px;
    }

    li {
        font-size: 24px;
        padding-right: 4%;
    }

    /* Comic grids */
    .comgrid,
    .comgrid2,
    .comgrid3 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px;
    }

    .trending-card {
        width: 280px;
    }

    /* Create button */
    .create-link-wrapper img {
        width: 150px;
    }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
        min-height: 100vh;
    }

    /* Hide or adjust navigation */
    .topnav {
        flex-wrap: wrap;
        justify-content: center;
        margin: 10px 0;
        font-size: 18px;
        text-align: center;
    }

    header .logo a {
        left: 50%;
        transform: translateX(-50%);
        background-size: 80px;
        width: 120px;
        height: 60px;
        top: 0;
    }

    li {
        font-size: 18px;
        padding-right: 3%;
        margin: 5px 0;
    }

    li:first-child {
        float: none;
        width: 100%;
        text-align: center;
    }

    /* Search adjustments */
    #searchInput2 {
        max-width: 200px !important;
    }

    #searchResults {
        left: 50% !important;
        transform: translateX(-50%);
        width: 90% !important;
        max-width: 300px;
    }

    /* Comic sections */
    .comic-column,
    #comic-column {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        padding: 10px;
        display: block !important;
    }

    .comic-column2,
    #comic-column2 {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        padding: 10px;
        margin-top: 30px;
        display: block !important;
    }

    .NewComics,
    .CompletedComics,
    .friendscomics,
    .TrendingComics {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        margin-bottom: 30px;
    }

    .header2,
    .header3,
    .header5 {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        font-size: 1.5rem;
        padding: 10px;
        text-align: center;
    }

    /* Comic grids - single column on mobile */
    .comgrid,
    .comgrid2,
    .comgrid3 {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        grid-template-columns: 1fr;
        grid-auto-flow: row !important;
        gap: 20px;
        padding: 10px;
        justify-items: center;
        width: 100% !important;
        overflow-x: hidden;
    }

    .comic-item {
        max-width: 100%;
        width: 100%;
    }

    .comimage,
    .comimage2 {
        width: 100%;
        height: auto;
        max-width: 400px;
    }

    /* Trending section - HIDE on mobile (swipe to reveal) */
    div.comic-column2,
    div#comic-column2,
    [id="comic-column2"] {
        position: fixed !important;
        top: 0 !important;
        left: 100% !important;
        width: 100% !important;
        height: 100vh !important;
        background: white !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        transition: left 0.3s ease-in-out !important;
        padding: 60px 10px 10px 10px !important;
    }

    /* When active class is added via swipe */
    div.comic-column2.active,
    div#comic-column2.active {
        left: 0 !important;
    }

    div.TrendingComics,
    .comic-column2 .TrendingComics {
        position: relative !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }


    /* Trending section mobile */
    div.comgrid-trending-wrapper,
    .TrendingComics .comgrid-trending-wrapper {
        position: relative !important;
        top: auto !important;
        padding: 10px 0;
        min-height: auto !important;
        margin-top: 20px;
    }

    .comgrid-trending {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 10px;
        overflow-x: visible;
        overflow-y: auto;
        border: none;
        background: transparent;
        width: 100%;
    }

    .trending-card {
        width: 90%;
        max-width: 350px;
    }

    /* Hide scroll buttons on mobile */
    .comgrid-trending-scroll-btn {
        display: none !important;
    }

    /* Ensure proper stacking order */
    .comic-column {
        position: relative;
        z-index: 1;
    }

    .comic-column2 {
        position: relative;
        z-index: 1;
        margin-top: 30px;
    }

    /* Create button mobile */
    .create-link-wrapper {
        bottom: 15px;
        right: 15px;
    }

    .create-link-wrapper img {
        width: 120px;
    }

    /* Modal mobile optimization */
    #modal {
        zoom: 50%;
        padding: 10px !important;
        max-width: 100%;
    }

    .modal-overlay {
        padding: 10px;
    }

    /* Welcome message */
    #welcomeMessage {
        left: 50% !important;
        transform: translateX(-50%);
        top: 10% !important;
        font-size: 0.8em !important;
        text-align: center;
        width: 80%;

    }

    /* Filter and sort buttons */
    .filter-dropdown,
    .sort-dropdown {
        font-size: 14px;
    }

    #filterButton,
    #sortButton {
        padding: 6px;
        font-size: 14px;
    }

    /* Profile Page Mobile Optimization */
    .update-profile-header {
        margin-left: 20px !important;
        margin-top: 60px !important;
        font-size: 1.3rem !important;
        text-align: center !important;
    }

    .headerallcbutton {
        top: 10px !important;
        right: 10px !important;
        font-size: 14px !important;
        padding: 8px 15px !important;
    }

    .container.rounded {
        padding: 10px !important;
    }

    .row {
        flex-direction: column !important;
    }

    .col-md-3,
    .col-md-5,
    .col-md-4 {
        width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        margin-bottom: 20px;
    }

    .rounded-circle {
        height: 120px !important;
        width: 120px !important;
    }

    .rounded-circle:hover {
        height: 140px !important;
        width: 140px !important;
    }

    .profile-button {
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        margin: 10px auto !important;
        display: block !important;
        width: 80% !important;
    }

    .comic-container {
        width: calc(50% - 1rem) !important;
    }

    .stat-value {
        font-size: 1.2rem !important;
    }

    #comicStatsSection {
        width: 100% !important;
    }

    /* View Comics Screen Mobile Optimization */
    #comicsScreen {
        z-index: 2000 !important;
        overflow-y: auto !important;
    }

    .filter-dropdown,
    .sort-dropdown {
        position: fixed !important;
        top: 50px !important;
        font-size: 11px !important;
        padding: 2px !important;
        z-index: 2001 !important;
    }

    .filter-dropdown {
        left: 10px !important;
        right: auto !important;
    }

    .sort-dropdown {
        left: 110px !important;
        right: auto !important;
    }

    #filterButton,
    #sortButton {
        font-size: 10px !important;
        padding: 6px 10px !important;
        background: white !important;
        border: 1px solid #333 !important;
        border-radius: 5px !important;
        color: black !important;
    }

    .filter-content,
    .sort-content {
        position: fixed !important;
        top: 85px !important;
        min-width: 90px !important;
        background: white !important;
        border: 1px solid #333 !important;
        border-radius: 5px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        padding: 5px !important;
    }

    .filter-content {
        left: 10px !important;
    }

    .sort-content {
        left: 110px !important;
    }

    .search {
        position: fixed !important;
        top: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        margin: 0 !important;
    }

    .search input {
        width: 150px !important;
        font-size: 12px !important;
        padding: 6px !important;
    }

    .search button {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }

    .comgridALL {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 10px !important;
        margin: 10px !important;
        padding: 10px !important;
        top: 90px !important;
        height: calc(100vh - 100px) !important;
        border-radius: 1rem !important;
    }

    .headerallcbutton {
        top: 10px !important;
        right: 10px !important;
        width: 60px !important;
        font-size: 12px !important;
        padding: 6px !important;
    }
}

/* Right Sidebar Wrapper */
.right-sidebar {
    position: relative;
    width: 30%;
    display: flex;
    flex-direction: column;
}

.comic-column2 {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
}

/* Top Users Section Container */
.top-users-section {
    position: relative !important;
    width: 100% !important;
    padding: 20px 0;
}

/* Top Users Section - Glassmorphism Style */
.comgrid-top-users {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 30px 60px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.comgrid-top-users::-webkit-scrollbar {
    display: none;
}

.top-users-spacer {
    width: calc(50% - 160px);
    flex-shrink: 0;
}

.top-user-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 320px;
    flex-shrink: 0;
    position: relative;
}

.top-user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.top-user-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.top-user-card:hover::before {
    opacity: 1;
}

.top-user-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.top-user-avatar-wrapper {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.3) 0%,
            rgba(118, 75, 162, 0.3) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.top-user-avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(10%, 10%);
    }
}

.top-user-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.4s ease;
}

.top-user-card:hover .top-user-avatar {
    transform: scale(1.05);
}

.top-user-info {
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.top-user-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.top-user-bio {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 16px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.top-user-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.top-user-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #1a1a1a;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.top-user-stat:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.top-user-stat i {
    color: #667eea;
    font-size: 1rem;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

/* Top Users Scroll Buttons - Glass Style */
.top-users-scroll-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.top-users-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: all;
    z-index: 10;
}

.top-users-scroll-btn:hover {
    background: rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.top-users-scroll-btn.left {
    left: 10px;
}

.top-users-scroll-btn.right {
    right: 10px;
}

.top-users-scroll-btn i {
    font-size: 1.3rem;
    color: #333;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5));
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comgrid-top-users {
        padding: 20px 10px;
        gap: 16px;
    }

    .top-user-card {
        width: 280px;
    }

    .top-users-spacer {
        width: calc(50% - 140px);
    }

    .top-users-scroll-btn {
        display: none;
    }
}



/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .topnav {
        font-size: 14px;
    }

    li {
        font-size: 14px;
        padding-right: 2%;
    }

    header .logo a {
        background-size: 60px;
        width: 100px;
        height: 50px;
    }

    .header2,
    .header3,
    .header5 {
        font-size: 1.2rem;
    }

    .trending-card {
        width: 100%;
        max-width: 300px;
    }

    .trending-card-title {
        font-size: 0.95rem;
    }

    .trending-card-artist {
        font-size: 0.85rem;
    }

    .create-link-wrapper img {
        width: 80px;
    }

    #modal {
        zoom: 40%;
    }

    /* Stack modal buttons vertically */
    #modal .space-x-4 {
        flex-direction: column !important;
        gap: 10px;
    }

    #modal button {
        width: 100% !important;
        margin: 5px 0 !important;
    }
}

/* Landscape orientation fixes */
@media (max-height: 600px) and (orientation: landscape) {
    .topnav {
        margin: 5px 0;
    }

    header .logo a {
        height: 40px;
    }

    .create-link-wrapper {
        bottom: 10px;
        right: 10px;
    }

    .create-link-wrapper img {
        width: 60px;
    }
}

/* Fix for Right Sidebar Children Layout - Reset Absolute Positioning */
.right-sidebar .header4 {
    position: relative !important;

    padding: 10px 0 !important;
}

.right-sidebar .comgrid-trending-wrapper {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: auto !important;
    margin-bottom: 20px !important;
}

.right-sidebar .comgrid-trending {
    position: relative !important;
    width: 100% !important;
    padding: 15px !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    gap: 15px !important;
    overflow-x: auto !important;
}

/* Ensure Top Users Section resets */
.top-users-section {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    margin-top: 0 !important;
    padding: 20px 0;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Leaderboard Styling */
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.rank-badge i {
    font-size: 0.8rem;
}

/* Rank Specific Styles */
.top-user-card.rank-1 {
    border: 2px solid #FFD700 !important;
    /* Gold */
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    transform: scale(1.02);
    z-index: 2;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    color: #5c4d00;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.top-user-card.rank-2 {
    border: 2px solid #e0e0e0 !important;
    /* Silver */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #ffffff 0%, #b4b4b4 100%);
    color: #444;
}

.top-user-card.rank-3 {
    border: 2px solid #CD7F32 !important;
    /* Bronze */
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #faa463 0%, #8B4513 100%);
    color: #fff;
}

/* Base Card Enhancement */
.top-user-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Default border */
}

/* Mobile Responsive Fix for Right Sidebar */
@media (max-width: 768px) {
    .right-sidebar {
        position: static !important;
        width: 100% !important;
        top: auto !important;
        right: auto !important;
        display: block !important;
        padding-bottom: 20px;
    }

    /* Ensure Top Users flows correctly on mobile */
    .top-users-section {
        margin-top: 40px !important;
        padding-bottom: 80px;
    }
}

/* Global Scale Adjustment for Desktop */
@media (min-width: 1024px) {
    body {
        zoom: 0.75;
        /* Increase zoom out for smaller desktops to fit content */
    }

    /* Desktop-only Animations */
    .topnav li {
        animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    }

    .topnav li:nth-child(1) {
        animation-delay: 0.1s;
    }

    .topnav li:nth-child(2) {
        animation-delay: 0.2s;
    }

    .topnav li:nth-child(3) {
        animation-delay: 0.3s;
    }

    .topnav li:nth-child(4) {
        animation-delay: 0.4s;
    }

    .topnav li:nth-child(5) {
        animation-delay: 0.5s;
    }

    .topnav li:nth-child(6) {
        animation-delay: 0.6s;
    }

    .topnav li:nth-child(7) {
        animation-delay: 0.7s;
    }

    section header {
        animation: fadeInLeft 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        animation-delay: 0.3s;
    }

    .home,
    .games {
        animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        animation-delay: 0.5s;
    }

    div.gallery {
        animation: fadeInRight 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        animation-delay: 0.6s;
    }

    .comgrid,
    .comgrid2,
    .comgrid3,
    .comgridALL {
        animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        animation-delay: 0.8s;
    }

    .right-sidebar {
        animation: fadeInRight 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
        animation-delay: 1s;
    }
}

@media (min-width: 724px) {
    body {
        zoom: 0.55;
        /* Increase zoom out for smaller desktops to fit content */
    }
}

@media (min-width: 1367px) {
    body {
        zoom: 0.85;
        /* Standard zoom for larger screens */
    }
}

/* Notification Page Styles */
.notification-container {
    max-width: 800px;
    margin: 100px auto;
    padding: 20px;
}

.notification-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.notification-card.unread {
    background: rgba(255, 255, 255, 0.9);
    border-left: 5px solid #6C63FF;
}

.notification-card.read {
    opacity: 0.85;
}

.notification-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-40px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Welcome Toast Message */
.welcome-toast {
    position: fixed;
    top: 5%;
    /* Aligned with content top */
    left: 17%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2d3436;
    z-index: -1;
    opacity: 0;
    transform: translateX(-20px);
    animation: welcomeSlideIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    pointer-events: none;
    /* Let clicks pass through */
}

@keyframes welcomeSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-toast.fade-out {
    animation: welcomeFadeOut 0.5s ease forwards;
}

@keyframes welcomeFadeOut {
    to {
        opacity: 0;
        transform: translateX(-10px);
    }
}

@media (max-width: 768px) {
    .welcome-toast {
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    @keyframes welcomeSlideIn {
        to {
            opacity: 1;
            transform: translateX(-50%);
        }
    }
}




.notif-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.notif-icon.follow {
    background: linear-gradient(135deg, #6C63FF, #4834d4);
}

.notif-icon.like {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
}

.notif-icon.comment {
    background: linear-gradient(135deg, #2ed573, #7bed9f);
}

.notif-icon.post {
    background: linear-gradient(135deg, #ffa502, #ffc048);
}

.notif-content {
    flex-grow: 1;
    font-size: 1rem;
    color: #2d3436;
}

.notif-content a {
    font-weight: bold;
    color: #6C63FF;
    text-decoration: none;
}

.notif-content a:hover {
    text-decoration: underline;
}

.notif-time {
    font-size: 0.8rem;
    color: #636e72;
    margin-top: 5px;
    display: block;
}

.notification-header {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: #2d3436;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

/* Pagination & Grid Styles for New Section */
.comgrid.new-section-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, 1fr);
    /* 5 columns for desktop */
    min-height: 400px;
    /* Ensure space for 2 rows */
    overflow-x: hidden;
    gap: 10px;
    /* Reduced gap between columns and rows */
}

.new-section-grid .comic-item {
    margin-top: 10px;
    /* Reduced from 80px to decrease vertical gap */
    max-width: 213px;
    /* Increased from 200px to fill more horizontal space */
}



.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
    width: 100%;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #3a2c5a41;
    color: #313131;
    font-weight: bold;
    font-family: 'Manrope';
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.pagination-link:hover {
    background-color: #f0f0f0;
    border-color: #313131;
    transform: translateY(-2px);
}

.pagination-link.active {
    background-color: #313131;
    color: #ffffff;
    border-color: #313131;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #ffffff;
    border: 1px solid #3a2c5a41;
    color: #313131;
    font-weight: bold;
    font-family: 'Manrope';
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #313131;
    color: #ffffff;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}