:root{
    --primary-color:#FF001C;
    --secondary-color:#FF3349;
    --light-secondary-color:rgba(255, 42, 42, 0.541);
    --complementary-color:#FFFFFF;
}
/* Server index page. */
#server-home{
    background: radial-gradient(var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    padding:1rem;
}
#server-home .heading h1{
    text-align: center;
    font-size: 2rem;
    color:var(--complementary-color);
    font-style:oblique;
}
.invert{
    background:var(--primary-color);
    color:var(--complementary-color);
    padding:0 0.2em;
}
.input-search{
    width: 100%;
    display: flex;
    flex-direction: column;
}
.input-search input{
    padding:0.5rem 1rem;
    font-size:1rem;
    outline:none;
    border:1px solid #000;
    border-radius: 5px;
}
.input-search input:focus{
    border:1px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}
.input-search button{
    width: max-content;
    margin-top: 1rem;;
    padding:0.8rem 1.6rem;
    box-sizing: border-box;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    border:2px solid var(--primary-color);
    background:var(--complementary-color);
    color:var(--primary-color);
    cursor: pointer;
}
.input-search button:hover{
    background: var(--primary-color);
    color:var(--complementary-color);
}

/* Create server css */
#server-create{
    min-height: 100vh;
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
}
.container{
    width:70%;
    margin:0 auto;
    display: flex;
    padding:1rem;
    column-gap: 1rem;
    flex-direction: row;
    position: relative;
    box-sizing: border-box;
}
.form{
    width:100%;
    padding:1rem;
    background: var(--complementary-color);
    position: relative;
    margin-top: 1rem;
}
.form h2{
    text-align: center;
    font-size: 2rem;
    margin-bottom:1rem;
    color:var(--primary-color);
}
.input-row input[type="text"],.input-row input[type="password"] {
    width:90%;
    position: relative;
    padding:0.5rem 1rem;
    font-size:1rem;
    outline:none;
    border-radius: 5px;
    border:1px solid #000;
    box-sizing: border-box;
}
.input-row input:focus{
    border:2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}
.input-row button{
    padding:0.6rem 2rem;
    font-size:1rem;
    border-radius: 50px;
    border:2px solid var(--primary-color);
    outline: none;
    cursor: pointer;
    color:var(--primary-color);;
    margin-top:1rem;
}
.input-row button:hover{
    background: var(--primary-color);
    color:var(--complementary-color);
}
.input-row button:focus{
    box-shadow: 0 0 10px var(--primary-color);
}
.input-label{
    margin: 20px 0 -10px 0;
}
hr{
    border:1px solid var(--primary-color);
    margin-bottom:2rem;;
}

/* modal */
.modal{
    position: fixed;
    display: none;
    left:1rem;
    right:1rem;
    top:1rem;
    bottom: 1rem;
    background:var(--complementary-color);
    z-index: 1000;
    border-radius: 1rem;
    border:1px solid var(--primary-color);
    padding:0.8rem 1rem;
    overflow:auto;
}
.modal::-webkit-scrollbar{
    width:10px;
    height: 10px;;
}
.modal::-webkit-scrollbar-thumb{
    border-radius: 10px;
    background: var(--primary-color);
}
.modal::-webkit-scrollbar-track{
    margin:0.8rem;
}
.modal-header{
    padding:0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.modal-header span{
    display: flex;
    flex-direction: row;
    column-gap: 2rem;
}
#modal-title{
    margin:0;
    font-size:1.5rem;
    color:var(--primary-color);
    font-weight: bold;
}
.modal-body{
    color:var(--primary-color);
    padding:1rem;
    font-family: 'Courier New', Courier, monospace;
}

.modal-btn{
    padding:0rem 1rem;
    font-size:1rem;
    color:var(--primary-color);
    border:1px solid var(--primary-color);
    cursor: pointer;
    border-radius:50px;
    font-weight: bold;
    height: 40px;
    margin-top:-10px;
}
.modal-btn:hover{
    background:var(--primary-color);
    color: var(--complementary-color);
}
.modal-btn:focus{
    box-sizing: 0 0 10px var(--primary-color);
    background:var(--primary-color);
    color: var(--complementary-color);   
}


