/*color pallete for the website*/
:root{
    --background: #161616;
    --secondery: #383838;
    --active: #616161;
    --accent-color:#ffffff;
}
/* Standardize box-sizing */
*{
    box-sizing: border-box;
}
/*this makes the base color of the page navi blue*/
body{
    background: var(--background); /* Sets the background image */
    background-size: cover;  /* Scales the image to cover the entire viewport */
    background-repeat: no-repeat;  /* Prevents tiling */
    background-position: center;  /* Centers the image */
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--accent-color);
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    margin: 0;
    z-index: -1;
    zoom: 0.8;
    width: 125vw;
}
/* this maks the header fill the page with and to make the items align too the right in a line with some space betwin them*/
header{
    background-color: var(--secondery); 
    padding: 0.4%;
    display: flex;
    flex-direction: row;
    gap: 5px;
    border-radius: 8px;

}
/* makes the pfp loade a defult picture and makes it pixelated so that you can see the art I made :)*/
/* Match the viewer to the main profile image */
#pfp, #pfp-viewer {
    image-rendering: pixelated;
    border-radius: 100%;
    height: 84px;
    width: 84px;
    border: 3px solid var(--background);
}
#pfp-viewer {
    display: block;
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
}
#pfp-btn {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    padding: 6px 12px;
    font-size: medium;
    border-radius: 4px;
    background-color: var(--active);
    border: 3px solid var(--background);
    color: var(--accent-color);
}
/*makes the items in the div line up downwords*/
#ch-things{
    display: flex;
    flex-direction: column;
    gap: 3%;
}
/*makes the small inputs line up in a row with some space betwin them*/
#small{ 
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 5px;
    font-size: medium;
    font-family: Arial, Helvetica, sans-serif;
    justify-content: left;
}
/*styles the small inputs*/
#gender{width: auto;}
#race{width: fit-content;}
#class{width: fit-content;}
#gender, #race, #class{
    color: var(--accent-color); background-color: var(--background); border: none; border-radius: 2px;
    padding: 1px 4px 1px 1px;
}
#chn, #status-display{
    width: 100%;
    background-color: var(--background);
    color: var(--accent-color);
    border: none;
}
#level{
    font-size: small;
    display: flex;
    flex-direction: row;
    width: 45px;
    height: 20px;
}
#level-change{
    border: 2px solid var(--accent-color);
    font-size: small;
    width: 35px;
    height: 20px;
}
#level-value{
    width: 15px;
    height: 20px;
    font-size: small;
    font-weight: bold;
    border: none;
}
#level, #level-value, #level-change{
    color: var(--accent-color);
    background-color: var(--background);
    border-radius: 2px;
    font-family: Arial, Helvetica, sans-serif;
    padding: 0px 4px;
    line-height:20px;
}
/*makes the edit button look nice*/
#edit-btn{
    height: 40px;
    width: 40px;
    border-radius: 4px;
    font-size: xx-large;
    margin-left: auto;
}
#edit-btn:hover{
    background-color: var(--active);
}
#edit-btn img{
    image-rendering: pixelated;
    transform: translate(-6px, 1px);
}
/*makes the text look nice*/
.text{
    font-size: xx-large;
    border-radius: 4px;
    border: 2px var(--background);
    font-family: Arial, Helvetica, sans-serif;
}
/*makes the buttons look nice*/
button{
    color: var(--accent-color);
    background-color: var(--secondery);
}
button:hover{
    background-color: #4d4c4c;
}
button:active{
    background-color: var(--active);
}
/*styles the footer*/
footer{
    display: flex;
    padding: 0.4%;
    position: fixed;
    bottom: 0;
    justify-content: center;
    align-items: center;
    margin-left: 44%;
    margin-right: auto;
}
footer p{
    color: var(--accent-color);
    text-align: center;
    margin-top: 20px;
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
}
/*makes the main content div a flex box with row direction so that the left and right side divs are next to each other*/
#main-content{
    display: grid;
    grid-template-rows: auto auto;
    gap: 5px;
    width: 125vw;
    position: relative;
    z-index: 0;
}
#center{
    display: flex;
    flex-direction: row;
    gap: 1.4%;
    width: 125vw;
    z-index: 0;
}
/*makes the left side div have the secondery color as its background*/
#left-side, #right-side{
    background-color: var(--secondery);
    padding: 0.4%;
    border-radius: 8px;
    min-height: 50vh;
    width: 125vw;
    max-height: 100vh;
    overflow-y: scroll;
    border: 4px solid rgba(0, 0, 0, 0.39);
}
#left-side{
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 0;
    width: 33rem;
}
#right-side{
    position: sticky;
    right: 0;
    top: 0;
    width: 100vw;
    min-width: 40vw;
    max-width: 125vw;
}
.title{
    font-size: xx-large;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 10px;
}
#stats{
    display: grid;
    grid-template-columns: 100px 100px 100px 100px ;
    grid-template-rows: 50px 120px 120px;
    margin-bottom: 10px;
}
.stat{
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    height: 110px;
    width: 95px;
    background: var(--background);
    padding: 6px 2px;
    border-radius: 6px;
}
#str-display, #dex-display, #ws-display,
#bs-display, #tn-display, #int-display,
#per-display, #wp-display, #fel-display
{
    height: 60px;
    width: 60px;
    border: none;
    border-radius: 4px;
    background-color: var(--active);
    font-size: 50px;
    color: var(--accent-color);
    text-align: center;
    align-self: center;
    z-index: 1;   
}
#str, #dex, #ws, #bs,
#tn, #int, #per, #wp, #fel {
    height: 60px;
    width: 70px;
    border: none;
    border-radius: 4px;
    background-color: var(--active);
    font-size: 50px;
    color: var(--accent-color);
    text-align: center;
    align-self: center;
    z-index: 1;
}
label{
    font-family: Arial, Helvetica, sans-serif;
    color: var(--accent-color);
    align-self: center;
    text-align: center;
    z-index: 1;
}
.coin{
    display: flex;
    flex-direction: row;
    gap: 5%;
    flex: 1;
    padding: 5px;
    border-radius: 4px;
    height: 30px;
    white-space: onwrap;
}
#credits, #doch, #renown{
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--accent-color);
    background-color: var(--background);
    border: 2px solid var(--active);
    border-radius: 4px;
}
#credits{
    width: 90px;
}
#doch{
    width: 80px;
    margin-left: 22px;
}
#renown{
    width: 60px;
    margin-left: 20px;
}
.coin{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6%;
}
#check-boxs{
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 5px;
}
.check-boxs-container{
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: larger;
    width: 340px;
    height: fit-content;
    background: var(--background);
    border-radius: 4px;
    padding: 5px;
    border: 4px solid var(--active);
}
.check-boxs{
    width: fit-content;
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto auto auto auto auto;
    gap: 1px;
}
.check-boxs input[type="checkbox"] {
    width: 22px;
    height: 22px;
    appearance: none;
    border: 2px solid var(--active);
    border-radius: 4px;
    background-color: var(--background);
    position: relative;  /* Required for pseudo-element positioning */
}

