html, body {
    padding: 0;
    margin: 0;
    font-family: Roboto, sans-serif;
    font-size: 20px;
    background-color: #eee;
    color: #000;
    overflow-x: hidden;
    overflow-y: auto;
}

#game-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

a {
    text-decoration: none;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#canvas {
    display: block;
}

/*=============================================*/

#topheader {
    user-select: none;
    position: absolute;
    text-align: center;
    border-bottom: 0.05em solid #000;
    color: #000;
    font-weight: 800;
    display: grid;
    height: 100%;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: auto 1fr auto auto auto;
}

#topheader.hidden {
    display: none;
}

#topheader-home {
    text-align: left;
    font-size: 1.25em;
    grid-row: 1 / span 2;
    grid-column: 1;
    align-self: center;
}

#topheader .label1 {
    text-align: left;
    font-size: 1.5em;
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    padding-left: 0.4em;
}

#topheader .label2 {
    text-align: right;
    font-size: 0.6em;
    grid-row: 1;
    grid-column: 3;
    align-self: center;
    padding-top: 0.3em;
}

#topheader .label2.tworows {
    grid-row: 1 / span 2;
}

#topheader .label3 {
    text-align: right;
    font-size: 0.6em;
    grid-row: 2;
    grid-column: 3;
    align-self: center;
    padding-bottom: 0.3em;
}

#topheader .label3.hidden {
    display: none;
}



#topheader-stats {
    text-align: right;
    font-size: 1.25em;
    grid-row: 1 / span 2;
    grid-column: 5;
    align-self: center;
    padding-left: 0.2em;
}

.topheader-button:hover {
    cursor: pointer;
    transform: scale(1.08);
}


.topheader-button.hidden {
    display: none;
}

/*=============================================*/

#upperheader {
    user-select: none;
    position: absolute;
    text-align: center;
    font-weight: 800;
    /*color: #888;*/
    display: grid;
    /*height: 100%;*/
    grid-template-rows: 1fr 1fr;
    /*padding-top: 0.1em;*/
    grid-template-columns: auto 1fr auto;
    /*row-gap: 0.25em;*/
    color: #333;
}

#upperheader.hidden {
    display: none;
}

#upperheader .label1 {
    text-align: center;
    font-size: 0.5em;
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    text-transform: uppercase;
    padding: 0 0.25em;
    /*width: 3em;*/
}

#upperheader .label2 {
    text-align: center;
    font-size: 0.8em;
    grid-row: 2;
    grid-column: 1;
    align-self: start;
}

#upperheader .label3 {
    text-align: center;
    font-size: 0.5em;
    grid-row: 1;
    grid-column: 3;
    align-self: end;
    text-transform: uppercase;
    padding: 0 0.25em;
}

#upperheader .label4 {
    text-align: center;
    font-size: 0.8em;
    grid-row: 2;
    grid-column: 3;
    align-self: start;
}

/*=============================================*/

#tipspanel {
    user-select: none;
    position: absolute;
    font-weight: 500;
    /*display: flex;*/
    /*flex-direction: row;*/
    /*align-items: center;*/
    /*justify-content: center;*/
    color: #222;
    box-sizing: border-box;
    display: flex;
    /* align-items: center; */
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
}

#tipspanel.hidden {
    display: none;
}

#tipspanel-content {
    position: relative;
    pointer-events: all;

    /*background-color: #FFE0B2;*/
    background-color: #FFF9C4;
    border: 0.05em solid #222;
    border-radius: 0.5em;
    box-shadow: 0.1em 0.1em 0.4em 0.2em rgba(0, 0, 0, 0.6), 0.0em 0.0em 1em 1em rgba(255, 255, 255, 0.5);
    text-align: center;
    /*width: 100%;*/
    /*height: 100%;*/

    padding: 0.7em 0.4em;
    font-size: 0.8em;
}

#tipspanel-close {
    position: absolute;
    right: -0.5em;
    top: -0.5em;
    font-size: 1em;
    padding: 0.5em;
    /*color: #F4511E;*/
    /*background-color: ;*/
    /*border-radius: 1em;*/
}

#tipspanel-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#tipspanel-text .emptyline {
    display: block;
    height: 0.9em;
}

