html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #100C08;
    font-family: Roboto, "Helvetica Neue", sans-serif;
}

.hide {
    display: none;
}

.container {
    width: 90vw;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(300px, 3fr);
    grid-template-rows: repeat(4, auto);
    margin: 25px auto;
    justify-content: center;
    align-items: center;
    text-align: center;
    column-gap: 36px;
    row-gap: 28px;
}

.heading h1 {
    background: hsla(181, 100%, 22%, 1);
    background: linear-gradient(90deg, hsla(181, 100%, 22%, 1) 0%, hsla(210, 81%, 22%, 1) 100%);
    background: -moz-linear-gradient(90deg, hsla(181, 100%, 22%, 1) 0%, hsla(210, 81%, 22%, 1) 100%);
    background: -webkit-linear-gradient(90deg, hsla(181, 100%, 22%, 1) 0%, hsla(210, 81%, 22%, 1) 100%);
    color: transparent;
    background-clip: text;

    text-align: center;
    font-size: 2em;
    font-weight: 800;
}

.heading {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 12px;
    padding: 8px;
    width: 100%;
    margin: 0 auto;
    background-color: #eee;
    grid-column: 1 / 3;
    grid-row: 1 / 2;
    font-size: 24px;
}
#player-data {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    height: 100%;
    width: 100%;
    padding: 8px;
    margin: 0 auto;
    background-color: #eee;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;

}

#player-data > div {
    margin: 18px 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    height: 50%;
    width: 80%;
    font-size: clamp(20px, 1vw, 3vw);
    padding: 12px;
}

#placeholder {
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    grid-column: 2 / 3;
    grid-row: 2 / 4;
    width: 100%;
    font-size: 1.5em;
    animation: hover2 1.8s ease-in-out infinite;
}
#placeholder h2 {
    color: rgb(0, 109, 111);
}

#player-data > div > * {
    text-wrap: balance;
}

#player-data img {
    max-width: 128px;
    min-width: 96px;
}

#active-player {
    flex: 1;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    background-color: #eee;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    padding: 8px;
    border-radius: 12px;
    font-size: clamp(14px, 2vw, 4vw);
}

#active-player > div {
    width: 100%;
    padding: 8px;
}

#active-player h2 {
    margin: 24px;
    text-align: center;
    color: rgb(0, 109, 111);
    font-weight: 800;
    animation: hover 1.5s ease-in-out infinite;
}
#active-player p {
    margin: 24px;
    text-align: left;
    font-weight: 600;
}

#board {
    border: transparent;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    grid-template-rows: repeat(3, minmax(200px, 1fr));
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #eeeeee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    gap: 8px;
    grid-row: 3 / 4;
    grid-column: 2 / 3;
    width: 100%;
    height: 100%;
}

#board div {
    width: 100%;
    height: 100%;
    background-color: #100C08;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 6rem;
    font-style: normal;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    margin: 8px auto;
}

.mark-container {
    width: 100%;
    height: 100%;
}

.mark-container img {
    width: 50%;
}

.empty:hover {
    animation: blink 1.75s ease infinite;
}

#settings, #game-actions {
    margin: 16px auto;
    background-color: #eeeeee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    padding: 8px;
    border-radius: 12px;
    font-size: clamp(14px, 2vw, 4vw);
    display: flex;
    align-items: center;
    justify-content: center;
}

#settings {
    grid-column: 1 / 2;
    grid-row: 4 / 5;
}

#settings > div, #game-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 16px;
}

#settings > div button, #game-actions button {
    background-color: rgb(0, 109, 111);
    color: #eeeeee;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    min-width: 125px;
    font-weight: 600;
}

#settings > div button:hover {
    background-color: rgb(0, 125, 117);
}

#settings > div label {
    color: #100C08;
    text-wrap: wrap;
    text-transform: uppercase;
    font-weight: 500;
}

#game-actions {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
}

dialog {
    border: 3px solid rgb(0, 109, 111);
    border-radius: 12px;
    text-align: center;
    min-width: 450px;
    gap: 16px;
    padding: 16px;
    min-height: 350px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

#name-dialog form {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 16px;
    margin: 32px auto;
}

#name-dialog > form > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 16px;
    margin: 24px auto;
}

#name-dialog > form > div > div {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#name-dialog form input {
    border: 0;
    border-radius: 8px;
    padding: 12px;
    min-width: 150px;
    transition: 0.2s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#name-dialog form input:focus {
    outline: none;
    border: 3px solid rgb(0, 109, 117);
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.6);
}

#name-dialog button, #game-over-dialog button {
    color: #eeeeee;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

dialog button:hover {
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.6);
    transform: translateY(-2px);
}

.save {
    background-color: rgb(0, 109, 111);
    min-width: 125px;
    width: 100%;
    padding: 16px;
}

.close {
    background-color: rgb(220, 20, 60);
    width: 50px;
    padding: 8px;
    top: 4px;
    right: 6px;
    position: absolute;
    margin: 0;
}

dialog::backdrop {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#game-over-dialog {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
#game-over-dialog img {
    width: 64px;
    height: 64px;
}

#game-over-dialog > *:not(button) {
    margin: 18px auto;
}

@keyframes blink {
    0%, 100% {
        background-color: #100C08;
    }

    50% {
        background-color: rgba(0, 109, 111, .7);
    }
}

@keyframes hover {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes hover2 {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

