:root {
    --animation-time: 100ms;
}

body {
    display: flex;
    height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Helvetica, Arial, sans-serif;
    text-align: center;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #def0ff;
}

.header-title {
    display: inline;
    margin: 0;
    font-size: 70px;
    color: #717372;
    font-weight: bold;
    width: fit-content;
}

#restart-button {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 25px;
    background-color: #757f8b;
    border: none;
    border-radius: 3px;
    color: #def0ff;
    padding: 5px 20px;
    margin: 20px 0;
    transition: background-color 300ms;
}
#restart-button:hover {
    background-color: #59616a;
}

#main {
    width: fit-content;
}

#above-game {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 2% 0%;
}

#game-container {
    position: relative;
    display: block;
    top: 0;
    left: 0;
    width: 512px;
    height: 512px;
}
#game {
    display: flex;
    width: 500px;
    height: 500px;
    flex-wrap: wrap;
    background-color: #a0adbb;
    border: 6px solid #a0adbb;
    border-radius: 5px;
}
#lose-screen {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    justify-content: center;
    align-items: center;
    background-color: rgba(100, 150, 200, 0.5);
    color: #717372;
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 90px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 500ms;
}
.invisable {
    opacity: 0 !important;
}

.gridSquare {
    display: flex;
    box-sizing: border-box;
    background-clip: border-box;
    width: 25%;
    height: 25%;
    font-size: 45px;
    font-weight: bold;
    justify-content: center;
    align-items: center;
    background-color: #b5c1cd;
    color: transparent;
    border: 5px solid #a0adbb;
    border-radius: 10px;
}

.animation-square {
    position: absolute;
    transition: top var(--animation-time), 
        left var(--animation-time), 
        background-color calc(var(--animation-time) * 0.25),
        color calc(var(--animation-time) * 0.5) !important;
    border: none;
    border-radius: 5px;
    margin: 5px;
}

.merge-square {
    color: transparent !important;
}

.x3 {
    background: #dae4ee;
    color: #717372;
}

.x6 {
    background-color: #cae0ec;
    color: #717372;
}

.x12 {
    background-color: #7ab1f4;
    color: white;
}

.x24 {
    background-color: #7595f5;
    color: white;
}

.x48 {
    background-color: #5f7cf5;
    color: white;
}

.x96 {
    background-color: #3d5bf6;
    color: white;
}

.x192 {
    background-color: #71ceed;
    color: white;
}

.x384 {
    background-color: #63cced;
    color: white;
}

.x768 {
    background-color: #51c6ed;
    color: white;
}

.x1536 {
    background-color: #44c7ee;
    color: white;
}

.x3072 {
    background-color: #123456;
    color: white;
}

.x6144 {
    background-color: #0e2940;
    color: white;
}

.x12288 {
    font-size: 30px;
    background-color: #051629;
    color: white;
}