html, body, button, p {
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

body {
    min-height: 100vh;
    height: fit-content;
    touch-action: manipulation;
}

button {
    cursor: pointer;
}

a {
    color: white;
    text-decoration-line: unset;
}

.hide {
    display: none !important;
}

#header {
    display: flex;
    width: 100%;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    background-color: #111;
    border-bottom: 1px solid #3a3a3c;
    padding: 10px 0;
}

#header > * {
    align-self: flex-end;
    color: white;
}

#header > *:hover:not(#title) {
    color: #767676 !important;
}

#title {
    display: flex;
    justify-content: center;
    -webkit-justify-content: center;
    text-align: center;
    flex-grow: 1;
    font-size: 37px;
    font-weight: 900;
    color: white;
    font-family: 'Roboto Slab', serif;
    line-height: 0.8;
    cursor: default;
}

#page-body {
    width: 100vw;
    min-height: 100vh;
    height: 100%;
    background-color: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#stats-icon {
    margin-right: 10px;
    width: 24px;
    cursor: pointer;
    font-size: 24px;
}

.material-icons {
    cursor: pointer;
}

#settings-icon {
    margin-right: 10px;
}

#page-wrap {
    max-width: 1440px;
    width: 50vw;
    height: 100%;
}

#game-wrap {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    height: 100%;
    align-items: center;
}

#game-board-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

#keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: fit-content;
    width: 95%;
    max-width: 500px;
}

#keyboard .row{
    display: flex;
    margin-bottom: 10px;
    width: 100%;
    justify-content: center;
    -webkit-justify-content: center;
}

#keyboard button {
    flex: 1;
    display: flex;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: unset;
    margin-right: 6px;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: white;
    border-radius: 4px;
    max-width: 45px;
    height: 58px;
    border: 1px solid white;
}

#keyboard button:last-of-type {
    margin-right: 0;
}

.big {
    flex: 1.5 !important;
    max-width: unset !important;
}

.key-spacer {
    flex: 0.5;
}

#game-board {
    display: flex;
    flex-direction: column;
    width: 100vw !important;
    position: relative;
}

#game-board .row {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 5px;
}

.game-row {
    display: flex;
    justify-content: center;
    -webkit-justify-content: center;
}

.game-row:last-child{
    margin-bottom: 0;
}

.letter {
    display: flex;
    font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: white;
    border: 2px solid #3a3a3c;
    height: 3.75rem;
    width: 3.75rem;
    align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    cursor: default;
    margin: 2.5px;
}

.right {
    border-color: rgb(94 155 70);
    background-color: rgb(94 155 70);
}

.sorta {
    border-color: rgb(167 149 51);
    background-color: rgb(167 149 51);
}

.wrong {
    border-color: #3a3a3c;
    background-color: #3a3a3c;
}

#keyboard .right {
    border-color: rgb(94 155 70);
    background-color: rgb(94 155 70);
}

#keyboard .sorta {
    border-color: rgb(167 149 51);
    background-color: rgb(167 149 51);
}

#keyboard .wrong {
    border-color: #3a3a3c;
    background-color: #3a3a3c;
}

#close-button-wrap {
    position: absolute;
    top: 10px;
    right: 10px;
    line-height: 0;
    fill: white;
}

.close-button {
    background-color: unset;
    line-height: 0;
}

#how-to-play-overlay {
    background-color: #121213;
    position: absolute;
    top: -51px;
    width: 100vw;
    min-height: 100vh;
    height: fit-content;
    z-index: 6;
}

#how-to-play {
    max-width: 500px;
    width: 100vw;
    margin: auto;
}

#how-to-play-overlay > * {
    color: white;
    font-family: monospace;
}

#how-to-play-title-bar {
    max-width: 500px;
    position: relative;
    margin: auto;
}

#how-to-play-title-bar h2 {
    text-align: center;
    line-height: 24px;
    font-size: 24px;
    font-weight: normal;
}

#how-to-play-title-bar #close-button-wrap {
    top: 0;
    right: 10px;
}

#how-to-play > p {
    font-size: 16px;
    padding: 10px;
}

