button.pressed {
    transform: scale(0.96);
    opacity: 0.9;
    transition: transform 0.1s, opacity 0.1s;
}

button.active {
    transform: scale(0.96);
    transition: transform 0.1s;
}

button,
.btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bumpOnChange {
    color: #FF5722 !important;
    transform: scale(1.5);
    transition: transform 0.1s;
}

#sss_summary_hit_missed:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;

}

#sss_summary_exit:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;

}

#button_review_close:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}

#modal_close:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}

#modal_next:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}

#modal_first_click_close:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}

#buttonNext span {
    display: inline-block;
    transform: scale(1.8);
    vertical-align: middle;
    margin-right: 5px;
}

#buttonNext {
    color: #FF5722;
    border-style: solid;
    border-color: #FF5722;
}

#buttonNext:disabled {
    opacity: .3;
}


#buttonQuit span {
    display: inline-block;
    transform: scale(1.8);
    vertical-align: middle;
    margin-right: 5px;
}

#buttonSkip span {
    display: inline-block;
    transform: scale(1.8);
    vertical-align: middle;
    margin-right: 5px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    width: 0px;
    min-width: 20px;
    height: 20px;
    background: repeating-linear-gradient(-45deg,
            #4CAF50,
            #4CAF50 10px,
            #66BB6A 10px,
            #66BB6A 20px);

    animation: moveStripes 1s linear infinite;
}

@keyframes moveStripes {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 20px 0;
    }
}

.score_main {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    width: 100%;
    height: 20px;

    /* border-style: solid;
    border-width: 1px;
    border-color: #8888884a; */
}

.score_main_ind {}

.score_text_elapsed {
    font-weight: bold;
    font-size: 14px;
    position: fixed;
    top: env(safe-area-inset-top, 0);
    width: 100%;
    text-align: center;
    z-index: 99999999;
    margin-top: 3px;
}

.score_text_count {
    font-size: 14px;
    margin-left: 5px;
    float: left;
    font-weight: bold;
    color: #374238;
    margin-top: 1px;
}

#timer {
    font-weight: bold;
}

#completeCount {}

#totalCount {
    font-weight: bold;
}

.modal_review_button_exit {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    width: 88%;
    margin-top: 10px;
}

.top_body_margin_main {
    margin-top: 40px;
}

.top_body_margin_play {
    margin-top: 40px;
}

.top_body_margin_review {
    margin-top: 40px;
}

.scoreboard {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    width: 100%;
    margin-bottom: 4px;
    max-width: 600px;
}

.header-bar {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    left: 0;
    width: 100%;
    height: 50px;
    background: #111;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid #333;
    z-index: 1000;
}

.modal_game {
    position: absolute;
    top: env(safe-area-inset-top, 0);
    left: 0;
    width: 100%;
    background: pink;
    min-width: 320px;
    min-height: 400px;
    /* height: 80vh; */
    background: transparent;
    background: rgba(1, 1, 1, .9);
    min-height: 100%; 
    z-index: 99999;
    padding-top: 0px;
    max-width: 500px;
}

.modal_button_main {
    width: 100%;
}

.modal_container {
    padding: 6%;
}



#modal_result {}

#modal_first_click {}

#modal_first_click div {}

#modal_first_click p {
    text-align: left;
    width: 80%;
    margin: 0px auto;
    font-size: 1.2rem;
}

.resultWordSourceSentence {
    width: 80%;
    margin: 0px auto;
    text-align: left !important;
}

.resultWordDestSentence {
    width: 80%;
    margin: 0px auto;
    text-align: left !important;
}

a {
    font-size: 20px;
}

html {
    font-size: 12px;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h2 {
    text-align: center;
}

.logo {
    width: 157px;
    height: 54px;
    background-image: url(../img/lingua1-alpha.png);
    background-repeat: no-repeat;
    background-position: -22px -73px;
    background-size: 200px 200px;
    image-rendering: pixelated;
    margin: 0px auto;
}

body {
    background: #000000;
    color: #eee;
    font-family: monospace;
    margin: 0;
    padding: 5%;
    display: flex;
    justify-content: center;
    padding-top: 35px;
}


body {
    /* your existing styles... */
    padding-top: env(safe-area-inset-top);
    padding-top: constant(safe-area-inset-top);
    /* for older iOS */
}

html,
body {
    -webkit-font-smoothing: antialiased;
    /* for WebKit browsers */
    -moz-osx-font-smoothing: grayscale;
    /* for macOS Firefox */
    color: #888;
}

.panel {
    min-width: 320px;
    margin: 0px auto;
}

footer {
    position: fixed;
    bottom: 30px;
    width: 100%;
}

footer * {
    text-decoration: none;
    font-size: 12px;
    width: 50%;
    display: block;
    float: left;
    text-align: center;
    color: #ffffff82;
}

.about_footer * {
    text-decoration: none;
    font-size: 12px;
    width: 33%;
    display: block;
    float: left;
    text-align: center;
    color: #ffffff82;
}

.panel {
    min-width: 320px;
    width: 100%;
}

#question {
    margin-top: 0rem;
    margin-bottom: 0px;
    border-bottom-style: solid;
    padding-bottom: 14px;
    margin-bottom: 17px;
    border-color: #8888884a;
    border-bottom-width: 1px;
}

