@font-face {
  font-family: pixelFont;
  src: url(assets/fonts/Minecraft.ttf);
}

* {
    margin: 0;
    padding: 0;
    font-family: pixelFont;
}

body {
    box-sizing: border-box;
    width: 100dvw;
    height: 100dvh;
    text-shadow: 1px 1px 3px peachpuff;
    text-align: center;
    overflow: hidden;
}

p {
    font-size: 15px;
}

button {
    font-size: 15px;
    transition: all 0.3s ease;
}

button:hover {
    cursor: pointer;
    transform: scale(1.2);
}

button:active {
    opacity: 0.6;
}

button img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.audioContainer {
    position: absolute;
    display: flex;
    gap: 10px;
    top: 1em;
    left: 1em;
    width: fit-content;
    height: fit-content;
    z-index: 99;
}

#musicButton,
#sfxButton {
    width: fit-content;
    height: fit-content;
    background-color: transparent;
    border: none;
}

#musicIcon,
#sfxIcon {
    width: 40px;
    height: 40px;
}

#mainMenuPage,
#gamePage {
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 1em;
    justify-content: center;
    align-content: center;
    align-items: center;
    gap: 10px;
}

#mainMenuPage {
    background-color: pink;
}

.startContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#startButton {
    padding: 10px;
    font-size: 20px;
    background-color: lightgoldenrodyellow;
    border: none;
    border-radius: 10px;
    box-shadow: 1px 1px 3px peachpuff;
}

.titleContainer {
    position: relative;
    width: 100%;
    height: 5%;
    text-align: center;
    align-content: center;
}

.dressUpContainer {
    position: relative;
    display: flex;
    width: 100%;
    height: 90%;
    overflow: hidden;
}

#characterContainer {
    position: relative;
    display: flex;
    box-sizing: border-box;
    width: 30%;
    height: 100%;
    text-align: center;
    border: 10px solid lightgoldenrodyellow;
    border-radius: 10px;
    overflow: auto;
    scrollbar-width: none;
    justify-content: center;
    box-shadow: 1px 1px 3px peachpuff;

}

#characterContainer label img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: none;
    cursor: zoom-in;
}

#zoomCheckbox:checked~img {
    transform: scale(2);
    transform-origin: 0% 0%;
    cursor: zoom-out;
}

#background {
    z-index: 0;
}

#mainBody {
    z-index: 1;
}

#hair {
    z-index: 2;
}

#socks {
    z-index: 3;
}

#shoes {
    z-index: 4;
}

#pants {
    z-index: 5;
}

#shirt {
    z-index: 6;
}

#dress {
    z-index: 7;
}

#frontHair {
    z-index: 8;
}

#shirtAndPantsButton {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 5px;
    left: 5px;
    background-color: transparent;
    border: none;
    z-index: 98;
    transform-origin: top left;
}

#pantsAndShoesButton {
    position: absolute;
    width: 60px;
    height: 60px;
    bottom: 5px;
    left: 5px;
    background-color: transparent;
    border: none;
    z-index: 98;
    transform-origin: bottom left;
}

#doneContainer {
    position: absolute;
    display: grid;
    gap: 5px;
    width: 100px;
    height: fit-content;
    bottom: 5px;
    right: 5px;
    z-index: 98;
    justify-content: right;
}

#doneButton {
    position: relative;
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: none;
    transform-origin: bottom right;
    margin-left: auto; 
    margin-right: 0;
}

#popUpMessage {
    background-color: peachpuff;
    border: none;
    border-radius: 10px;
    padding: 5px;
    animation: fadeIn 0.5s ease;
}

#restartGameButton {
    padding: 10px;
    background-color: lightgoldenrodyellow;
    border-radius: 5px;
    border: none;
    box-shadow: 1px 1px 3px peachpuff;
    transform-origin: bottom right;
}