#tile-examples {
    padding: 10px;
}

#tile-examples p {
    font-size: 16px;
    margin-left: 10px;
    flex-grow: 1;
    width: 70%;
}

div[id$='-example'] {
    display: flex;
    align-items: center;
}

#last-rules-line {
    font-size: 16px;
    font-weight: bold;
}

.light-background #how-to-play-overlay {
    background-color: white;
}

.light-background #how-to-play-overlay > * {
    color: black;
    font-family: monospace;
}

#help-icon {
    margin-left: 10px;
}

#menu-icon {
    margin-left: 10px;
    cursor: pointer;
}

#menu {
    width: 100%;
    max-width: 480px;
    height: calc(100% - 51px);
    height: -webkit-fill-available;
    border-right: 1px solid white;
    background-color: #111;
    z-index: 2;
    position: absolute;
    left: 0;
    top: 0;
}

.light-background #menu {
    border-right: 1px solid;
    background-color: white;
}

.menu-item {
    font-size: 28px;
    font-family: 'Roboto Slab';
}

#menu-list {
    display: flex;
    list-style-type: none;
    flex-direction: column;
    padding: 15px;
    margin: 0;
}

#results-overlay {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 5;
}

#results {
    position: relative;
    margin: auto;
    max-width: 100vw;
    width: 500px;
    border-radius: 5px;
    background-color: #121213;
    box-shadow: 0px 0px 3px #767676;
    z-index: 5;
}

#results > * {
    text-transform: uppercase;
    color: white;
    font-family: monospace;
    padding: 10px;
}

#results-title-bar {
    display: flex;
    position: relative;
    align-items: center;
    padding-bottom: 0;
}

#resultsTitle {
    margin: auto;
    width: fit-content;
    line-height: 24px;
    font-family: monospace;
    font-size: 24px;
}

#games-played-wrap > * {
    width: calc(100% / 3);
}

#games-played-wrap p:not(:last-child) {
    color: white;
    padding: .25rem;
    padding-bottom: 0;
    padding-top: 10px;
    font-size: 18px;
    line-height: 18px;
    font-family: monospace;
    text-align: center;
}

#games-played-wrap p:last-child {
    background-color: unset;
    color: white;
}

#max-streak {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#stats {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-wrap: wrap;
}

#stats-icon-wrap {
    cursor: pointer;
}

#games-played {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#word-stats {
    flex-grow: 1;
    display: flex;
}

#word-stats > * {
    display: flex;
    flex-direction: column;
}

#social {
    display: flex;
    justify-content: space-around;
    padding-top: 0;
    border-top: 1px solid white;
    padding-top: 10px;
    margin: 10px;
    margin-bottom: 0;
    margin-top: 0;
}

.light-background #social {
    border-top: 1px solid black;
}

#timeout-counter {
    text-align: center;
    font-size: x-large;
    font-weight: 600;
}

#share-button {
    cursor: pointer;
    background: rgb(94 155 70);
    padding: 10px 30px;
    color: white;
    text-transform: uppercase;
    border-radius: 3px;
    font-size: 22px;
    font-weight: 600;
}

#share-button:hover {
    background: rgb(73, 121, 54);
}

#settings-overlay {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(24, 24, 24);
    z-index: 5;
}

#settings {
    position: relative;
    margin: auto;
    margin-top: 1rem;
    max-width: 100vw;
    width: 500px;
    height: 100%;
    z-index: 5;
}

#settings > * {
    text-transform: uppercase;
    color: white;
    font-family: monospace;
    padding: 10px;
    line-height: 20px;
    font-size: 14px;
}

#settings > *:not(:first-child) {
    padding-top: 20px;
    padding-bottom: 20px;
}

#settings-title-bar {
    display: flex;
    position: relative;
    align-items: center;
    padding-bottom: 0;
}

#settings-title {
    margin: auto;
    width: fit-content;
    line-height: 24px;
    font-size: 24px;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 10px;
    margin-right: 10px;
}

.settings-option:not(:last-child) {
    border-bottom: 1px solid white;
}

#hard-mode-text-wrap {
    display: flex;
    flex-direction: column;
}

