* {
    padding: 0;
    margin: 0;
    font-family: "Chewy", system-ui;
    font-weight: 400;
    font-style: normal;
    user-select: none;
}

.hidden {
    display: none !important;
}

:root {
    --child-count: 1;
}

body {
    width: 100vw;
    height: 100vh;
    background-color: #eddfd2;

    overflow: hidden;
} 

.game-menu {
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    background-color: #f0dbc1;
    border-bottom: 4px solid #e1c9ac;
    height: 80px;
}

.game-menu > div {
    display: flex;
    align-items: center;
    gap: 24px;
}

.menu-title {
    font-size: 48px;
    cursor: pointer;
    width: fit-content;
    text-decoration: none;
    text-shadow: 4px 4px 0 #d0ba9f;
    color: #3d2c24;
}
#musicButton {
    width: 50px;
    height: 50px;
    background: #f8ede4;
    border: solid #e1c9ac 3px;
    border-radius: 16px;
    color: #5c3b19;
    font-size: large;
}
#levelText {
    background-color: lightgreen;
    border: 2px solid green;
    padding: 4px 16px;
    border-radius: 999px;
    font-size: 20px;
    color: darkgreen;
}

button {
    cursor: pointer;
}

button:hover {
    filter: brightness(0.9);
    cursor: pointer;
}

button:active {
    filter: brightness(0.7);
    transform: translate(1px, 1px);
}

.level-selector-toggle {
    width: 50px;
    height: 50px;
    background: #f8ede4;
    border: solid #e1c9ac 3px;
    border-radius: 16px;
}

#winScreen {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    flex-direction: column;
    z-index: 4;
    width: 30%;
    background: #eddfd4;
    border: solid #e3c2a3 clamp(1px, 1vw, 13px);
    padding: 1vw;
}
#winScreen h1 {
    width: 100%;
    height: 100%;
    text-align: center;
}
#winScreen div {
    width: 100%;
    height: 100%;
    gap:1vw;
    display: flex;
    align-items: center;
    flex-direction: row;
}
#winScreen button {
    margin-top: 24px;
    background: #996237;
    border: solid #5c3b19 5px;
    color: #f0dcc2 !important;
    width: 100%;
    height: 60px;
}

.level-selection-holder {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    flex-direction: column;
    z-index: 4;
    height: fit-content;
    width: fit-content;
    background: #eddfd4;
    border: solid #e3c2a3 clamp(1px, 1vw, 13px);
    border-radius: 32px;
    padding: 3vw;
}

.level-selection {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto 1fr;
}

.level-option {
    box-sizing: border-box;
    width: 6vw;
    height: 6vw;
    margin: 1.2vw;
    font-size: 4vw;
    color: #d1c7ba;
    border-radius: 20%;
    border: 0.5vh solid #d1c7ba;
    background-color: #f8ede4;
}

.level-option.accessible {
    background: #996237;
    border: solid #5c3b19 5px;
    color: #f0dcc2;
}

.inaccessible {
    cursor: not-allowed !important;
}

.close-level-selector {
    position: absolute;
    box-sizing: border-box;
    right: calc(2vw);
    top: 1.5vw;
    height: 4.5vw;
    width: 4.5vw;
    font-size: 3vw;
    background-color: #f8ede4;
    border: solid #e1c9ac 0.5vw;
    font-family: monospace;
    font-weight: bold;
}

.playing-area {
    height: fit-content;
    width: 90%;

    position: absolute;
    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);
}
#submit {
    position: absolute;
    right: 50%;
    transform: translate(50%);
    top: 110%;
    width: 128px;
    height: 64px;
    z-index: 20;
    
    background: #996237;
    border: solid #5c3b19 5px;
    border-radius: 20px;
    color: white;
    font-size: 24px;
}

.placement-grid {
    /* height: fit-content; */
    background-color: #85604e;
    
    position: relative;
    left: 50%;
    translate: -50% 0%;

    height: 60vh;
    aspect-ratio: 1/1;
    /* max-width: 600px; */
    padding: 10px;

    justify-items: center;
    align-items: center; 

    display: grid;
    gap: 7px;
    grid-template-rows: repeat(calc(sqrt(var(--child-count))), 1fr);
    grid-template-columns: repeat(calc(sqrt(var(--child-count))), 1fr);
}
.placement-grid .slot {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #f0dbc1;
    border: solid #e1c9ac 1vh;
}
.placement-grid .wall {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #87745f;
    border: solid #6c5742 1vh;
}

#crops {
    position: absolute;
    left: 50%;
    bottom: 20px;
    translate: -50% 0%;

    pointer-events: none;
    
    /* background: #996237; */
    /* border: solid #5c3b19 clamp(1px, 1vw, 13px); */
    width: 70%;
    height: 30%;
    transition: 0.3s;
}
#close-background {
    background: #996237;
    border: solid #5c3b19 clamp(1px, 0.8vw, 13px);

    color: #5c3b19;

    position: absolute;
    left: 50%;
    top: -25%;
    z-index: 10;

    height: 40px;
    width: 40px;
}

.crop {
    position: absolute;
    cursor: grab;
}

.tomato {
    background-color: red;
    border: solid rgb(223, 0, 0) 1vh;
}

.carrot {
    background-color: orange;
    border: solid rgb(217, 141, 0) 1vh;
}

.watermelon {
    background-color: green;
    border: solid rgb(0, 74, 0) 1vh;
}
.beetroot {
    background-color: rgb(128, 0, 128);
    border: solid rgb(68, 0, 68) 1vh;
}

.crop:active {
    cursor: grabbing;
}

#mouse-selector {
    width: calc(6%);
    position: absolute;

    /* background-color: rgba(128, 128, 128, 0.315); */

    pointer-events: none;
}