#tipspanel-text .word {
    background-color: #888888;
    color: #fff;
    border-radius: 0.4em;
    padding: 0 0.3em;
    white-space: pre;
}

#tipspanel-text .distance {
    background-color: #0277BD;
    color: #fff;
    border-radius: 0.4em;
    padding: 0 0.3em;
    line-height: 1.2em;
    margin: 0.1em 0;
    white-space: pre;
    display: inline-block;
}

#tipspanel-text .alpha {
    background-color: #F4511E;
    color: #fff;
    border-radius: 0.4em;
    padding: 0 0.3em;
}

/*#tipspanel-content .word .letter {*/
/*    background-color: #888888;*/
/*    color: #fff;*/
/*    padding: 0.1em;*/
/*}*/

/*=============================================*/
#errormessage {
    user-select: none;
    position: absolute;
    /*font-weight: 500;*/
    color: #fff;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#errormessage.hidden {
    display: none;
}

#errormessage-content {
    /*background-color: #FFE0B2;*/
    background-color: #4d0b0b;
    border-radius: 0.5em;
    box-shadow: 0.1em 0.1em 0.4em 0.2em rgba(255, 255, 255, 0.6), 0.0em 0.0em 2em 2em rgba(255, 255, 255, 0.5);
    text-align: center;
    /*width: 100%;*/
    /*height: 100%;*/

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 0.5em 2em;
    /*font-size: 1.25em;*/
    /*font-size: 0.8em;*/
}

/*=============================================*/


#statisticspanel {
    user-select: none;
    position: absolute;
    /*top: 0;*/
    /*left: 0;*/
    /*bottom: 0;*/
    /*right: 0;*/
    /*background-color: rgba(255, 255, 255, 0.5);*/
    overflow: hidden;
    font-size: 0.75em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#statisticspanel.hidden {
    display: none;
}

#statisticspanel-content {
    background-color: #fff;
    box-shadow: 0 0 1em 0.2em #555;
    display: flex;
    flex-direction: column;
    padding: 1em 0.5em;
    box-sizing: border-box;
    position: relative;
}

#statisticspanel-word {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

#statisticspanel-word.hidden {
    display: none;
}

#statisticspanel-label {
    text-align: center;
    font-size: 1em;
    font-weight: bold;
}

#statisticspanel-scorecount {
    text-align: center;
    font-weight: bold;
    color: #FFA000;
}

#statisticspanel-scorecount > i {
    padding: 0.25em 0.1em;
    font-size: 2em;
}

#statisticspanel-close {
    position: absolute;
    right: 0.5em;
    top: 0.5em;
    font-size: 1.5em;
}

#statisticspanel-statistics {
    margin-top: 1em;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    /*grid-gap: 0.2em;*/
}

.statisticspanel-statistics-label {
    text-align: center;
    font-size: 0.75em;
    align-self: end;
    /*background-color: #eee;*/
}

.statisticspanel-statistics-value {
    text-align: center;
    font-size: 2em;
    font-weight: normal;
    /*background-color: #eee;*/
}

.statisticspanel-statistics-label.perfect {
    /*background-color: #fffde7;*/
}

.statisticspanel-statistics-value.perfect {
    /*background-color: #fffde7;*/
}

#statisticspanel-distribution {
    margin-top: 1em;
}

#statisticspanel-distribution-label {
    text-align: center;
}

#statisticspanel-distribution-chart {
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    row-gap: 0.5em;
    margin-top: 1em;
}

.distribution-chart-label {
    margin: 0 0.5em;
    text-align: right;
    line-height: 1.5em;
}

.distribution-chart-bar {
    background-color: #eee;
    position: relative;
    line-height: 1.5em;
    height: 1.5em;
}

.distribution-chart-bar-fill {
    background-color: #00bcd4;
    height: 100%;
}

.distribution-chart-bar-fill.last {
    background-color: #8bc34a;
}

.distribution-chart-percent {
    margin: 0 0.5em;
    text-align: right;
    line-height: 1.5em;
}

.distribution-chart-bar-games {
    position: absolute;
    top: 0;
    margin: 0 0.2em;
}