.smaller-text {
    font-size: smaller;
}

#small-pop-up-wrap {
    position: absolute;
    top: 25%;
    width: 100%;
    z-index: 5;
    transform: translate(0, -50%);
}

#small-pop-up {
    width: fit-content;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
    margin: auto;
    background-color: #000;
    font-family: sans-serif;
}

#small-pop-up-text {
    font-size: 1rem;
    color: white;
    font-family: monospace;
}

.darken{
    fill: #767676 !important;
}

.cls-1 {
    fill: white;
}

#stats-icon path {
    fill: #111;
}

div[id*="winPercent"] > * {
    padding: 0.25rem;
}

div[id*="winPercent"] > p {
    background-color: white;
    color: black;
    font-family: monospace;
    font-size: 18px;
}

div[id*="winPercent"]:first-child {
    padding-left: 0;
    border-right: 1px solid white;
}

div[id*="winPercent"]:last-child {
    padding-right: 0;
    border-left: 1px solid white;
}

.light-background div[id*="winPercent"]:last-child {
    border-left: 1px solid black;
}

.light-background div[id*="winPercent"]:first-child {
    border-right: 1px solid black;
}

.win-percent-divider p {
    font-family: monospace;
    font-kerning: none;
}

.win-percent-divider > div {
    display: flex;
}

#games-played-wrap p {
    font-size: 18px;
    line-height: 18px;
    font-family: monospace;
    text-align: center;
    color: black;
}

#winPercent7 {
    margin-bottom: 0;
}

#timer > p:first-child {
    font-size: 16px;
    text-align: center;
}

.win-percent-divider p:first-child {
    flex-grow: 1;
}

#games-played-wrap p:last-of-type {
    justify-content: center;
    -webkit-justify-content: center;
    display: flex;
    flex-direction: column;
    font-size: 3rem !important;
    line-height: 3rem !important;
    padding-bottom: 5px;
}

.flip-up {
    animation-name: flip-tile-up;
    animation-duration: .25s;
}

.flip-down {
    animation-name: flip-tile-down;
    animation-duration: .25s;
}

.fade-in {
    animation-name: fade-box-in;
    animation-duration: .5s;
}

.fade-out {
    animation-name: fade-box-out;
    animation-duration: .5s;
}

.push-up {
    animation-name: push-tile-up;
    animation-duration: .25s;
}

.push-down {
    animation-name: push-tile-down;
    animation-duration: .25s;
}

.slide-right {
    animation-name: slide-right;
    animation-duration: .75s;
}

.slide-left {
    animation-name: slide-left;
    animation-duration: .75s;
}

@keyframes fade-box-in {
    from {
        opacity: 0;
    }
  
    to {
        opacity: 100 !important;
    }
}

@keyframes fade-box-out {
    from {
        opacity: 100 !important;
    }
  
    to {
        opacity: 0;
    }
}

@keyframes flip-tile-up {
    from {
        transform: rotate3d(1, 0, 0, 0deg);
    }
  
    to {
        transform: rotate3d(1, 0, 0, 90deg);
    }
}

@keyframes flip-tile-down {
    from {
        transform: rotate3d(1, 0, 0, 90deg);
    }
  
    to {
        transform: rotate3d(1, 0, 0, 0deg);
    }
}

@keyframes push-tile-up {
    from {
        transform:translateY(0px);
        box-shadow: none;
    }

    to {
        transform:translateY(15px);
        box-shadow: 0 0 5px rgb(109, 109, 109);
    }
}

@keyframes push-tile-down {
    from {
        transform:translateY(15px);
        box-shadow: 0 0 5px rgb(109, 109, 109);
    }

    to {
        transform:translateY(0px);
        box-shadow: none;
    }
}

@keyframes slide-right {
    from {
        left: -481px;
    }
    to{
        left: 0;
    }
}

@keyframes slide-left {
    from {
        left: 0;
    }
    to{
        left: -481px;
    }
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}
  
/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
  
/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #777;
    -webkit-transition: .4s;
    transition: .4s;
}
  
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}
  
input:checked + .slider {
    background-color: #549354;
}
  