.btn_text_bottom {
    font-size: 1.3rem;
    margin-top: 3px;
    color: rgb(255 165 0 / 100%);
    font-style: italic;
}

#category {
    color: #3F51B5;
    font-size: 1.5rem;
}

#definition {
    text-align: center;
    font-size: 1.3rem;
    color: #888;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0px;
}

#definition_container {
    min-height: 100px;
    max-height: 100px;
}

.resultWord {
    text-align: center;
    font-style: italic;
    font-size: 1.3rem;
    color: #888;
}

#resultIcon {
    text-align: center;
    font-size: 8rem;
}

#resultWordSource {
    text-align: center;
    font-size: 2rem;
    color: #888;
}

#resultWordDest {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0px;
    color: #4CAF50;
}

#resultWordPkey {
    text-align: center;
    font-size: 2rem;
}

.wordMain {
    font-style: italic;
    color: #FF5722;
}

.wordKey {
    color: rgb(255 165 0 / 100%);
    font-size: 1.5rem;
    font-style: italic;
}

.btn_text_top,
.btn_text_bottom {
    pointer-events: none;
}

button * {
    pointer-events: none;
}

.button_answer {
    display: block;
    font-size: 1.5rem;
}

.eee {
    display: block;
}


button {
    margin: 0px;
    padding: .5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    display: block;
    color: #4CAF50;
    border-color: #8888884a;
    border-style: solid;
    border-width: 1px;
    border-radius: 5px !important;
}

button {
    font-size: 18px;
    padding: 14px 20px;
    width: 100%;
    margin-bottom: 15px;
    appearance: none;
    border-radius: 0;
    background: none;
    border-color: #8888884a;
    border-style: solid;
    border-width: 1px;
    font: inherit;
    color: inherit;
    cursor: pointer;
    color: #4CAF50;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #888;
    border-color: #aaa;
    color: black;
}

#panel_questions {
    width: 90%;
    margin: 0px auto;

    min-height: 517px;
}

#result {
    margin-top: 1rem;
    font-weight: bold;
}

.container {
    max-width: 900px;
    width: 100%;
}

#result {
    font-weight: bold;
}

#hud {
    width: 100%;
    margin-bottom: 1rem;
    display: none;
}

#progressbar {
    width: 100%;
    background: #333;
    border-radius: 8px;
    overflow: hidden;
    height: 20px;
    margin-bottom: .5rem;
}

#progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ff99, #00ccff);
    transition: width 0.4s ease;
}

#stats {
    font-weight: bold;
    text-align: right;
    color: #0f0;
}

.button_answer.answer-selected .btn_text_bottom {
    color: rgb(255 165 0 / 100%);
    transform: scale(1.3);
}

.button_answer.answer-selected .btn_text_top {
    color: rgb(255 165 0 / 100%);
    transform: scale(1.3);
}

.answer-selected {
    background: rgb(70 241 70 / 52%);
}

.resultContainer {
    display: none;
}

.resultContainer {
    min-height: 100px;
}

#scores {
    display: none;
}

.score {
    width: 33%;
    float: left;
}

.score_element {
    margin: 0px auto;

    width: 100%;
    text-align: center;

}

@media (min-width: 768px) {
    #modal_result {
        padding: 3%;
    }

    #modal_first_click {
        padding: 3%;
    }

    .buttons_nav {
        position: unset !important;
    }
}

.buttons_nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    bottom: 0;
    width: 90%;
    left: 0;
    right: 0;
    width: 90%;
    margin: 0 auto;
    max-width: 600px;
}

.panel_main {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.buttons_nav .bnp {
    flex: 1;
}

.buttons_nav button {
    width: 100%;
    padding: 12px 0;
    color: #4CAF50;
    height: 45px;
}

.buttons_nav button:active {
    border-color: #4CAF50 !important;
    transform: scale(1.1);
}

.reveal {
    display: flex;
    justify-content: center;
    width: 100%;
    opacity: 0.4;
}

.reveal>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-style: solid;
    padding: 9px;
}

