:root {
    --tile-size: 8rem;
    --grid-gap: 10px;
    --white: #fff;
    --shade-1: #d7dadc;
    --shade-2: #818384;
    --shade-3: #565758;
    --shade-4: #3a3a3c;
    --shade-5: #272729;
    --shade-6: #1a1a1b;
    --shade-7: #121213;
    --black: #000;
    --green: #23b846;
    --light-green: #6aaa64;
    --light-yellow: #c9b458;
    --yellow: #e3cd52;
    --background: transparent;
    --hover-background: var(--shade-1);
    --color-correct: var(--light-green);
    --color-present: var(--light-yellow);
    --color-absent: var(--shade-1);
    --primary-text: var(--shade-5);
    --secondary-text: var(--shade-2);
    --icon-color: var(--shade-2);
    --tile-background: var(--variblue-hover);
    --tile-outline: var(--variblue-bordercolor);
    --tile-highlight: var(--variblue-bordercolor);
    --background: var(--shade-7);
    --hover-background: var(--shade-5);
    --color-correct: var(--green);
    --color-present: var(--yellow);
    --color-absent: var(--shade-2);
    --primary-text: var(--shade-1);
    --secondary-text: var(--shade-3);
    --icon-color: var(--shade-2);
}
@font-face {
font-family: "TestFont";
src: url("https://variantus.de/fonts/BalooBhaijaan2-VariableFont_wght.ttf");
}
* {
    box-sizing: border-box;
}
body {
    transition: none;
}
#gameContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    max-width: 555px;
    margin: 0 auto;
    gap: 1rem;
    padding: 2rem 0;
    font-family: "TestFont";
    color: var(--white);
}
.grid-container {
    position: relative;
    width: inline;
    background: transparent;
}
.button-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    top: 0px;
    left: calc(100% + 2rem);
}
.msg {
    position: relative;
    display: block;
    flex: 1 1 0;
    flex-direction: column;
    gap: var(--grid-gap);
    background: rgba(0,0,0,0.25);
    margin-left:-200px;
    padding: 2rem;
    top: -430px;
    height: 300px;
    width: 555px;
    font-weight: 500;
    font-size: 1.5rem;
    text-align: center;
    justify-content: center;
    line-height: calc(var(--tile-size) - 50px);
    font-family: "TestFont";
}
button {
    position: relative;
    padding: 0.75rem;
    color: var(--icon-color);
    background-color: transparent;
    font-family: "TestFont";
    outline: none;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    font-weight: 300;
    font-size: 1.5rem;
}
button span {
    transition: 0s;
}
button:hover, button.active {
    color: var(--primary-text);
    background-color: var(--variblue-hover);
}
#gameGrid {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: var(--grid-gap);
    background: var(--variblue-backgroundcolor) url('../layout/bgpattern.png') repeat 50% 50%;
    margin-left:-200px;
    padding: 2rem;
    color:var(--variblue-fontcolor);
    border: 2px solid var(--variblue-bordercolor);
    width:555px;
    margin-left:-200px;
    position: static;
    margin-top: 5px;
    font-size: 4rem;
    text-align: center;
    border-radius: 1rem;
}
.tile-row {
    position: relative;
    display: flex;
    gap: var(--grid-gap);
    justify-content: center;
}
.tile-row::before {
    content: '·';
    position: absolute;
    top: 50%;
    left: -1.5rem;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #FFFFFF;
    opacity: 0;
    transition: 0.25s cubic-bezier(0.5, 0, 0.2, 1);
}
.tile {
    position: relative;
    height: var(--tile-size);
    width: var(--tile-size);
    background-color: var(--tile-background);
    border: 2px solid var(--variblue-bordercolor);
    border-radius: 1rem;
    font-size: 4rem;
    line-height: calc(var(--tile-size) - 1px);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}
