@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&display=swap');

html.play {
    height: 100%;
}

body.play {
    height: 100%;
    margin: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
}

main.play {
    overflow: auto;
    min-height: 0;
}

body {
    padding: 40px;
    background-color: #caf0f8;
    font-family: "DynaPuff", sans-serif;
    overflow-y: auto;
    color: black;
}

main {
    max-width: 100%;
    padding: 2rem;
}  

h1 {
    text-align: center;
    font-weight: 1000;
    font-style: normal;
    font-size: 75px;
}

h3 {
    margin-top: 50px;
    font-size: 50px;
    font-weight: 800;
}

p{
    font-weight: 400;
    font-size: 30px;
}

button:active {
    opacity: 0.8;
}

.menu
button {
    padding: 12px 20px;
    width: 325px;

    background-color: #00b4d8;

    font-family: "DynaPuff", sans-serif;
    font-weight: 500;
    font-size: 30px;

    border: none;
    border-radius: 4px;

    cursor: pointer;
}

.menu
.credit-btn {
    width: 200px;
    font-weight: 300;
    font-size: 30px;
    background-color: #ffda08;
}

.credit {
    text-align: center;
}

button:hover {
    size: 105%;
}

header {
    display: flex;
}

.menu {
    margin: 100px auto 0px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 500px;
    gap: 50px;
}

.grid {
    margin: 10px auto 0px auto;
    width: 450px;
    height: 450px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
}

.cell {
    background-color: #00b4d8;
    border-radius: 4px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    font-weight: 100;
    font-size: 50px;
}

main.wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
  

@media (max-width: 1100px) {
    main.wrapper {
        grid-template-columns: 1fr;
    }
}
  

.score {
    margin: auto 50px auto 50px;
    font-size: 40px;
    font-weight: 300;
    text-align: center;
}

.rack {
    padding: 20px 20px 50px 20px;
    border-top: 1px solid #ddd;
    width: 40%;
    margin: 0px auto 0px auto;
    background-color: white;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 50px;
    background-color: #1982c4;
    border-radius: 10px;
}

.tile {
    cursor: grab;
    user-select: none;
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    background-color: khaki;
    border-radius: 4px;
    font-weight: 400;
    font-size: 50px;
}


.tile:active{
    cursor: grabbing;
    transform: scale(105%);
}

.tile.selected {
    border: 5px solid black;
}

.center {
    display: grid;
    place-items: center;
}

.returnBtn {
    padding: 12px 20px;
    width: 200px;

    background-color: #70d6ff;

    font-family: "DynaPuff", sans-serif;
    font-weight: 300;
    font-size: 20px;

    border: none;
    border-radius: 4px;

    cursor: pointer;
}

#scoreA {
    color: blue;
}

#scoreB {
    color: red;
}

#endTurnBtn {
    padding: 12px 20px;
    width: 200px;

    background-color: #70d6ff;

    font-family: "DynaPuff", sans-serif;
    font-weight: 400;
    font-size: 30px;

    border: none;
    border-radius: 4px;

    cursor: pointer;
}

.modal {
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.3s ease-in-out;
    z-index: -1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-inner {
    background-color: white;
    border-radius: 5px;
    padding: 15px 25px;
    text-align: center;
    width: 380px;
}

.modal.open {
    opacity: 1;
    z-index: 999;
}

.modal-inner
h2 {
    font-weight: 750;
    font-size: 50px;
    margin: 0;
}

.modal-inner
p {
    white-space: pre-line;
    line-height: 24px;
    margin: 30px 0;
}

.modal-inner
button {
    margin-top: 30px;
    padding: 12px 20px;
    width: 150px;
    font-size: 16px;

    background-color: rgb(54, 255, 47);

    font-family: "DynaPuff", sans-serif;
    font-weight: 750;
    font-size: 20px;

    border: none;
    border-radius: 4px;

    cursor: pointer;
}

.help-btn {
    padding: 12px 20px;
    width: 100px;

    background-color: #ffda08;

    font-family: "DynaPuff", sans-serif;
    font-weight: 300;
    font-size: 20px;

    border: none;
    border-radius: 4px;
    margin-left: auto;

    cursor: pointer;
}