#statisticspanel-buttons {
    margin-top: 1em;
    display: flex;
    flex-direction: row;
    gap: 0.1em;
}

.statisticspanel-button {
    border-radius: 5px;
    box-sizing: border-box;
    margin: 0 0.2em;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 3em;
    display: inline-flex;
    font-size: 1.2em;
    flex-direction: row;
    background-color: #ff6f00;
    color: #fff;
    padding: 0.2em 0.5em;
    flex: 1 1 0px;
}

.statisticspanel-button.hidden {
    display: none;
}

.statisticspanel-button:hover {
    cursor: pointer;
}

#statisticspanel-button-back {
    background-color: #737680;
}


/*=============================================*/
#bottombuttonpanel {
    user-select: none;
    position: absolute;
    overflow: hidden;
    font-size: 0.75em;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: row;
    gap: 0.1em;
}

#bottombuttonpanel.hidden {
    display: none;
}

.bottombuttonpanel-button {
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    margin: 0 0.2em;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 3em;
    display: inline-flex;
    font-size: 1.2em;
    flex-direction: row;
    background-color: #ff6f00;
    color: #fff;
    padding: 0.2em 0.5em;
    flex: 1 1 0px;
    max-width: 40%;
}

.bottombuttonpanel-button.hidden {
    display: none;
}

.bottombuttonpanel-button:hover {
    cursor: pointer;
}

#bottombuttonpanel-button-back {
    background-color: #737680;
}

/*=============================================*/

#gameoverbar {
    user-select: none;
    position: absolute;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
}

#gameoverbar.hidden {
    display: none;
}

#gameoverbar-content {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.5em;
    /*box-shadow: 0 0 1em 0.2em #555;*/
    padding: 0.5em 1.5em;
    box-sizing: border-box;
    position: relative;
}

.gameoverbar-button > .fas {
    font-size: 1.5em;
}

.gameoverbar-button {
    padding-top: 0.5em;
    color: #fff;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1em;
}

.gameoverbar-button:hover {
    cursor: pointer;
}

.gameoverbar-button.hidden {
    display: none;
}

/*=============================================*/

#tutorialpanel {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex-direction: column;
    padding: 0.5em;
}

#tutorialpanel.hidden {
    display: none;
}

#tutorialpanel-text {
    font-size: 1em;
    font-weight: 500;
    color: #555;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

#tutorialpanel-button {
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 2em;
    display: flex;
    flex-direction: row;
    background-color: #ff6f00;
    color: #fff;
}

#tutorialpanel-button.hidden {
    display: none;
}

#tutorialpanel-button:hover {
    cursor: pointer;
}

/*=============================================*/

#apppanel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(18, 19, 22, 1);
    box-sizing: border-box;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex-direction: row;
}

#apppanel.hidden {
    display: none;
}

/*=============================================*/

#menupanel {
    background-color: #eee;
    user-select: none;
    position: absolute;
    overflow: hidden;
    color: #000;
    font-weight: normal;
    display: flex;
    flex-direction: column;
}

#menupanel.hidden {
    display: none;
}

#menupanel-header {
    width: 100%;
    text-align: center;
    margin-bottom: 1em;
}

#menupanel-gamename {
    font-size: 2.5em;
    font-weight: 800;
    color: #222;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 0.1em;
}

#menupanel-gamename span {
    flex-grow: 1;
    flex-shrink: 1;
}

#menupanel-content {
    /*flex-grow: 1;*/
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#menupanel-playinapp {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#menupanel-playinapp.hidden {
    display: none;
}

#menupanel-playinapp > img {
    width: 80%;
}

#menupanel-playinapp-applabel {
    margin-top: 1em;
    margin-bottom: 0.5em;
    text-align: center;
    color: #888;
    font-weight: bold;
    font-size: 1.25em;
}

#menupanel-playinapp-playbrowser {
    margin-top: 1em;
    margin-bottom: 0.5em;
    text-align: center;
    color: #888;
    font-weight: bold;
    font-size: 1em;
    text-decoration: underline;
}

#menupanel-modes {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menupanel-back-button {
    background-color: #737680;
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 2.5em;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
}

