body { background-color: #1f2937; color: #fff; --columns: 2; --rows: 2; } body.wide { --columns: 4; --rows: 1; } .centering { display: flex; flex-direction: column; align-items: center; } #main { display: grid; grid-template-columns: repeat(var(--columns), max-content); grid-template-rows: repeat(var(--rows), max-content); gap: 2em; } .solution { text-align: center; width: inherit; display: block; font-size: x-large; display: none; } .row { margin-top: 0; margin-bottom: 0; } .invalid { color: red; } .correct { background-color: rgb(0 204 136); color: #000; } .wrong-position { background-color: rgb(255 204 0); color: #000; } .cell { position: relative; display: inline-flex; justify-content: center; align-items: center; padding: 0.5em; width: 1em; height: 1em; font-family: monospace; font-size: xx-large; border: 1px solid #bbb; vertical-align: top; } .cell.done { height: 0.5em; } .counter { display: none; } .count .counter { display: block; position: absolute; bottom: 0px; right: 0px; font-size: smaller; } #keyboard { margin-top: 1em; } /* .keyboard-row:nth-child(2) { margin-left: 0.75em; } .keyboard-row:nth-child(3) { margin-left: 1.5em; } */ .key { width: 1.5em; height: 1.5em; font-size: xx-large; margin: 0.05em; vertical-align: top; color: #fff; background-color: rgb(107 114 128); border-color: rgb(55 65 81); cursor: pointer; } #backspace, #enter { width: 3em; margin: 0.1em; display: inline-flex; justify-content: center; align-items: center; } #copyarea { visibility: hidden; background-color: #1f2937; color: #fff; } @media (max-width: 600px) { #main { gap: 10px; } .cell { box-sizing: border-box; padding: 0.5em; width: 9vw; height: 9vw; } .cell.done { height: 4.5vw; } .key { box-sizing: border-box; width: 7.6vw; height: 7.6vw; font-size: x-large; } #backspace, #enter { width: 15.2vw; height: 7.6vw; } }