.tile.highlight {
    animation: pulse 0.08s linear forwards;
    border: 2px solid var(--tile-highlight);
}
.tile.correct {
    border: 2px solid var(--variblue-bordercolor);
    background-color: var(--color-correct);
    color: #fff;
}
.tile.present {
    border: 2px solid var(--variblue-bordercolor);
    background-color: var(--color-present);
}
.tile.absent {
    border: 2px solid var(--variblue-bordercolor);
    background-color: var(--color-absent);
    color: #fff;
}
#overlayContainer {
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    opacity: 0;
    pointer-events: none;
}
#overlayContainer.active {
    opacity: 1;
    pointer-events: all;
}
#rulesContainer {
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    opacity: 0;
    pointer-events: none;
}
#rulesContainer.active {
    opacity: 1;
    pointer-events: all;
}
.overlay {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem 0;
}
.overlay-header {
    margin-bottom: 2rem;
}
.overlay-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}
.select-container {
    position: relative;
    display: flex;
    gap: 1rem;
}
#closeButton {
    position: absolute;
    top: 2rem;
    right: 2rem;
}
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
   }
    50% {
        transform: scale(1.14);
   }
}
.tile.shake {
    animation:shake 820ms cubic-bezier(.36,.07,.19,.97) both;
    transform:translate(0,0)
} 
@keyframes shake {
10%,
90% {
    transform:translate(-1px,0)
}
20%,
80% {
    transform:translate(2px,0)
}
30%,
50%,
70% {
    transform:translate(-4px,0)
}
40%,
60% {
    transform:translate(4px,0)
}
}
.showMSG {
    font-size: 4rem;
    line-height: calc(var(--tile-size) - 1px);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    -webkit-animation: fadeinout 5s linear forwards;
    animation: fadeinout 5s linear forwards;
}
@-webkit-keyframes fadeinout {
  0%,100% { opacity: 0; }
  50% { opacity: 1; }
}
@keyframes fadeinout {
  0%,100% { opacity: 0; }
  50% { opacity: 1; }
}


.keyboard-base {
    max-width: 1085px;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: repeat(30, 30px);
    grid-template-rows: repeat(5, 60px);
    grid-gap: 5px;
}

div.keyboard {
    color:var(--variblue-fontcolor);
    background:var(--variblue-backgroundcolor);
    border: 2px solid var(--variblue-bordercolor);
    width:555px;
    margin-left:-200px;
    position: static;
    margin-top: 20px;
    font-size: 4rem;
    text-align: center;
    border-radius: 1rem;
}

ul.keyboard {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
    display: inline-block;
    padding-top: 14px;
    padding-left:10px;
}

.key {
    background-color: var(--variblue-bordercolor);
    border: 1px solid var(--variblue-hover);
    border-radius: 5px;
    grid-column: span 2;
    font-size: 20px;
    text-align: center;
    float: left;
    width: 46px; 
    height: 46px;
    margin: 1px;
    line-height: 48px;
    font-weight: bold;
    cursor: pointer;
}
.key:hover {
    background-color: var(--variblue-backgroundcolor);
}
.divider {
    clear: both;
    height: 10px;
    display: flex;
    width: 500px;
    margin-bottom: 10px;
}
.kred {
    background-color: var(--varired-backgroundcolor);
    border-color: var(--varired-bordercolor);
    font-weight: normal;
}
.kred:hover {
    background-color: var(--varired-hover);
}
.key.kred {
    width: 174px;
    font-size: 12px;
    line-height: 48px;
}
.key.kred i {
    font-weight:bold;
    font-size:24px;
    line-height:40px;
    padding-left:10px;
}

.key.kspace {
    width: 94px;
}
.key.correct {
    background-color: var(--color-correct);
}
.key.absent {
    background-color: var(--color-absent);
}
.key.present {
    background-color: var(--color-present);
}
.key.highlight {
    animation: pulse 0.08s linear forwards;
}
.key.kAE, .key.kOE, .key.kUE {
    line-height: 48px;
}
.nachricht {
    color:var(--variblue-fontcolor);
    background:var(--variblue-backgroundcolor);
    border: 2px solid var(--variblue-bordercolor);
    width:535px;
    margin-left:-190px;
    position: absolute;
    top: 20px;
    font-size: 4rem;
    text-align: center;
    border-radius: 1rem;
    display: block;
    min-height: 100px;
    opacity: 0.5;
}
.nachricht div {
    margin: 20px auto;
    line-height: normal;
}
.nachricht div small {
    font-size: 20px;
    font-weight: 200;
    line-height: 50px;
}