.menupanel-back-button:hover {
    cursor: pointer;
}

#menupanel-modes.hidden {
    display: none;
}

.menupanel-section {
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.menupanel-row-two-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    width: 100%;
    box-sizing: border-box;
}

.menupanel-section-label1 {
    text-align: center;
    padding-left: 0.5em;
    padding-right: 0.5em;
    color: #555;
    font-weight: 900;
    font-size: 0.8em;
    padding-bottom: 0.125rem;
}

.menupanel-section-label2 {
    text-align: center;
    color: #888;
    font-weight: 900;
    font-size: 0.75em;
    padding: 0.25rem 0;
}

.spacer {
    height: 1px;
    width: 95%;
    background: #bbb;
    margin: 0.5em 0;
}

.menupanel-mode-button {
    background-color: #ff6f00;
    color: #fff;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 2em;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    text-decoration: none;
}

.menupanel-mode-button-half {
    flex: 1;
    width: auto;
}

.menupanel-mode-button > .label {
    font-size: 0.8em;
    font-weight: 900;
}

.menupanel-mode-button > .icon {
    width: 1.5em;
    font-size: 0.7em;
    text-align: start;
}

.menupanel-mode-button:hover {
    cursor: pointer;
    opacity: 0.95;
}

.menupanel-mode-button.hidden {
    display: none;
}

.menupanel-mode-button-othergame {
    background-color: #000300;
}

.menupanel-mode-button-back {
    background-color: #78909c;
}

#menupanel-mode-daily {
    background-color: #039be5;
}

#menupanel-mode-daily.finished {
    background-color: #388e3c;
}

#menupanel-mode-daily.lost {
    background-color: #ec407a;
}

#menupanel-mode-past {
    background-color: #546e7a;
}

#menupanel-mode-levelpacks, #menupanel-mode-help {
    background-color: #43a047;
}

#menupanel-mode-custom {
    background-color: #ff6f00;
}

#menupanel-mode-unlimited {
    background-color: #812f15;
}

#menupanel-next-word-time, #menupanel-daily-next-word-time {
    text-align: center;
    color: #888;
    font-weight: 900;
    font-size: 0.75em;
    padding: 0.25rem 0;
}



#menupanel-daily-next-word-time {
    margin-bottom: 0;
}

#menupanel-levelpacks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
}

#menupanel-levelpacks.hidden {
    display: none;
}

#menupanel-levelpacks-back {
    width: 94%;
}

#menupanel-levelpacks-back > .icon {
    width: 1.5em;
    font-size: 1.25em;
    text-align: start;
}

#menupanel-levelpacks-back > .label {
    flex-grow: 1;
    font-size: 1.25em;
    margin-right: 1.5em;
}

#menupanel-levelpacks-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

.menupanel-levelpacks-button {
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 3em;
    width: 94%;
    display: inline-flex;
    flex-direction: row;
    color: #fff;
}

.menupanel-levelpacks-button:hover {
    cursor: pointer;
}

.menupanel-levelpacks-button > .icon {
    font-size: 1.25em;
    width: 1.5em;
    text-align: start;
}

.menupanel-levelpacks-button > .icon > .fas {
    width: 1.5em;
    text-align: start;
}

.menupanel-levelpacks-button > .result {
    /*width: 1.2em;*/
    text-align: end;
}

.menupanel-levelpacks-button > .label {
    flex-grow: 1;
    display: grid;
    /*grid-template-rows: 1fr 1fr;*/
    text-transform: uppercase;
    row-gap: 0.4em;
    justify-items: start;
    /*align-items: center;*/
}

.menupanel-levelpacks-button > .label > .label2 {
    font-size: 0.7em;
}

.menupanel-levelpacks-button > .counts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-transform: uppercase;
    align-items: center;
    row-gap: 0.2em;
    /*min-width: 45%;*/
}

.menupanel-levelpacks-button > .counts > .label {
    font-size: 0.7em;
    text-align: right;
    margin-right: 1em;
}

.menupanel-levelpacks-button > .counts > .counts {
    text-align: right;
}