.scorereview {
    width: 100%;
    margin: 40px auto;
    font-family: monospace;
    text-align: center;
    padding: 0px;
    margin-top: 0px;
}

.scorereview table {
    width: 100%;
    border-collapse: collapse;
}

.scorereview th,
.scorereview td {
    border-bottom: 1px solid #333;
    padding: 12px 8px;
}

.scorereview th {
    font-size: 18px;
    color: #0f0;
    border-bottom: 2px solid #0f0;
}

.scorereview td:first-child {
    text-align: left;
}

#table_leader_board tr:nth-child(even) {
    background-color: #222;
}

#table_leader_board tr:nth-child(odd) {
    background-color: #111;
}

#table_leader_board th {
    background-color: #000;
}

#table_leader_board td,
#table_leader_board th {
    color: #fff;
    padding: 8px 12px;
    text-align: center;
    background: none;
}

.hide {
    display: none;
}

.fade-in {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

.fade-in.show {
    opacity: 1;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid #ccc;
    border-top: 6px solid #000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.text_center {
    text-align: center;
}

.buttons_nav {
    bottom: 10px;
}

#btn-finished {
    background: #222;
    color: #fff;
    border: 1px solid #555;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    width: 90%;
    margin: 0px auto;
    color: #4CAF50;
    max-width: 300px;
}

#btn-finished:hover {
    background: #333;
}

.section {
    width: 100%;
    margin: 30px auto;
    font-family: monospace;
}

.section h3 {
    border-bottom: 2px solid #fff;
    padding-bottom: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.question-block {
    margin-bottom: 40px;
    text-align: left;
}

.question {
    font-size: 18px;
    margin-bottom: 10px;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    padding: 4px 0;
    font-size: 16px;
}

li::before {
    content: "• ";
    color: #888;
}

li:contains("✅") {
    color: #0f0;
}

li:contains("❌") {
    color: #f33;
}

.start-button {
    height: 56px;
    padding: 16px 0 !important;
    display: block;
    width: 90%;
    max-width: 420px;
    margin: 30px auto;
    padding: 18px 0;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    border-radius: 18px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    border-radius: 18px !important;
    color: #4CAF50;
}





@media (hover: none) and (pointer: coarse) {
    .start-button {
        padding: 22px 0;
        font-size: 1.6rem;
        border-radius: 20px;
        color: #4CAF50;
    }
}

.lang-dropdown {
    position: relative;
    width: 90%;
    max-width: 420px;
    margin: 40px auto;
    font-family: system-ui, sans-serif;
}

.lang-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;

    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;

    border-radius: 18px;
    padding: 18px 20px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    color: #4CAF50;
    border-radius: 18px !important;
}

/* caret arrow */
.lang-control::after {
    content: "🟢";
    font-size: 1.2rem;
    color: #aaa;
}

.lang-control:focus {
    /* border-bottom: none;
    border-bottom-right-radius: 0px ;
    border-bottom-left-radius: 0px ;  */
}

.killLangBorderBottom{

/* 
    border-bottom: none;
    border-bottom-right-radius: 0px !important ;
    border-bottom-left-radius: 0px !important ; 
 */

}


/* dropdown panel */
.lang-options {
    position: absolute;
    top: 100%;
    /* directly below the control */
    left: 0;
    width: 100%;
    /* same width as the control */
    background: #1b1b1b;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: none;
    /* hidden by default */
    z-index: 100;
}

/* each option */
.lang-option {
    padding: 18px 20px;
    font-size: 1.2rem;
    color: #f4f4f4;
    border-bottom: 1px solid #333;
    text-align: left;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: #00bfff33;
}

/* visible state */
.lang-dropdown.open .lang-options {
    display: block;
}















.stepper-value {
    flex: 2;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    user-select: none;
}

.question-stepper {
    height: 63px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 420px;
    margin: 20px auto;
    border-radius: 18px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    border-color: #8888884a;
    border-style: solid;
    border-width: 1px;
}

.stepper-btn {
    flex: 1;
    padding: 18px 0;
    font-size: 3.0rem;
    font-weight: 700;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 0px;
    color: #4CAF50;
}

.stepper-btn:active {
    background: #4CAF50;
    color: gray;
}

.start-button:active {
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}


#langControl_source:active{
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}

#langControl_dest:active{
    transform: scale(1.05);
    background: #4CAF50;
    color: gray;
}