.check-boxs input[type="checkbox"]:checked {
    background-color: var(--accent-color);  /* Change to gray for better contrast */
}

.check-boxs input[type="checkbox"]:checked::after {
    color: var(--accent-color);  /* White checkmark */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
}
.check-boxs-container input[type="text"],
.check-boxs-container input[type="number"] {
    width: 22px;
    height: 25px;
    font-size: large;
    color: var(--accent-color);
    background-color: var(--background);
    border: 2px solid var(--active);
    border-radius: 4px;
    text-align: center;
}
.check-boxs-container .tracker-name {
    width: 230px;
    text-align: left;
}
.check-boxs-container .tracker-max {
    width: 50px;
    text-align: center;
}
.tabgrub{
    display: flex;
    flex-direction: row;
    gap: 1%;
    margin-bottom: 10px;
}
.tabgrub button{
    flex: 1;
    height: 40px;
    font-size: large;
}
#Actions,
#Traits,
#Inventory,
#StatusEffects,
#Notes {
    display: none;
}
#Actions.active,
#Traits.active,
#Inventory.active,
#StatusEffects.active,
#Notes.active {
    display: block;
}
#actionsTab,
#traitsTab,
#inventoryTab,
#statusEffectsTab,
#notesTab {
    background-color: var(--secondery);
    border-width: 10px;
    border-style: solid;
    border-image: url(un-pressed.png) 30 round;
    transition: background 0.2s, border-image 0.2s;
}
#actionsTab.active,
#traitsTab.active,
#inventoryTab.active,
#statusEffectsTab.active,
#notesTab.active {
    background-color: #333333;
    border-width: 10px;
    border-style: solid;
    border-image: url(pressed.png) 30 round;
}
#statsTab {
    display: none;
}
#statsTab.active {
    background-color: #333333;
    border-width: 10px;
    border-style: solid;
    border-image: url(pressed.png) 30 round;
}
#statsTab:hover {
    background: #4d4c4c;
}
#actionsTab:hover,
#traitsTab:hover,
#inventoryTab:hover,
#statusEffectsTab:hover,
#notesTab:hover {
    background: #4d4c4c;
}
.textarea-containers{
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 25px;
    margin-bottom: 10px;
}
textarea, .text-box {
    background-color: var(--background);
    color: var(--accent-color);
    border: 2px solid var(--active);
    border-radius: 4px;
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    padding: 5px;
    resize: both;
}
.text-box {
    width: 15%;
    height: 1%;
    max-width: 1100px;
    max-height: 1000px;
}