.menupanel-levelpacks-app-button {
    background-color: #616161;
    /*border: 0.1em solid #994200;*/
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 3em;
    width: 94%;
    display: inline-flex;
    flex-direction: row;
}

.menupanel-levelpacks-app-button:hover {
    cursor: pointer;
}

.menupanel-levelpacks-app-button > .icon {
    font-size: 1.25em;
    width: 1.5em;
    text-align: start;
}

.menupanel-levelpacks-app-button > .icon > .fas {
    width: 1.5em;
    text-align: start;
}

.menupanel-levelpacks-app-button > .label1 {
    font-size: 1.25em;
    text-align: center;
    flex-grow: 1;
}

.menupanel-levelpacks-app-button > .label2 {
    flex-grow: 1;
    text-align: start;
}

#menupanel-daily {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
}

#menupanel-daily.hidden {
    display: none;
}

#menupanel-daily-back {
    width: 94%;
}

#menupanel-daily-back > .icon {
    width: 1.5em;
    font-size: 1.25em;
    text-align: start;
}

#menupanel-daily-back > .label {
    flex-grow: 1;
    font-size: 1.25em;
    margin-right: 1.5em;
}

#menupanel-daily-buttons {
    text-align: center;
    width: 100%;
    margin-top: 0.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    max-height: 68vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 25px;
    -webkit-overflow-scrolling: touch;
}



.menupanel-daily-button {
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 2.5em;
    width: 94%;
    display: inline-flex;
    flex-direction: row;
    color: #fff;
}

.menupanel-daily-button:hover {
    cursor: pointer;
}

.menupanel-daily-button > .icon {
    width: 1.5em;
    text-align: start;
    font-size: 1.25em;
}

.menupanel-daily-button > .icon > .fas {
    width: 1.5em;
    text-align: start;
}

.menupanel-daily-button > .result {
    /*width: 1.2em;*/
    text-align: end;
    font-size: 1.25em;
}

.menupanel-daily-button > .label {
    flex-grow: 1;
    text-align: start;
    font-size: 1.25em;
}

#menupanel-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /*gap: 0.5em;*/
}

#menupanel-tutorial-button {
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 2em;
    display: flex;
    flex-direction: row;
    border: 0.15em solid #888;
    color: #888;
}

.menupanel-othergames-label {
    text-align: center;
    color: #888;
    font-weight: bold;
    font-size: 0.9em;
    margin-top: 0.2em;
    margin-bottom: 0.2em;
}

.menupanel-othergames {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

.menupanel-othergame-button {
    /*font-size: 0.8em;*/
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 2em;
    width: 80%;
    display: inline-flex;
    flex-direction: row;
    color: #fff;
    /*border: 0.1em solid #888;*/
    /*color: #888;*/
    background-color: #000300;
    justify-content: center;
}

.menupanel-othergame-button > .label {
    font-size: 1.1em;
    font-weight: bold;
}

.menupanel-othergame-button:hover {
    cursor: pointer;
}

.menupanel-othergame-button > .icon {
    width: 1.5em;
    /*font-size: 1.25em;*/
    text-align: start;
}

/*.menupanel-othergame-button > .icon > .fas {*/
/*    width: 1.5em;*/
/*    text-align: start;*/
/*}*/

.menupanel-othergame-button > .label {
    /*font-size: 1.25em;*/
}

#menupanel-tutorial-button:hover {
    cursor: pointer;
}

#menupanel-tutorial-button.hidden {
    display: none;
}

#menupanel-store {
    display: grid;
    grid-gap: 0.5em;
}

#menupanel-goal {
    text-align: center;
}

#menupanel-label {
    color: #888;
    font-weight: bold;
    font-size: 0.7em;
    position: absolute;
    right: 0.25em;
    top: 0.25em;
}



#bottomheader {
    position: absolute;
    bottom: 0;
}

#bottomheader.hidden {
    display: none;
}

#nextlevelbottom {
    width: 100%;
    text-align: center;
    text-decoration: none;
    line-height: 10vh;
    font-size: 9vh;
    /*color: #555555;*/
}

#nextlevelbottombutton {
    margin: 0 4vh;
}

#nextlevelbottom.hidden {
    display: none;
}

#end-screen {
    text-align: center;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
}

