body {
    position: relative;
    margin: 0;
    background: #2f2f2f;
    padding: 10px 0;
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
    z-index: 0;
    overflow: hidden;
}

.footer {
    margin: 0;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
}


img {
    max-width: 100%;
}

/* make it so shadi stands on the footer at al screen sizes*/
.shadi {
    position: fixed;
    right: 50px;
    bottom: 0px;
    transform: translateX(-50%);
    display: flex;
    justify-content: left;
    margin-bottom: 20px;
}

.shadi img {
    width: 200px;
    height: 100%;
    display: block;
}
.leftbar {
    display: flex;
    flex-direction: column;
    max-width:220px;
    position: absolute;
    gap: 15px;
    left: 15px;
    top: 115px;
    width: 220;
    padding:15px;
    border: 2px solid #333;
    background-color: rgb(76, 154, 250);
    border-radius: 0px;
    box-shadow:0 4px 10px rgba(15,15,15,0.7); 
    z-index: 100;
}

.updates {
    max-width:220px;
    position: absolute;
    gap: 15px;
    left: 15px;
    top: 125px;
    width: 100%;
    padding:15px;
    border: 2px solid #302d4e;
    background-color: rgb(202, 231, 255);
    box-shadow:0 4px 10px rgba(15,15,15,0.7); 
    border-radius: 8px;
}

.container {
    display: flex;
    gap: 20px;
}
@media (max-width:832px){
    #reset {
        width: 50px;
        height: 50px;
    }
    .shadi {
        display: none;
    }

    .thumb-contianer:last-child{
        margin-bottom: 20px;
    }



}

@media (max-width:1432px) {
    


    .shadi {
        display: none;
    }
    h4 {
    margin: 0 0 10px 0;
    text-align: center;
    }   

    .thumb-contianer:last-child{
        margin-bottom: 20px;
    }

    .recent-container {
    display: grid;
    justify-content: center;
    gap: 50px;
    align-items: center;
    padding-top: 150px;
    max-width: 400px;
    margin: -24px auto 0 auto;
    }

    .thumb-contianer{
        margin: 0 fixed;
    }

    .container {
        flex-direction: column;
    }
    .html, body {
        overflow-y: scroll;
    }

    .box {
        height: auto;
    }

    .updates,
    .leftbar {
        position: static;
        width: auto;
        margin:20px 10px;
        max-width: 100%;
        box-shadow:0 4px 10px rgba(15,15,15,0.7); 
    }

}

.box {
    max-width: 800px;
    width: 100%;
    border: none;
    padding: 10px;
    margin: 0 auto;
}


li{
    height: auto;
}

a img {
    width: 50px;
    height: 50px;
    transition: 0.3s;
}

.navbar {
    list-style: none;
    background-color: rgb(3, 0, 45);
    overflow: visible;
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    align-items: center;
    gap: 30px;
    justify-content: space-between;
    display: flex;
    padding: 1rem;
    box-sizing: border-box;
}

.navbar li{
    position: relative;
}

.navbar a {
    color: #00ffff;
    text-decoration: none;
    padding: 10px;
    display: block;
}


.subnavbar {
    height:40px;
    display:flex;
    align-items:center;
    justify-content:left;
    justify-content: space-between;
    padding:0 30%;
    background-color:rgba(40, 0, 68, 0.789);
    box-shadow:0 4px 10px rgba(15,15,15,0.7); 
}


.subnavbar a {
    text-decoration: solid;
    color: aqua;
    transition: all 0.25s ease;
}

.subnavbar a:hover {
    color: white;
    text-shadow: 
    0 0 8px #00ffff,
    0 0 16px #00ffff,
    0 0 32px #00ffff,
    0 0 64px #00ffff; 

}


.navicons {
    max-height: 60px;
    height: 40px;
    width: 135px;
    font-size: 1.5rem;
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.navicons img {
    height: auto;
    width: auto;
}

/* dropdown*/

.dropdown {
    position: relative;
    z-index: 9999
}
.dropdown-menu{
    position:absolute;
    top: 100%;
    left: auto;
    right: 0;
    list-style: none;
    background: rgba(58, 33, 68, 0.483);
    min-width: 175px;
    padding: 0;
    margin: 0;
    transform: translateY(-10px);
    z-index: 9999 !important;
    pointer-events: auto;

    opacity: 0;
    visibility: hidden;

   transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s linear 0.3s;

    /*glass*/
    background: rgba(40, 0, 68, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;

    box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 255, 255, 0.1);

    cursor: pointer;
    overflow: hidden;
    z-index: 9999;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap:10px;
    transform: translateY();

    padding: 12px 16px;
    color: white;
    text-decoration: none;

    transition: 0.2s ease;
    z-index: 9999;
    cursor: pointer;

}

.dropdown-menu a:hover {
    color: #fff;
    text-shadow:
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #00ffff;
}

.dropdown-menu.show{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

    transition:         
        opacity .3s ease,
        transform .3s ease,
        visibility 0s;
}

.dropdown-menu img {
    position: relative;
    width: 30%;
    height: 30%;
    border-radius: 4px;
    max-width: 20px;
    max-height: 20px;
}


/*---------------*/

#toolbar {
    width: 60px;
    height: 60px;
    background: #444;
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 10px;
    color: white;
}