input:focus + .slider {
    box-shadow: 0 0 1px #549354;
}
  
input:checked + .slider:before {
    -webkit-transform: translateX(14px);
    -ms-transform: translateX(14px);
    transform: translateX(14px);
}
  
  /* Rounded sliders */
.slider.round {
    border-radius: 34px;
}
  
.slider.round:before {
    border-radius: 50%;
}

/* Light theme */

.light-background {
      background-color: #fff !important;
}

.light-background-text {
      color: black !important;
}

.light-letter {
      border: 2px solid #c3c3c3;
}

.light-close-button {
      fill: white !important;
}

#settings-overlay.light-background .settings-option:not(:last-child) {
    border-bottom: 1px solid black;
}

.dark-close-button {
      fill: black;
}

.light-letter {
    color: black;
}

#keyboard .light-keebButton {
      background-color: unset;
      border: 1px solid #333;
      color: black;
}

#keyboard .light-keebButton.right {
    border-color: rgb(107 187 76);
    background-color: rgb(107 187 76);
}

#keyboard .light-keebButton.sorta {
    border-color: rgb(245 217 64);
    background-color: rgb(245 217 64);
}

#keyboard .light-keebButton.wrong {
    border-color: #b1b1b1;
    background-color: #b1b1b1;
}

.light-letter.right {
    border-color: rgb(107 187 76);
    background-color: rgb(107 187 76);
}

.light-letter.sorta {
    border-color: rgb(245 217 64);
    background-color: rgb(245 217 64);
}

.light-letter.wrong {
    border-color: #b1b1b1 !important;
    background-color: #b1b1b1 !important;
}

#results.light-results {
    background-color: white;
}

.light-results>*{
    color: black;
}

.light-results #timer>*{
    color: black;
}

#results.light-results #resultsTitle {
    color: black;
}

#results #games-played-wrap {
    display: flex;
}

#results #games-played-wrap {
    border-top: 1px solid white;
}

#results #games-played-wrap {
    border-top: 1px solid white;
    border-bottom: 1px solid white;
}

#results #streak {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#results.light-results #games-played-wrap {
    border-top: 1px solid black;
}

#results.light-results #games-played-wrap p {
    color: black;
}

#results.light-results #games-played > p:last-child{
    background-color: white;
    color: black;
}

#results.light-results div[id*="winPercent"]>p {
    background-color: black;
    color: white;
}

#results.light-results .win-percent-divider p {
    color: black;
}

#header.header-light {
    background-color: unset;
}

#header.header-light > * {
    color: black;
}

#header.header-light #stats-icon > rect {
    fill: black;
}

.header-light #title {
    color: black;
}

.high-contrast-mode #keyboard .sorta {
    background-color: #E66100;
    border-color: #E66100;
}

.high-contrast-mode .sorta {
    background-color: #E66100;
    border-color: #E66100;
}

.high-contrast-mode #keyboard .right {
    background-color: #7354ab;
    border-color: #7354ab;
}

.high-contrast-mode .right {
    background-color: #7354ab;
    border-color: #7354ab;
}

.high-contrast-mode input:checked + .slider {
    background-color: #7354ab;
    border-color: #7354ab;
}

.high-contrast-mode #share-button {
    background-color: #7354ab;
}

.high-contrast-mode #share-button:hover {
    background-color: #533985;
}

@media screen and (max-width: 500px) { 
    #results{
        border-radius: 0;
    }
}

#footer {
    position: absolute;
    bottom: 0;
    display: flex;
    vertical-align: bottom;
    align-self: end;
    color: black;
    justify-content: space-between;
    width: -webkit-fill-available;
    color: white;
}

.light-background #footer {
    color: black;
}

#timers-wrap {
    display: flex;
}

#timers-wrap > * {
    width: calc(100% / 3);
}

#timers-wrap p {
    color: white;
    text-align: center;
}

.light-background #timers-wrap p {
    color: black;
}

#last-round-timer-wrap {
    color: white;
    text-align: center;
}

.light-background #last-round-timer-wrap {
    color: black;
}