#end-screen-text {
    padding: 2vh 2vw 0;
    text-align: center;
    font-size: 7vmin;
    font-family: Roboto, serif;
    font-weight: 500;
}

#end-screen-text2 {
    padding: 2vh 2vw 4vh;
    text-align: center;
    font-size: 5vmin;
    font-family: Roboto, serif;
    font-weight: 500;
}

#end-screen-image {
    height: 50%;
    width: 100%;
    text-align: center;
    padding: 2vh 0;
}

.description {
    font-weight: bold;
    font-size: 0.7em;
    color: white;
    display: inline-block;
    padding: .25em .4em;
    line-height: 1;
    vertical-align: baseline;
    border-radius: .25rem;
    /*background-color: #7E7872;*/
    background-color: #FF6600;
    margin: .1em;
}

/*.storelinkcontainer {*/
/*    height: 6vh;*/
/*    line-height: 5vh;*/
/*    border-radius: 1vh;*/
/*    display: inline-flex;*/
/*    align-items: center;*/
/*    padding: 1vh;*/

/*    color: #ffffff;*/
/*    background-color: #FF6D00;*/
/*    border-color: #FF6D00;*/
/*}*/

#storebadgesgame {
    text-align: center;
}

#storebadgesgame.hidden {
    display: none;
}

#storelinkgame {
    width: 100%;
    text-align: center;
}

#storelinkgame.hidden {
    display: none;
}

.storelinkicon {
    height: 6vh;
}

.storelinktext {
    margin-left: 1vh;
    margin-right: 1vh;
    font-size: 6vmin;
    white-space: nowrap;
}

.storelink {
    text-decoration: none;

    height: 6vh;
    line-height: 5vh;
    border-radius: 1vh;
    display: inline-flex;
    align-items: center;
    padding: 1vh;

    color: #ffffff;
    background-color: #319c5b;
}

span.storelink:hover {
    cursor: pointer;
}

.badgeappstore {
    margin-right: 10px;
}

/*#next-level-container {*/
/*    height: 10vh;*/
/*    text-align: center;*/
/*    position: absolute;*/
/*    bottom: 0;*/
/*    width: 100%;*/
/*}*/

.score-sending-animation {
    display: inline-block;
    font-size: 2em;
}
.score-sending-animation:after {
    content: " ";
    display: block;
    width: 0.8em;
    height: 0.8em;
    margin: 0.1em;
    border-radius: 50%;
    border: 0.1em solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: score-sending-animation 2.0s linear infinite;
}
@keyframes score-sending-animation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loading.hidden {
    display: none;
}

/*==================*/

#debugbar {
    user-select: none;
    position: absolute;
    bottom: 10px;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#debugbar-prev, #debugbar-next, #debugbar-clear {
    border-radius: 5px;
    border: 2px solid #888;
    box-sizing: border-box;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 1em;
    display: inline-flex;
    color: #000;
    padding: 0.1em 0.5em;
    margin: 0 0.5em;
}

#debugbar-clear {
    margin-left: 10em;
}

/*=======================*/

#appbar {
    background-color: rgba(238, 238, 238, 0.8);
    user-select: none;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#appbar.hidden {
    display: none;
}

#appbar-content {
    background-color: #fff;
    box-shadow: 0 0 1em 0.2em #555;
    padding: 0.5em 0 1em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    box-sizing: border-box;
    position: relative;
    align-items: center;
}

.appbar-label {
    text-align: center;
    color: #888;
    font-weight: bold;
    font-size: 1.25em;
    margin-top: 0.2em;
    margin-bottom: 0.2em;
}

.appbar-button {
    font-size: 1.25em;
    font-weight: bold;

    background-color: #616161;
    color: #fff;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 2em;
    min-height: 2em;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    width: 80%;
}

.appbar-button:hover {
    cursor: pointer;
}

/*=======================*/

#appbanner {
    user-select: none;
    -webkit-user-select: none;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #333;
}

#appbanner.hidden {
    display: none;
}

#appbanner-content {
    background-color: #eee;
    box-shadow: 0 0 1em 0.2em #555;
    display: flex;
    flex-direction: column;
    padding: 0.5em;
    box-sizing: border-box;
    position: relative;
    align-items: center;
}