#downloadButton {
    position: absolute;
    width: 100px;
    height: fit-content;
    bottom: 5px;
    left: 5px;
    padding: 10px;
    background-color: lightgoldenrodyellow;
    border-radius: 5px;
    border: none;
    box-shadow: 1px;
    transform-origin: bottom left;
    z-index: 98;
}

#downloadLink {
    text-decoration: none;
    color: black;
}

#closetContainer {
    position: relative;
    display: flex;
    box-sizing: border-box;
    width: 70%;
    height: 100%;
    background-color: pink;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

#innerClosetContainer {
    position: relative;
    display: flex;
    width: 90%;
    height: 90%;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

#optionPanel {
    position: relative;
    display: grid;
    width: 10%;
    height: 100%;
    row-gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    direction: rtl;
    scrollbar-width: none;
    align-items: center;
}

.optionButton {
    position: relative;
    width: 100%;
    height: fit-content;
    justify-content: space-evenly;
    background-color: lightgoldenrodyellow;
    padding: 10px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border: none;
    box-shadow: 1px 1px 3px peachpuff;
}

.selected {
    background-color: lightgoldenrodyellow;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    border: none;
    opacity: 0.6;
}

.selectionContainer {
    position: relative;
    box-sizing: border-box;
    display: flex;
    width: 90%;
    height: 100%;
    border: 10px solid lightgoldenrodyellow;
    border-radius: 10px;
    overflow: auto;
    scrollbar-width: none;
    box-shadow: 1px 1px 3px peachpuff;
}

.selection {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    height: fit-content;
    padding: 5px;
}

.selection input[type="image"] {
    position: relative;
    display: block;
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1;
    background-color: lightgoldenrodyellow;
    border: none;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 1px 1px 3px peachpuff;
}

.selection input[type="image"]:focus {
    opacity: 0.6;
}

.resetButtons {
    position: sticky;
    display: grid;
    gap: 10px;
    padding: 10px;
    top: 0;
    width: 100px;
    height: fit-content;
}

.resetSectionButton,
.resetAllButton {
    padding: 10px;
    background-color: lightgoldenrodyellow;
    border-radius: 5px;
    border: none;
    box-shadow: 1px 1px 3px peachpuff;
}

.resetSectionButton:hover,
.resetAllButton:hover {
    transform-origin: top right;
}

@keyframes slideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(115%);
    }
}

@keyframes slideDown {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes stretchOut {
    0% {
        transform-origin: top;
        transform: scale(100%);
    }
    100% {
        transform-origin: top;
        transform: scale(150%);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
    }
}



@media (min-width: 851px) and (max-width: 1000px) {
    #innerClosetContainer {
        width: 85%;
    }

    #optionPanel {
        width: 15%;
    }
}

@media only screen and (max-width: 850px) {
    .titleContainer {
        width: 60%;
        height: 10%;
    }

    .dressUpContainer {
        height: 85%;
        position: relative;
        display: flexbox;
        flex-wrap: wrap;
        justify-content: center;
    }

    #characterContainer {
        width: 50%;
        height: 65%;
    }

    #closetContainer {
        width: 100%;
        height: 35%;
    }

    #innerClosetContainer {
        display: flex;
        flex-wrap: wrap;

    }

    .selectionContainer {
        width: 100%;
        height: 80%;
        border-top-left-radius: 0px;
        border-top-right-radius: 0px;
    }

    #optionPanel {
        display: flex;
        width: 100%;
        height: 20%;
        column-gap: 5px;
        overflow-x: auto;
        overflow-y: hidden;
        direction: ltr;
    }

    .optionButton {
        border-top-right-radius: 5px;
        border-bottom-left-radius: 0px;
    }

    .selection input[type="image"] {
        width: 70px;
        height: 70px;
    }
}

@media only screen and (max-width: 500px) {
    #doneContainer,
    #downloadButton {
        width: 45%;
    }
}

@media (max-height: 447px) {
    #skinButton {
        border-top-right-radius: 5px;
    }

    #shoeButton {
        border-bottom-right-radius: 5px;
    }
}