/* manage server css */
#manage-home{
    background: var(--secondary-color);
    min-height: 100vh;
    padding:2rem;
}
.manage-container{
    width:70%;
    margin:0 auto;
    padding:1rem 2rem;
    background:var(--complementary-color);
}
.upload-bar{
    padding:1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.upload-btn{
    text-decoration: none;
    font-size:1.2rem;
    font-weight: bold;
    color:var(--primary-color);
    background: var(--complementary-color);
    border:2px solid var(--primary-color);
    padding:0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
}
.upload-btn:hover{
    background:var(--primary-color);
    color:var(--complementary-color);
}



/* data table for manage file */
.panel-bar{
    display: flex;
    flex-direction: row;
}
.panel-bar input{
    display: none;
}
.panel-bar label{
    position: relative;
    cursor:pointer;
    font-weight: bold;
    box-sizing: border-box;
    font-size:1.2rem;
    padding:0.5rem 1rem;
    background:var(--complementary-color);
    color:var(--primary-color);
    border:1px solid var(--primary-color);
    border-width: 1px 1px 0 1px;;
}
.panel-bar input:checked + label{
    background: var(--primary-color);
    color:var(--complementary-color);
}
.panel-bar input:checked + label::after{
    content: '';
    position: absolute;
    bottom:-15px;
    left:50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;

    border-top: 20px solid var(--complementary-color);
}
#code-view{
    display: none;
}
.data-table{
    width: 100%;
    border:1px solid var(--primary-color);
    box-sizing: border-box;
}
.data-table h2{
    text-align: center;
    background:var(--primary-color);
    color:var(--complementary-color);
    padding:0.5rem;
    margin:0;
}
.data-table table{
    width: 100%;
}
.data-table table thead tr{
    background: var(--secondary-color);
}
.data-table table thead tr th{
    padding:0.5rem;
    color:var(--complementary-color);
}
.data-table table tbody tr:hover{
    background-color: var(--light-secondary-color);
    color:var(--complementary-color);
}
.data-table table tbody tr td{
    padding:0.5rem;
    font-size:1.2em;
    text-transform: capitalize;
}
.data-table table tbody tr td:last-child{
    text-align: center;
}
.data-table table tbody tr td:first-child{
    max-width: 30ch;
}
.view-btn{
    padding:0.2rem 0.5rem;
    cursor: pointer;
    outline: none;
    color:var(--complementary-color);
    background: var(--secondary-color);
    border:none;
    font-size: 1rem;
}
.copy-btn{
    text-align: center;
}
.copy-btn button{
    background:none;
    color:var(--primary-color);
    font-size:1.1rem;
    border:none;
    margin:0 auto;
    cursor:pointer;
    transition: 500ms;
}
.delete-link{
    text-decoration: none;
    color:red;
}

/* Change password */
.change-password{
    text-align: center;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    font-size:1.5rem;
    width: 40px;
    height: 40px;
    color:var(--primary-color);
    background-color: var(--complementary-color);
    border:2px solid var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
}
#pass-form{
    display:none;
    width:300px;
    height:max-content;
    position: absolute;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
}
#pass-form .form{
    box-sizing: border-box;
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 5rem var(--primary-color);
}
#pass-form input{
    width:100%;
}
.blocker {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    content: ' ';
    background: rgba(0,0,0,.5);
}
.messages{
    background: var(--complementary-color);
    padding:0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}
.error{
    font-weight: bold;
    color:red;
    font-size: 1.5rem;
    margin:0;
    text-transform: capitalize;
}
.input-error{
    font-weight: bold;
    color:red;
    text-transform: capitalize;
}
.success{
    font-weight: bold;
    color:green;
    font-size: 1.5rem;
    margin:0;
    text-transform: capitalize;
}

/* serverid tag */
.server-id{
    position: fixed;
    width: max-content;
    height: max-content;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    margin:0;
    padding:0.5rem 2rem;
    color:var(--complementary-color);
    font-family: 'Courier New', Courier, monospace;
}

@media screen and (max-width:500px) {
    .upload-bar{
        flex-direction: column;
        row-gap: 1rem;
        justify-content: center;
    }
    /* #codelist-home{
        padding:0;
    } */
    .manage-container{
        padding:0.4rem;
        margin:0;
        width:100%;
    }
    #manage-home{
        padding:1rem 0.4rem;
    }
    .data-table{
        width: 100%;
    }
}

/* Upload page css */
#upload{
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
    min-height: 100vh;
    margin:0;
    padding:1rem;
}
.form-wrapper{
    width:70%;
    margin:0 auto;
}
#upload .form input[type="text"]{
    width: 100%;
}
#file_section{
    width: 100%;
}
#file_section input[type="file"]{
    width:100%;
    color:var(--complementary-color);
    box-sizing: border-box;
    padding:0.5rem 1rem;
    background: var(--light-secondary-color);
}
#code_section{
    width:100%;
}
#uploaded_code{
    color:var(--primary-color);
    resize: none;
    width: 100%;
    height:300px;
    overflow-y: scroll;
    outline:none;
    border-radius: 5px;
    font-size:1rem;
    padding:5px;
    box-sizing: border-box;
    border:1px solid #000;
}
#uploaded_code:focus{
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}
#uploaded_files{
    padding:1rem;
    background: var(--light-secondary-color);
    width: 100%;
    color:var(--complementary-color);
}
.upload-error{
    text-align: center;
    background:var(--complementary-color);
    color:var(--primary-color);
    padding:1rem;
}


@media screen and (max-width:600px) {
    .data-table{
        width: 100%;
    }
}


/* server code page */
#server-code{
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
    min-height: 100vh;
    padding:1rem;
}
.code-container{
    width:80%;
    background: var(--complementary-color);
    margin:0 auto;
    padding:1.5rem;
    overflow:auto;
    border-radius: 20px;;
    height:80vh;
}
.code-container::-webkit-scrollbar{
    width:10px;
    height: 10px;;
}
.code-container::-webkit-scrollbar-thumb{
    border-radius: 10px;
    background: var(--primary-color);
}
.code-container::-webkit-scrollbar-track{
    margin:0.8rem;
}
.code-container::-webkit-scrollbar-corner{
    display: none;
}
.code-container .header{
    color:var(--primary-color);
    margin:0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-bottom: 0.4rem;;
    border-bottom: 2px solid var(--primary-color);
}
.code-container .header h1{
    margin:0;
}

/* code list page */

#codelist-home{
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
    min-height: 100vh;
    padding: 2rem;;
}

@media screen and (max-width:768px) {
    .container{
        width:70%;
        padding:1rem 0;
        align-self: center;
        flex-direction: column;
        row-gap: 1rem;
    }
}