#appbanner-screenshot {
    overflow: hidden;
    position: relative;
}

.appbanner-screenshot-image {
    position: absolute;
}

.appbanner-screenshot-image.hidden {
    display: none;
}

#appbanner-features {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

#appbanner-features div {
    text-align: center;
    /*background-color: #cbb3b3;*/
    color: #000;
    font-weight: bold;
    border-radius: 5px;
    flex: 1 1 0px;
}

#appbanner-content .text {
    text-align: center;
    font-weight: 800;
}

#appbanner-desktop, #appbanner-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#appbanner-desktop.hidden, #appbanner-mobile.hidden {
    display: none;
}

#appbanner-desktop-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1em;
}

#appbanner-desktop-buttons .appbanner-button {
    flex: 1 1 0px;
}

.appbanner-button {
    background-color: #ff6f00;
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    padding-left: 0.5em;
    padding-right: 0.5em;
    align-items: center;
    text-align: center;
    height: 2em;
    min-height: 2em;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;

    flex: 1 1 0px;
}

.appbanner-button:hover {
    cursor: pointer;
}

#appbanner-close {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    padding: 0 0.5em;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: #cccccc;
    border: 1px solid;
    color: #555;
    cursor: pointer;
}

#appbanner-close.disabled {
    color: #aaa;
    cursor: wait;
}

/*=============================================*/

#helppanel {
    background-color: #eee;
    position: absolute;
    user-select: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#helppanel-top {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 0.2em 1em 0 1em;
}

#helppanel-label {
    margin-left: 2em;
    flex-grow: 1;
    text-align: center;
    font-weight: 800;
}

#helppanel-close {
    width: 2em;
    text-align: right;
}

#helppanel-close.hidden > i{
    display: none;
}

#helppanel-close:hover {
    cursor: pointer;
}

#helppanel-pages {
    flex-grow: 1;
}

#helppanel-pages > div {
    margin: 0 0.3em;
    padding: 0.4em;
}

#helppanel-pages > div.hidden {
    display: none;
}

#helppanel.hidden {
    display: none;
}

.helppanel-row {
    margin: 0.3em 0;
    font-size: 0.8em;
}

.helppanel-separator {
    height: 0.1em;
    /*width: 90%;*/
    background-color: #888;
    margin: 0.5em auto;
}

.helppanel-row-image {
    padding: 0 1em;
}

.helppanel-row-image > img {
    width: 100%;
}

.helppanel-buttons {
    margin: 0.4em 0;
}

.helppanel-button {
    font-weight: bold;
    border-radius: 5px;
    box-sizing: border-box;
    /*padding-left: 2em;*/
    /*padding-right: 2em;*/
    align-items: center;
    text-align: center;
    justify-content: center;
    height: 2em;
    display: inline-flex;
    flex-direction: row;
    background-color: #ff6f00;
    color: #fff;
    width: 40%;
}

.helppanel-button:hover {
    cursor: pointer;
}

.helppanel-pagination {
    margin-top: 0.5em;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

#helppanel-pagination-prev {
    grid-column: 1;
}

#helppanel-pagination-page {
    grid-column: 2;
    font-size: 1.2em;
    text-align: center;
}

#helppanel-pagination-next {
    grid-column: 3;
}

/* Topheader Hint Button Counter */
#topheader-hint {
    text-align: center;
    font-size: 0.85em;
    grid-row: 1 / span 2;
    grid-column: 4;
    align-self: center;
    color: #e65100;
    margin: 0 0.4em 0 0.6em;
    padding: 0.2em 0.55em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

#topheader-hint:hover {
    background: #ffe0b2;
    border-color: #ffa726;
    transform: translateY(-1px);
}

#topheader-hint i {
    font-size: 0.9em;
    color: #f57c00;
}

#topheader-hint-counter {
    font-size: 0.8em;
    font-weight: 800;
    color: #e65100;
}

/* Progressive In-Game Hint Modal */
#ingame-hint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

#ingame-hint-modal.hidden {
    display: none !important;
}

.hint-modal-card {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 440px;
    padding: 22px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    box-sizing: border-box;
    color: #222;
}