.logo {
    display: block;
    margin: 0 auto;
}

.gallery{
    max-width: 1200px;
    display:grid;
    grid-template-columns: repeat(auto-fill,200px);
    gap: 15px;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
    
}

.thumb-contianer{
    position: relative;
    width:200px;
    height: 200px;
    overflow: hidden;
    border-radius: 10px ;
    box-shadow: 0 8px 15px rgba(0,0,0,0.25);
    margin: 0 auto;
}

.thumb-contianer h4{
    text-align:center;
}

.recent-container {
    display: flex;
    justify-content: center;
    gap: 100px;
    align-items: flex-start;
    padding-top: 150px;
    max-width: 600px;
    margin: -25px auto 0 auto;
}

.thumb{
    display: block;
    border: 3px solid rgb(27, 15, 65);
    width: 200px;
    height: 200px;
    object-fit: cover;
    cursor:pointer;
    border-radius:8px;
    transition:transform .2s ease;
    box-shadow: 0 8px 15px rgba(0,0,0,0.25);
}

.thumb-contianer::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.45),
        rgba(255,255,255,0)
    );
    pointer-events: none;
}




#canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

#pageNumber {
    display: inline;
}

.previous {
    display: inline;
    background-color: #c5bcbc;
    color: black;
    border-radius: 15%;
}

.next {
    display: inline;
    background-color: #b9c7b9;
    color: rgb(0, 0, 0);
    border-radius: 15%;
}



.thumb-container a,
.chapter a {
    display: inline-block;
    width: fit-content;
}

.thumb:hover{
    transform:scale(1.03);
}


/*------comics------*/
.comicViewer{
    position: fixed;
    inset: 0;
    background: rgba(58, 33, 68, 0.75);
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 3px solid red;
    min-height: 300px;
}

#comicReader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.631);
    z-index: 9999;
    overflow: auto;
}

#comicViewer canvas {
    max-width: 95%;
    margin: 10px;
    background: white;
}

#chapterList {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

#pdfCanvas {
    max-width: 100%;
    height: auto;
}

#pdfControls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    position: fixed;
    bottom: 20px;
    left: 20px;
    border: 2px solid rgb(117, 67, 216);
    background-color: rgb(57, 57, 57);
    z-index: 1001;
    border-radius: 10px;
    margin: 0 auto;


}

#pdfControls button {
    background: #ccb3ff78;
    color: rgb(13,0,58);
    border: solid rgb(74, 68, 158);
    border-radius: 5px;
    padding: 3px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

#closeReader {
    position: fixed;
    top: 20px;
    right: 25px;
    font-size: 30px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10000;
}

.chapter {
    background: #aad5ff;
    border-radius: 20px;
    width: 180px;
    cursor: pointer;
    text-align: center;
    color: rgb(40, 40, 40);
}


.chapter img {
    width: 180px;
    height: 250px;
    object-fit: cover;
    border: 3px solid rgb(62, 95, 243);
    border-radius: 8px;
}


.chapter:hover img {
    transform: scale(1.05);
    transition: 0.3s ease;
}
/*------------*/
.toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-width: 55px;
    min-height: 50px;
    background: rgb(9, 170, 194);
    border-radius: 15px;
    padding-left: 10px;
    padding-right: 10px;
}

#close {
    position: absolute;
    top: 20px;
    right: 20px;

    font-size: 30px;
    width: 50px;
    height: 50px;

    border:none;
    border-radius: 50%;
    cursor: pointer;
}

#viewport{
    background: rgba(1, 2, 37, 0.08);
    border-radius: 12px;
    padding: 20px;
    width: 90vw;
    height: 70vh;
    overflow:hidden;
    cursor:grab;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
}

#focusedImage {
    display:block;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    user-select:none;
    -webkit-user-select:none;
    -webkit-user-drag:none;
    pointer-events:auto;
    cursor:grab;
}

.controls,
.navigation{
    display:flex;
    gap:20px;
    margin-top: 15px;
}

button {
    background: none;
    border: none;
    padding:0;
    margin: 0;
    cursor:pointer;
    font-size:18px;
}
.button img{
    display: block;
}

#currentImage{
    pointer-events: auto;
    transition: transform 0.12s ease;
    max-width:100%;
    max-height:100%;
    cursor:grab;
    transform-origin:center center;
    user-select:none;
    -webkit-user-drag:none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    cursor: grab;
}


.hidden {
    display: none !important;
}

#comicViewer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#galleryViewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(58,33,68,.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#galleryViewer:not(.hidden) {
    display: flex;
}



.header-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height:10%;
    margin:auto;
    background: rgba(0,0,0,0.5);
    color:white;
}

.banner {
    position: fixed;
    bottom:0;
    left:0;
    width: 100%;
}

h6{
    color: #00cdcd;
    text-align: center;
}