#last-round-timer-wrap h4{
    margin-top: 0;
    margin-bottom: 10px;
}

#last-round-time {
    margin-bottom: 10px;
}

.light-background #average-round-timer-wrap {
    border-left: 1px solid black;
    border-right: 1px solid black;
    color: black;
}

#average-round-timer-wrap {
    border-left: 1px solid white;
    border-right: 1px solid white;
    color: white;
}

#no-games {
    font-family: monospace;
    color: black;
    text-align: center;
    font-size: 16px;
    padding-top: 10px;
}

#guess-distribution-wrap {
    display: flex;
    flex-direction: column;
    color: black;
}

#guess-tables-wrap {
    display: flex;
    max-height: 195px;
    height: 195px;
}

#guess-distribution-wrap > h2 {
    text-align: center;
}

.guess-table-word-label {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.guess-table {
    display: flex;
    flex-direction: column;
    width: calc(100% / 3);
    height: 100%;
    justify-content: flex-end;
    color: white;
}

.light-background .guess-table {
    color: black;
}

.light-background .guess-table:not(:last-child) {
    border-right: 1px solid black;
}

.guess-table:not(:last-child) {
    border-right: 1px solid white;
}

.guess-table-column-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.light-background .guess-table-label {
    color: black;
}

.guess-table-label {
    text-align: center;
    color: white;
}

.guess-table-bar {
    padding-top: 1px;
    line-height: 13px;
    max-height: -webkit-fill-available;
    min-height: 1px;
    text-align: center;
    width: 100%;
    background: white;
    color: black;
}

.light-background .guess-table-bar {
    background-color: black;
    color: white;
}

.guess-table-columns {
    display: flex;
    max-height: 90%;
    height: 90%;
    justify-content: center;
    -webkit-justify-content: center;
}

.light-background .guess-table-word-label {
    color: black;
    font-weight: bold;
    font-size: 14px;
}

#guess-distribution-wrap h4 {
    margin: 10px;
    text-align: center;
    color: white;
}

.light-background #guess-distribution-wrap h4 {
    color: black;
}

.light-background .guess-table-bar.right {
    background-color: rgb(107 187 76);
    color: black;
}

.guess-table-bar.right {
    background-color: rgb(94 155 70);
}

.high-contrast-mode .guess-table-bar.right {
    background-color: #7354ab;
    color: white;
}

.light-background #guess-time-average {
    color: black;
}

#guess-time-average {
    text-align: center;
    color: white;
}

.not-visible {
    visibility: hidden;
}

#timers {
    display: flex;
    position: relative;
    justify-content: center;
    -webkit-justify-content: center;
}

#fake-timer {
    position: absolute;
}

.red {
    color: #d71c1c;
}

#patch-notes {
    font-size: 12px;
    padding: 10px;
}

#patch-notes-title {
    text-decoration: underline;
}

#patch-notes > p {
    margin-top: 3px;
}

.mobile .keebButton {
    height: 3rem !important;
}

.mobile .letter {
    height: 3.5rem;
    width: 3.5rem;
    font-size: 28px;
}

.small {
    font-size: 16px !important;
    height: 2rem !important;
    width: 2rem !important;
}

#three-five-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: scroll;
    position: relative;
    max-height: 400px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

#three-five-wrap #game-board {
    margin-bottom: 20px;
}

#three-five-wrap #game-board:first-of-type {
    margin-top: 30px;
}

#three-five-wrap::-webkit-scrollbar {
    display: none;
}

#three-five-wrap::after {
    display: block;
    width: 100%;
    height: 20px;
    position: fixed;
    bottom: 0;
    background-color: white;
    box-shadow: 0 10px 12px 10px white;
}

.light-background .shader {
    background-color: white;
    color: white;
    box-shadow: 0px 5px 20px 10px white, 0 -5px 20px 10px white;
}

.shader {
    display: block;
    width: 100%;
    height: 30px !important;
    z-index: 1;
    position: sticky;
    top: 0;
    bottom: 0;
    background-color: #111;
    color: #111;
    box-shadow: 0px 5px 20px 10px #111, 0 -5px 20px 10px #111;
}