.hint-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.hint-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f57c00;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-modal-close {
    font-size: 1.35rem;
    color: #888;
    cursor: pointer;
    background: none;
    border: none;
}

.hint-modal-close:hover {
    color: #222;
}

.hint-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hint-item-box {
    background: #fdfaf6;
    border: 1px solid #ffe0b2;
    border-radius: 8px;
    padding: 12px 14px;
    transition: all 0.3s ease;
}

.hint-item-box.locked {
    background: #f5f5f5;
    border-color: #e0e0e0;
    opacity: 0.65;
}

.hint-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e65100;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hint-item-box.locked .hint-item-title {
    color: #888;
}

.hint-item-desc {
    font-size: 0.92rem;
    color: #333;
    line-height: 1.4;
}

.hint-item-desc .badge {
    background: #e1f5fe;
    color: #0277bd;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.hint-action-bar {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hint-next-btn {
    background: #ff6f00;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.hint-next-btn:hover {
    background: #e65100;
}

.hint-next-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Custom Word Modal */
#custom-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

#custom-word-modal.hidden {
    display: none !important;
}

.custom-modal-card {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 440px;
    padding: 22px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    box-sizing: border-box;
    color: #222;
}

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.custom-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ff6f00;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-input-box {
    margin: 16px 0;
}

.custom-input-field {
    width: 100%;
    padding: 12px 14px;
    font-size: 1.25rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 800;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.custom-input-field:focus {
    border-color: #ff6f00;
}

.custom-generate-btn {
    width: 100%;
    background: #ff6f00;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-generate-btn:hover {
    background: #e65100;
}

.custom-share-result {
    margin-top: 14px;
    background: #fff8e1;
    border: 1px dashed #ffa726;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-share-link {
    font-size: 0.85rem;
    word-break: break-all;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ffcc80;
    color: #e65100;
    user-select: all;
}

.custom-copy-btn {
    background: #43a047;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
}

.custom-copy-btn:hover {
    background: #2e7d32;
}

/* Rich SEO Content Section Below Game */
#seo-content-container {
    background: #ffffff;
    width: 100%;
    max-width: 860px;
    margin: 32px auto 60px;
    padding: 32px 28px;
    box-sizing: border-box;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    color: #333;
    line-height: 1.65;
    font-size: 16px;
}

#seo-content-container h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

#seo-content-container h2 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-top: 28px;
    margin-bottom: 10px;
    border-bottom: 2px solid #039BE5;
    padding-bottom: 4px;
    display: inline-block;
}

#seo-content-container h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-top: 16px;
    margin-bottom: 6px;
}

#seo-content-container p {
    font-size: 16px;
    color: #4a4a4a;
    margin-bottom: 14px;
    line-height: 1.65;
}

#seo-content-container ul, #seo-content-container ol {
    margin: 10px 0 16px 20px;
    font-size: 16px;
    color: #4a4a4a;
}

#seo-content-container li {
    margin-bottom: 6px;
    font-size: 16px;
}

/* FAQ Accordion Styling */
.faq-section {
    margin-top: 28px;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fafafa;
}

.faq-question {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 16px;
    color: #222;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #f0f4f8;
    color: #0277bd;
}

.faq-question i {
    font-size: 0.85rem;
    color: #666;
    transition: transform 0.25s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fff;
    font-size: 16px;
    color: #444;
    line-height: 1.6;
}
    line-height: 1.55;
}

.faq-item.active .faq-answer {
    padding: 12px 16px;
    max-height: 250px;
    border-top: 1px solid #eee;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.review-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.review-stars {
    color: #ffb300;
    margin-top: 8px;
    font-size: 0.95rem;
}

.review-author {
    font-weight: 700;
    color: #222;
    margin-top: 4px;
    font-size: 0.9rem;
}

/* Site Footer */
#site-footer {
    width: 100%;
    background: #e8e8e8;
    border-top: 1px solid #d0d0d0;
    padding: 16px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    box-sizing: border-box;
}

.footer-nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav-links a {
    color: #444;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-nav-links a:hover {
    color: #039BE5;
    text-decoration: underline;
}





