html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 20px;
    margin: 0;
}

.hidden {
    display: none;
}

#mode-tabs {
    overflow: hidden;
    background-color: #f1f1f1;
    border-bottom: 1px solid #ccc;
}

.tablink {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    color: black;
    display: block;
    text-align: center;
}

.tablink:hover, .touch-active {
    background-color: #ddd;
}

.tablink:active, .tablink.active {
    background-color: #ccc;
}

.tabcontent {
    display: none;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-top: none;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}

button.disabled-active {
    font-weight: bold;
    color: #333;
}

button:active, button.touch-active {
    background-color: #6bdf70;
}

#feedback {
    margin-top: 20px;
    color: blue;
    clear: both;
}

.feedback-success {
    color: green !important;
}

.feedback-error {
    color: red !important;
}

#token-container {
    margin-bottom: 20px;
}

#token-input {
    padding: 10px;
    font-size: 16px;
    width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#logo-container {
    text-align: center;
    padding: 10px;
}

#logo {
    max-width: 500px;
    height: auto;
}

.flag {
    width: 50px;
    height: 25px;
    cursor: pointer;
}

#language-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 1000;
}

.current-lang, .lang-option {
    display: flex;
    align-items: center;
    padding: 5px;
}

.current-lang img, .lang-option img {
    width: 25px; /* Flag size */
    height: auto;
    margin-right: 5px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.lang-option:hover {
    background-color: #f0f0f0;
}

@media screen and (min-width: 600px) {
    #mode-tabs {
        max-width: 600px; /* Maximum width on non-mobile devices */
        margin: 0 auto; /* Center align the tabs */
    }

    .tabcontent {
        max-width: 600px; /* Maximum width for larger screens */
        margin: 0 auto; /* Center align the tab content */
        padding: 50px 12px; /* Preserve existing padding */
        box-sizing: border-box; /* Include padding and border in the element's width */
    }
}

/* Responsive styles for mobile devices */
@media screen and (max-width: 600px) {
    .tablink {
        padding: 10px;
        font-size: 14px;
    }

    .tabcontent {
        padding-top: 20px; /* Adjusted top padding */
    }

    button {
        width: 100%; /* Full width */
        padding: 15px; /* Larger padding */
        font-size: 18px; /* Larger text */
        margin: 10px 0; /* More space between buttons */
        display: block; /* Stack buttons vertically */
    }

    #feedback {
        font-size: 16px;
    }

    #logo {
        width: 100%; /* Maximum width on desktop */
    }

    .lang-option {
        padding: 10px; /* Larger padding for touch targets */
        font-size: 18px; /* Larger font size for readability */
    }

    .lang-option img {
        width: 35px; /* Larger flag size */
        height: auto; /* Maintain aspect ratio */
        margin-right: 10px; /* Increased spacing between flag and text */
    }
}
