*
{
    transition: all 0.15s;
}

p
{
    font-size: 24px;
    text-align: center;
}

body
{
    background-color: rgb(25, 26, 42);
    color: white;
}

h1
{
    text-align: center;
}

h2
{
    text-align: center;
}

h3
{
    text-align: center;
}

h4
{
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

label
{
    font-size: 16px;
    margin: 0.5em;
}

.flow
{
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
    align-items: center;
}

.finalizer, .downloadDiv
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#tooltip
{
    display: none;
    position: absolute;
    padding: 1em;
    background-color: rgba(255, 255, 255, 0.863);
    z-index: 100;
    color: black;
}

.textFields
{
    min-width: 33vw;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
}

.sudokuWrapper
{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50vw;
    aspect-ratio: 1 / 1;
}

.sudoku
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 4px;
    border: white solid 4px;
    background-color: white; /* grid color */
    width: 100%;
    margin: 0;
    padding: 0;
    aspect-ratio: 1 / 1;
    border-radius: 2em;
    border-top-left-radius: 0;
}

#squareN2, #ssquareN2
{
    border-top-right-radius: 2em;
}

#square2N, #ssquare2N
{
    border-bottom-left-radius: 2em;
}

#square22, #ssquare22
{
    border-bottom-right-radius: 2em;
}

.sudoku > div
{
    background-color: rgb(30, 30, 30);
    padding: 0 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 100%;
    flex-wrap: nowrap;
}

.sudoku > div.valid
{
    background-color: rgb(165, 255, 165);
}

.sudoku > div.invalid
{
    background-color: rgb(255, 167, 167);
}

.sudoku > div.invalid:hover, .sudoku > div.valid:hover
{
    cursor: pointer;
}

.sudoku > div.invalid:has(> .postValidator.gone):hover, .sudoku > div.valid:has(> .postValidator.gone):hover
{
    cursor: auto;
}

.sudoku > div.nolid
{
    background-color: rgb(176, 176, 176);
}

.inverseCheckboxDiv
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    font-size: 24px;
}

.inverseCheckboxDiv > input
{
    scale: 150%;
    border-radius: 0;
    border: none;
    margin: 0.5em 0;
}

.inverseCheckboxDiv > label
{
    margin: 0.5em 0;
}

.conditionalDropdown
{
    margin-bottom: 20px;
    position: relative;
}

.dropdown
{
    display: none;
}

.dropdown.open
{
    display: block;
    position: absolute;
    z-index: 1;
}

.dropdown ul
{
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.dropdown > ul > li
{
    display: block;
    position: relative;
    width: 20em;
}

button
{
    background-color: white;
    color: black;
    border: none;
    border-radius: 0.3em;
    padding: 0.5em;
    font-size: 16px;
}

button:hover
{
    scale: 103%;
}

.dropdownButton, .option
{
    background-color: white;
    color: black;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 0;
    text-wrap: nowrap;
}

.dropdownButton:hover, .option:hover
{
    scale: 100%;
    background-color: #ccc;
}

.dropdownContent
{
    display: none;
    position: absolute;
    left: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    max-height: 200px;
    overflow-y: scroll;
}

.dropdownContent li
{
    position: relative;
}

.dropdownContent .dropdownButton, 
.dropdownContent .option
{
    background: white;
    color: black;
}

.dropdownContent .dropdownButton:hover, 
.dropdownContent .option:hover
{
    background: #f1f1f1;
}

/* Show submenu when parent is open */
li.open > .dropdownContent
{
    display: block;
    top: 100%;
    left: 0;
}

/* Nested submenu (appears to the right) */
li.open > .dropdownContent li.open > .dropdownContent
{
    top: 0;
    left: 100%;
}

.autocompleteList
{
    position: absolute;
    background: white;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    top: 100%;
    width: 100%;
    min-width: 10em;
}

.autocompleteList:has(.autocompleteItem)
{
    border: 1px solid #ccc;
}

.autocompleteItem
{
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.autocompleteItem > img
{
    width: 32px;
    height: 32px;
    margin-right: 10px;
    object-fit: cover;
    border-radius: 4px;
}

.autocompleteItem > span
{
    color: black;
}

.autocompleteItem:hover
{
    background-color: #f0f0f0;
}

.monsterCounter
{
    color: black;
    font-size: 24px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

input[type=text]
{
    width: 100%;
    color: black;
    border: none;
    border-radius: 0.75em;
    padding: 0.1em 0.5em;
    font-size: 16px;
}

a
{
    color: white;
    text-decoration: underline;
}

a:hover
{
    color: white;
    cursor: pointer;
}

footer
{
    background-color: black;
    padding: 1em;
    margin-top: 1em;
}

footer > p
{
    text-align: left;
}

.monsterImg
{
    width: 40%;
}

.postValidator
{
    width: 100%;
}

.inputStuff
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.gone
{
    display: none;
}

.controls
{
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-bottom: 2em;
}

select
{
    background-color: white;
    border: none;
    border-radius: 0.5em;
    color: black;
    padding: 0.5em;
    width: 100%;
}

select:hover
{
    cursor: pointer;
}

.sudokuList
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(27em, 1fr));
    gap: 1em;
    width: 90%;
    margin: auto;
}

.sudokuResult
{
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 1em;
    border-top-left-radius: 0;
    min-width: fit-content;
}

.sudokuResult:hover
{
    cursor: pointer;
    scale: 1.04;
}

.sudokuResult a
{
    text-decoration: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
    padding: 2em;
    gap: 1em;
    width: 100%;
    height: 100%;
}

.linkList
{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin: 1em;
}

.linkList > a
{
    font-size: 24px;
    text-align: center;
}

#dropZone
{
    border: 2px dashed #ccc;
    padding: 5em;
    text-align: center;
    cursor: pointer;
}

#dropZone.dragover
{
    border-color: #007bff;
}

#fileInput
{
    display: none; /* Hide the default file input */
}

@media screen and (max-width: 1350px)
{
    .sudokuWrapper
    {
        width: 90%;
    }
}

@media screen and (max-width: 760px)
{
    h4, .monsterCounter, .inverseCheckboxDiv, button > span
    {
        font-size: 12px;
    }

    .inverseCheckboxDiv > input
    {
        scale: 100%;
    }

    button
    {
        margin: 0;
    }

    .conditionalDropdown
    {
        margin: 0;
    }
}

@media screen and (max-width: 450px)
{
    h4, .monsterCounter, .inverseCheckboxDiv, button > span
    {
        font-size: 8px;
        margin: 0;
    }
}
