:root {
    --mainBorderSize: 10px;
    --accent-color: rgb(206, 206, 206);
    --dpadDirectionSize: 30%;
    --dpadPadding: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    /* min-height: 100vh; */
}

#page {
    position: relative;
    width: 100%;
    max-width: 650px;
    /* width: 375px; */
    /* height: 100%; */
    min-height: 100vh;
    flex-direction: column;
    gap: 20px;
    display: flex;
    /* justify-content: center; */
    align-items: center;
    background-color: rgb(51, 42, 30);
    background-image: url(../assets/wood.jpg);
    /* background-position: center; */
    /* background-size: cover; */
    padding: 20px;
}

#titleContainer {
    width: 100%;
    text-align: center;
    font-size: 30pt;
    padding: 15px 0px;
    box-shadow: 0px 0px 15px 2px black;
    background-color: rgba(255, 255, 255, 0.02);
}

.insetShadow {
    box-shadow: inset 0px 0px 15px 3px black;
    background-color: rgba(0, 0, 0, 0.05);
}

.curveBorder {
    border-radius: 8px;
}

#inputContainer {
    display: block;
    width: 100%;
    padding: 20px;
    /* background-color: navy; */
    /* display: flex; */
    /* align-items: center; */
    /* gap: 10px; */
}

button {
    background-color: rgba(0, 0, 0, 0.267);
    padding: 5px;
    border-radius: 5px;
}

input {
    background-color: rgba(0, 0, 0, 0.267);
    border-radius: 5px;
    padding: 5px;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none; /* for Safari */
    width: 24px;
    height: 24px;
    border: 2px solid #555;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background: #007acc; /* fill color */
    border-color: #007acc;
    position: relative;
}

input[type="checkbox"]:checked::after {
    content: "✔";
    color: white;
    font-size: 18px;
    position: absolute;
    left: 3px;
    top: 0;
}

#seedInputs, #widthHeightInputs {
    margin-bottom: 20px;
}

#seedInputs, #widthHeightInputs, #controlInputs {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

#controlInputs {
    /* justify-content: space-between; */
}
#controlInputs > div {
    display: flex;
    align-items: center;
}
#controlInputs > div > label {
    /* font-size: 1rem; */
    /* background-color: red; */
    text-wrap: nowrap;
}

#seed {
    width: 200px;
}

#width, #height {
    width: 80px;
}

#gameContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#canvasPadding {
    width: 100%;
    position: relative;
    background-color: rgb(16, 53, 1);
    padding: 50px;
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    background-image: url(../assets/felt.png  );
}

#finishMessage {
    display: none;
    width: 100%;
    position: absolute;
    top: 10px;
    left: 0;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.548);
    color: yellow;
}

#dpad {
    display: none;
    width: 250px;
    aspect-ratio: 1/1;
    position: absolute;
    right: 0;
    bottom: 0;
    background-color: rgba(88, 88, 88, 0.342);
    box-shadow: 0px 0px 12px 0px black;
    border-radius: 50%;
    z-index: 3;
}
.dpadDirection {
    width: var(--dpadDirectionSize);
    aspect-ratio: 1/1;
    background-color: rgba(165, 165, 165, 0.932);
    position: absolute;
    background-position: center;
    background-size: 80%;
    background-repeat: no-repeat;
    border-radius: 20%;
}
#dpadUp {
    top: var(--dpadPadding);
    left: calc(50% - var(--dpadDirectionSize)/2);
    background-image: url(../assets/arrow-up.svg);
}
#dpadDown {
    bottom: var(--dpadPadding);
    left: calc(50% - var(--dpadDirectionSize)/2);
    background-image: url(../assets/arrow-down.svg);
}
#dpadLeft {
    left: var(--dpadPadding);
    top: calc(50% - var(--dpadDirectionSize)/2);
    background-image: url(../assets/arrow-left.svg);
}
#dpadRight {
    right: var(--dpadPadding);
    top: calc(50% - var(--dpadDirectionSize)/2);
    background-image: url(../assets/arrow-right.svg);
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 0px 0px rgba(255, 215, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.9);
  }
}

.glowHint {
    animation: glowPulse 1.5s infinite ease-in-out;
}

#gameCanvas {
    width: 100%;
    /* background-color: rgb(0, 0, 0); */
    border-radius: 5px;
    touch-action: none;
}
#gameCanvas:focus {
    outline: 4px solid green;
}

#clock_container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0px;
    /* border: var(--mainBorderSize) solid transparent; */
    /* border-image: url(/assets/wood.jpg) 50 round; */
}

.game_label {
    /* font-size: calc(var(--digit-font-size) / 2); */
    font-size: 20pt;
    color: var(--accent-color);
    font-family: monospace;
}




/* Mobile (portrait phones ≤ 480px) */
@media (max-width: 480px) {
    :root {
        --dpadPadding: 5px;
    }
    #canvasPadding {
        padding: 25px;
    }

    #inputContainer {
        padding: 10px;
    }

    .game_label {
        font-size: 15pt;
    }

    #randomizeSeedButton {
        font-size: 12pt;
    }
    #dpad {
        width: 180px;
    }
}

@media (min-width: 481px) and (max-width: 551px) {
    :root {
        --dpadPadding: 5px;
    }
    .game_label {
        font-size: 15pt;
    }
    #dpad {
        width: 200px;
    }
}

/* Small tablets (481px – 768px) */
@media (min-width: 552px) and (max-width: 768px) {
}

/* Large tablets (769px – 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
}

/* Laptops (1025px – 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
}

/* Desktops (1441px and above) */
@media (min-width: 1441px) {
}