#overly{ 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center; /* horizontal */
    align-items: flex-start;     /* vertical */
    gap: 10px;
    z-index: 2;
}
.edit-character-box{
    background-color: var(--secondery);
    padding: 20px;
    border-radius: 8px;
    margin-top: 1%;
    width: fit-content;
    height: fit-content;
    gap: 10px;
}
.edit-character-box h2{
    color: var(--accent-color);
    text-align: center;
}
.edit-character-box label{
    font-size: large;
    font-weight: bold;
}
.edit-character-box input[type="text"]{
    background-color: var(--background);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: large;
    margin-left: 10px;
    border-radius: 4px;
}
.edit-character-box select{
    background-color: var(--background);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: large;
    margin-left: 10px;
    border-radius: 4px;
}
.edit-character-box #level{
    background-color: var(--background);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: large;
    margin-left: 10px;
    border-radius: 4px;
}

.textarea-containers input[type="text"]{
    width: fit-content;
    background-color: var(--secondery);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    padding: 5px;
}
.textarea-containers textarea{
    width: 300px;
    min-height: 40px;
    max-width: 1200px;
}
.bio{
    width: fit-content;
    background-color: var(--secondery);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    padding: 5px;
}
.mech{
    width: fit-content;
    background-color: var(--secondery);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: large;
    font-family: Arial, Helvetica, sans-serif;
    padding: 5px;
}
#top{

    display: flex;
    flex-direction: column;
}
#top label{
    display: flex;
    flex-direction: row;
}
#mid{
    display: grid;
    grid-template-columns: auto auto auto;
}
#mid h3{
    grid-column: 1 / 4;
    justify-content: center;
    align-items: center;
}
#bottom{
    display: flex;
    flex-direction: column;
}
.stat-edit input[type="number"]{
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    height: 110px;
    width: 100px;
    background: var(--background);
    padding: 10px;
    border-radius: 6px;
    border: 4px solid var(--active);
    font-size: xx-large;
}
#bottom input[type="number"],
#points-remaining,
#Exstra-points, 
#number{
    background-color: var(--background);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: xx-large;
    border-radius: 4px;
    width: 100px;
    margin-left: 10px;
    text-align: center;
}
#points-remaining label,
#Exstra-points label {
    display:inline-flex;
    align-items:center; 
    gap:5px;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    border-radius: 50% ;
}
#add-check-box{
    width: 40%;
    margin-bottom: 5px;
}
.check-box-exstras{
    background-color: var(--secondery);
    border: 2px solid var(--active);
    color: var(--accent-color);
    font-size: large;
    border-radius: 4px;
    width: 100%;
}
.inputval{
    background-color: var(--background);
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: large;
    border-radius: 4px;
    width: 100%;
}
#speed-edit, #speed{
    font-size: medium;
    display: flex;
    flex-direction: row;
    width: 35px;
    height: 20px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background-color: var(--background);
    border-radius: 2px;
    font-family: Arial, Helvetica, sans-serif;
}
#speed-container{
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    background-color: var(--background);
    padding: 8px 4px 8px 4px;
    border-radius: 4px;
}
#speed{
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 25px;
    height: 35px;
    font-size: xx-large;
}
#speed label{
    font-size: large;
    text-align: center;
}
#inventory-container, #status-effects-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: min-content;
    align-items: start;
    gap: 8px;
}
#inventory-container textarea, #status-effects-container textarea {
    width: 50%;
    max-width: 300px;
    box-sizing: border-box;
}
#inventory-container textarea {
    max-height: 500px;
}
#status-effects-container textarea {
    max-height: 100px;
}
.organic{
    display: block;
}
.mech{
    display: none;
}
/* Status Effects Viewer in header */
.status-effects-header-viewer {
    background: var(--secondery);
    border-radius: 8px;
    margin-left: 10px;
    max-height: 70px;
    min-width: 120px;
    max-width: 200px;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 6px 10px;
    font-size: small;
    color: var(--accent-color);
    background-color: var(--background);
}
.status-effects-header-title {
    font-weight: bold;
    margin-bottom: 4px;
    width: 100%;
    text-align: left;
}
#status-effects-header-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Mobile Responsive Styles */
/* Ensure the left side does not shrink and remains visible for screens smaller than 1500px */
@media only screen and (max-width: 1700px) {
    #left-side {
        display: block;
        /* Ensure it remains visible */
        width: 30vw;
        /* Adjust width to fit the screen */
        max-width: none;
        /* Remove any max-width constraints */
        overflow-y: auto;
        /* Allow scrolling if content overflows */
    }
    #right-side {
        display: block;
        /* Ensure it remains visible */
        width: 95vw;
        max-width: 125vw;
        min-width: 40vw;
        /* Adjust width to fit the screen */
        max-width: none;
        /* Remove any max-width constraints */
        overflow-y: auto;
        /* Allow scrolling if content overflows */
    }

}
@media only screen and (max-width: 1620px) {
    #left-side {
        display: block;
        /* Ensure it remains visible */
        width: 40vw;
        /* Adjust width to fit the screen */
        max-width: none;
        /* Remove any max-width constraints */
        overflow-y: auto;
        /* Allow scrolling if content overflows */
    }
        #right-side {
            display: block;
            /* Ensure it remains visible */
            width: 94vw;
            max-width: 125vw;
            min-width: 40vw;
            /* Adjust width to fit the screen */
            max-width: none;
            /* Remove any max-width constraints */
            overflow-y: auto;
            /* Allow scrolling if content overflows */
        }
}
@media only screen and (max-width: 1280px) {
    #left-side {
        display: block;
        /* Ensure it remains visible */
        width: 50vw;
        /* Adjust width to fit the screen */
        max-width: none;
        /* Remove any max-width constraints */
        overflow-y: auto;
        /* Allow scrolling if content overflows */
    }
}
@media only screen and (max-width: 1100px) {
    #left-side {
        display: none; /* Hide the left side */
    }
    #right-side {
        width: 125vw; /* Make the right side take full width */
    }

    /* Ensure the tabs are visible */
    .tabgrub {
        display: flex;
    }
}
@media  only screen and (max-width:800px) {
    header {
        display: grid;
        grid-template-rows: auto auto;
        grid-template-columns: auto auto auto;
    }
}
@media only screen and (max-width: 700px) {
    body {
        zoom: 0.7; /* Adjust zoom for smaller screens */
        width: 165vw; /* Ensure the body takes full width */
    }
    #left-side {
        display: none;
        width: 145vw;
        /* Hide the left side */
    }
    #center {
        display: block;
        /* Stack the content vertically */
        width: 155vw;
        /* Ensure the center takes full width */
    }

    #right-side {
        width: 165vw;
        /* Make the right side take full width */
    }

    /* Ensure the tabs are visible */
    .tabgrub {
        display: flex;
    }
}
@media only screen and (max-width: 430px) {
    body {
        zoom: 0.6;
        /* Adjust zoom for smaller screens */
        width: 165vw;
        /* Ensure the body takes full width */
    }
    header {
        display: grid;
        grid-template-columns: auto auto;
        align-items: left;
        gap: 10px;
        height: 31vh;
    }

    #left-side {
        display: none;
        width: 145vw;
        /* Hide the left side */
    }

    #center {
        display: block;
        /* Stack the content vertically */
        width: 155vw;
        /* Ensure the center takes full width */
    }

    #right-side {
        width: 165vw;
        /* Make the right side take full width */
    }

    #speed-container{
        width: 70px;
        margin: 0 10px;
    }
    
    #edit-btn{
    height: 30px;
    margin: 0;
    padding: 0;
    }
    #header-container-css {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    #small {
        grid-template-rows: auto auto auto;
        grid-template-columns: auto auto;
    }
}