/* ------------------------------------------------ */
/* APP THEMES */
/* ------------------------------------------------ */

/* LIGHT THEME */
.light-theme {
    /* Base */
    --background-color: #ffffff;
    --text-color: #000000;
    --shadow-color: rgba(0, 0, 0, 0.2);

    /* Containers */
    --container-bg: rgba(0, 0, 0, 0.1);
    --info-container-bg: #e0e0e0;
    --wrapper-bg: rgba(0, 0, 0, 0.05);
    --wrapper-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);

    /* Buttons */
    --button-bg: #0072ce;
    --button-hover-bg: #005bb5;
    --button-text-color: #ffffff;
    --autobutton-bg: #5c068c;
    --autobutton-hover-bg: #430463;
    --autobutton-text-color: #ffffff;
    --retry-mic-bg: #5c068c;
    --retry-mic-hover-bg: #430463;
    --retry-mic-text-color: #ffffff;

    /* Inputs */
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-text-color: #000000;
    --input-focus-bg: rgba(0, 0, 0, 0.1);
    --input-focus-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
    --border-color: #b3b3b3;

    /* Links */
    --link-color: #0072ce;
    --hover-text-color: #0072ce;

    /* Selects */
    --select-bg: #ffffff;
    --select-text-color: #000000;
    --select-option-bg: #ffffff;
    --select-option-text-color: #000000;
    --select-border-color: #b3b3b3;

    /* Disabled */
    --disabled-bg: #e0e0e0;
    --disabled-text-color: #a0a0a0;

    /* Dropdowns */
    --dropdown-label-color: #000000;

    /* Dialogs */
    --dialog-bg: rgba(255, 255, 255, 0.95);
    --dialog-text-color: #000000;
    --dialog-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);

    /* Switch */
    --switch-bg: #cccccc;
    --switch-checked-bg: #0072ce;
    --switch-knob-bg: #ffffff;

    /* Layout */
    --button-width: 180px;
    --button-gap: 15px;
    --login-bg: rgba(0, 0, 0, 0.05);
    --login-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    --login-hover: #0072ce66;

    /* Landing */
    --header: rgba(255, 255, 255, 0.75);
    --header-scrolled: rgba(255, 255, 255, 0.9);
    --menu-bg: #ffffff;
    --menu-a: #333;
    --menu-a-active: #5c068c;
    --card-border: #5c068c;
    --link-color: #0072ce;
    --register-gradient: linear-gradient(180deg, rgba(79, 209, 255, 0.15), rgba(255, 255, 255, 0.7));

    /* Info Section */
    --info-logo-bg: #ffffff;
    --info-subtitle-color: #5c068c;
    --info-link-color: #0072ce;

    --transition-speed: 0.5s;
}

/* DARK THEME */
.dark-theme {
    /* Base */
    --background-color: #0d0f17;
    --text-color: #f4f6ff;
    --shadow-color: rgba(255, 255, 255, 0.15);

    /* Containers */
    --container-bg: rgba(255, 255, 255, 0.06);
    --info-container-bg: rgba(255, 255, 255, 0.08);
    --wrapper-bg: rgba(22, 26, 40, 0.65);
    --wrapper-shadow: 0px 8px 25px rgba(184, 184, 184, 0.103);

    /* Buttons */
    --button-bg: #5c068c;
    --button-hover-bg: #430463;
    --button-text-color: #ffffff;
    --autobutton-bg: #7b1fa2;
    --autobutton-hover-bg: #5e1580;
    --autobutton-text-color: #ffffff;

    /* Inputs */
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-text-color: #f8f8ff;
    --input-focus-bg: rgba(90, 130, 255, 0.18);
    --input-focus-shadow: 0px 0px 10px rgba(110, 160, 255, 0.35);
    --border-color: rgba(200, 200, 255, 0.25);

    /* Links */
    --link-color: #8bb8ff;
    --hover-text-color: #b0d3ff;

    /* Selects */
    --select-bg: rgba(18, 22, 35, 0.95);
    --select-text-color: #f2f4ff;
    --select-option-bg: rgba(30, 34, 52, 1);
    --select-option-text-color: #ffffff;
    --select-border-color: rgba(130, 170, 255, 0.35);

    /* Disabled */
    --disabled-bg: rgba(255, 255, 255, 0.15);
    --disabled-text-color: #777;

    /* Dropdowns */
    --dropdown-label-color: #e0e4ff;

    /* Dialogs */
    --dialog-bg: rgba(15, 18, 27, 0.95);
    --dialog-text-color: #f5f7ff;
    --dialog-shadow: 0px 10px 30px rgba(90, 130, 255, 0.25);

    /* Switch */
    --switch-bg: rgba(255, 255, 255, 0.15);
    --switch-checked-bg: #7b1fa2;
    --switch-knob-bg: #ffffff;

    /* Landing */
    --header: rgba(22, 21, 21, 0.75);
    --header-scrolled: rgba(22, 21, 21, 0.9);
    --menu-bg: #0d0f17; 
    --menu-a: #cfcccc;
    --menu-a-active: #9bd0ff;
    --card-border: #d6b3ff;
    --link-color: #9bd0ff;
    --register-gradient: linear-gradient(180deg, rgba(79, 209, 255, 0.15), rgba(34, 34, 34, 0.7));

    /* Info Section */
    --info-logo-bg: #f2f4ff;
    --info-subtitle-color: #d6b3ff;
    --info-link-color: #9bd0ff;

    --transition-speed: 0.45s;
}


/* ------------------------------------------------ */
/* GENERAL STYLES */
/* ------------------------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Archivo", sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-size: 1rem;
}

.hidden {
    visibility: hidden;
    margin: 0;
    padding: 0;
    height: 0;
    width: 0;
    display: none !important;
}

/* ------------------------------------------------ */
/* LANGUAGE SELECTOR */
/* ------------------------------------------------ */

.lang-selector {
    justify-self: end;
    display: flex;
    align-items: center;
    height: 34px;
}

.custom-select {
    position: relative;
    width: 150px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    align-items: center;
}

.custom-select .selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    background: var(--background-color);
    transition: box-shadow 0.2s ease;
}

.custom-select .selected:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.13);
}

.custom-select .options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 100%;
    background: var(--background-color);
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    transition:
        max-height 0.28s ease,
        opacity 0.22s ease,
        transform 0.22s ease;
    z-index: 3000;
}

.custom-select.open .options {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
}

.custom-select .option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.custom-select .option:hover {
    background: rgba(0, 0, 0, 0.07);
}

.custom-select img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
}

/* ------------------------------------------------ */
/* MAIN WRAPPER */
/* ------------------------------------------------ */

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    transition: transform var(--transition-speed) ease-in-out;
}

/* Move wrapper up after login */
.wrapper.moved {
    transform: translateY(-10vh);
    justify-content: flex-start;
}

/* ------------------------------------------------ */
/* HEADER AND MAIN SECTION CENTERING */
/* ------------------------------------------------ */

.wrapper,
#mainWrapper {
    padding-bottom: 22px;
}

#mainWrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    gap: 10px;
    transition: transform var(--transition-speed) ease-in-out;
}

#mainWrapper.move-top {
    transform: translateY(-25%);
}

/* ------------------------------------------------ */
/* LOGO ADJUSTMENTS */
/* ------------------------------------------------ */

#logo {
    width: 600px;
    height: auto;
    opacity: 1;
}

/* ------------------------------------------------ */
/* LOGIN CONTAINER */
/* ------------------------------------------------ */

.login-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1100px;
}

/* ------------------------------------------------ */
/* INDEX STYLES */
/* ------------------------------------------------ */

.index_button {
    display: inline-block;
    text-align: center;
    background: var(--login-bg);
    color: var(--text-color);
    padding: 2rem 2.8rem;
    margin: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--login-shadow);
    transition:
        background var(--transition-speed) ease,
        color var(--transition-speed) ease,
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease;
    cursor: pointer;
    will-change: transform, box-shadow;
}

.index_button:hover {
    background: var(--autobutton-bg);
    color: var(--autobutton-text-color);
    box-shadow: 0 10px 25px var(--shadow-color);
    transform: translateY(-6px) scale(1.04) rotate(-0.5deg);
}

.index_button:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: inset 0px 0px 15px var(--shadow-color);
}

/* ------------------------------------------------ */
/* LOGIN SECTION */
/* ------------------------------------------------ */

.login-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--login-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
    min-height: 360px;
    margin-bottom: 20px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    gap: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.login-section select,
.login-section input,
.login-section button {
    width: 100%;
    max-width: 300px;
    min-width: 300px;
    margin-bottom: 12px;
    padding: 12px;
    font-size: 1rem;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
}

.login-section:hover {
    box-shadow: 0 0 20px var(--login-hover);
}

.login-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-section h2::before {
    content: "—";
    color: var(--hover-text-color);
    margin-right: 0.3rem;
}

.login-section h2::after {
    content: "—";
    color: var(--hover-text-color);
    margin-left: 0.3rem;
}

.dropdown-label {
    font-size: 1rem;
    font-weight: bold;
    color: var(--dropdown-label-color);
    margin-bottom: 5px;
    width: 100%;
    min-width: 300px;
    max-width: 300px;
    text-align: center;
}

.dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* ------------------------------------------------ */
/* SESSION INFO */
/* ------------------------------------------------ */

#sessionInfo {
    align-items: center;
    justify-content: center;
    background: var(--login-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
    margin: 1 auto;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.6;
}

#sessionInfo.hidden {
    display: none !important;
}

#sessionInfo b {
    font-weight: bold;
    color: var(--text-color);
}

/* ------------------------------------------------ */
/* SELECT ELEMENTS */
/* ------------------------------------------------ */

select {
    background-color: var(--select-bg);
    color: var(--select-text-color);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--select-border-color);
    font-size: 1rem;
    transition:
        background 0.3s,
        color 0.3s;
}

select option {
    background-color: var(--select-option-bg);
    color: var(--select-option-text-color);
}

/* ------------------------------------------------ */
/* BUTTONS CONFIGURATION */
/* ------------------------------------------------ */

#buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: var(--button-gap);
    width: 100%;
    max-width: 600px;
}

#buttons button {
    font-size: 1rem;
    padding: 12px;
    width: var(--button-width);
}

.pip-toggle {
    width: 52px;
    min-width: 52px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--button-bg);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition:
        background 0.3s ease,
        transform 0.2s ease;
}

.pip-toggle img {
    width: 22px;
    height: 22px;
}

.pip-toggle:hover {
    background: var(--button-hover-bg);
    transform: translateY(-1px);
}

.pip-toggle[data-active="true"] {
    box-shadow: 0 0 0 2px var(--button-hover-bg) inset;
}

.field-row.button-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

/* ------------------------------------------------ */
/* CANVAS CONFIGURATION */
/* ------------------------------------------------ */

canvas {
    display: block;
    margin-bottom: 10px;
    width: 100%;
    max-width: 600px;
    height: auto;
}

canvas.visualizer {
    border-radius: 12px;
    background: var(--container-bg);
    box-shadow: 0 4px 10px var(--shadow-color);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

canvas.visualizer:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px var(--shadow-color);
}

/* ------------------------------------------------ */
/* DROPDOWN CONTAINER */
/* ------------------------------------------------ */

.dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.dropdown-label {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: var(--dropdown-label-color);
    margin-bottom: 5px;
}

/* ------------------------------------------------ */
/* INPUTS AND SELECTS */
/* ------------------------------------------------ */

select,
input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--input-text-color);
    text-align: center;
    outline: none;
    transition: all 0.3s ease-in-out;
    margin-bottom: 15px;
}

select:focus,
input:focus {
    background: var(--input-focus-bg);
    box-shadow: var(--input-focus-shadow);
}

/* ------------------------------------------------ */
/* GENERAL BUTTON STYLES */
/* ------------------------------------------------ */

#usernameInput,
#passwordInput,
#usernameInputListener,
select,
button {
    font-size: 1rem;
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 8px;
    width: 250px;
}

button {
    background: var(--button-bg);
    color: var(--button-text-color);
    cursor: pointer;
    transition:
        background 0.3s ease-in-out,
        transform 0.2s;
    border-radius: 8px;
    padding: 12px;
    font-weight: bold;
}

button:hover {
    background: var(--button-hover-bg);
    transform: scale(1.05);
}

button:active {
    box-shadow: inset 0px 0px 20px var(--shadow-color);
    transform: translateY(2px);
}

/* ------------------------------------------------ */
/* LOGIN BUTTONS STYLES */
/* ------------------------------------------------ */

#loginButton,
#loginButtonListener,
#loginAutButton {
    width: 100%;
    padding: 4%;
    font-size: 1rem;
    font-weight: bold;
    background: var(--button-bg);
    color: var(--button-text-color);
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    max-width: 300px;
}

#loginButton:hover,
#loginButtonListener:hover,
#loginAutButton:hover {
    background: var(--button-hover-bg);
    transform: scale(1.05);
}

/* Active click effect for login button */
#loginButton:active,
#loginButtonListener:active,
#loginAutButton:active {
    transform: translateY(2px);
}

#retryMicButton {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 1000;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: var(--autobutton-bg);
    color: var(--autobutton-text-color);
    transition:
        background 0.3s ease-in-out,
        transform 0.2s;
    box-shadow: 0 4px 10px var(--shadow-color);
}

#retryMicButton:hover {
    background: var(--autobutton-hover-bg);
    transform: scale(1.05);
}

#retryMicButton:active {
    transform: translateY(2px);
    box-shadow: inset 0px 0px 20px var(--shadow-color);
}

/* ------------------------------------------------ */
/* MODEL LOADING DIALOG STYLES */
/* ------------------------------------------------ */

#modelLoadingDialog {
    border: none;
    border-radius: 16px;
    padding: 2rem 3rem;
    width: 100%;
    max-width: 600px;
    text-align: center;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1.3rem;
    font-family: "Archivo", sans-serif;
    box-shadow: 0 8px 20px var(--shadow-color);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

#modelLoadingDialog[open] {
    opacity: 1;
    pointer-events: auto;
}

#loadingText {
    font-size: 1.2rem;
    font-weight: 500;
    display: block;
    margin: 0 auto;
}

#modelLoadingDialog .close-dialog {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    line-height: 1;
    padding: 7px;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modelLoadingDialog .close-dialog:hover {
    background: rgba(0, 0, 0, 0.1);
}

.dark-theme #modelLoadingDialog .close-dialog:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------ */
/* HEADERS STYLES */
/* ------------------------------------------------ */

h1 {
    font-size: 2rem;
    text-align: center;
    font-weight: normal;
    padding: 0.5rem 0 0 0;
}

/* ------------------------------------------------ */
/* MAIN CONTROLS */
/* ------------------------------------------------ */

.main-controls {
    padding: 0.5rem 0;
}

/* ------------------------------------------------ */
/* AUDIO CLIPS SECTION */
/* ------------------------------------------------ */

.sound-clips {
    flex: 1;
    overflow: auto;
    user-select: none;
}

section,
article {
    display: block;
}

.clip {
    padding-bottom: 1rem;
}

audio {
    width: 100%;
    display: block;
    margin: 1rem auto 0.5rem;
}

.clip p {
    display: inline-block;
    font-size: 1rem;
    pointer-events: none;
}

.clip button {
    font-size: 1rem;
    float: right;
}

button.delete {
    background: #f00;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

/* ------------------------------------------------ */
/* SUBTITLE CONTAINER FOR EACH LANGUAGE */
/* ------------------------------------------------ */

#transcriptionContainer {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.sound-clips {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.transcription-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--container-bg);
    border-radius: 12px;
    box-shadow: var(--wrapper-shadow);
    backdrop-filter: blur(10px);
    width: 100%;
}

.transcription-title {
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-shadow: var(--shadow-color);
    display: block;
}

.transcription-section article p {
    font-size: 1.3em;
    line-height: 0.9;
    color: var(--text-color);
    text-align: center;
    text-shadow: var(--shadow-color);
    padding: 10px 20px;
    display: inline-block;
    max-width: 100%;
    white-space: pre-line;
}

.sound-clips {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

article {
    margin-bottom: 5px;
}

/* ------------------------------------------------ */
/* REGISTRATION STYLES */
/* ------------------------------------------------ */

#register {
    width: 70%;
}

#registerButton {
    width: 100%;
    font-size: 1rem;
    font-weight: bold;
    background: var(--autobutton-bg);
    color: var(--autobutton-text-color);
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    max-width: 300px;
}

#registerButton:hover {
    background: var(--autobutton-hover-bg);
    transform: scale(1.05);
}

#registerButton:active {
    transform: translateY(2px);
}

.register-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    width: min(1400px, 96vw);
    align-items: stretch;
}

/* Register page specific adjustments */
body.register-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 114, 206, 0.12), transparent 45%),
        radial-gradient(circle at 88% 8%, rgba(20, 42, 88, 0.12), transparent 50%),
        var(--background-color);
}

body.register-page .register-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 40px;
    width: 100%;
}

.register-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--login-bg);
    padding: 48px 60px;
    border-radius: 18px;
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(10px);
    width: 100%;
    flex: 1 1 540px;
    font-size: 1rem;
    min-height: 380px;
    margin-bottom: 20px;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    gap: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.register-section:hover {
    box-shadow: var(--shadow-color);
    transform: translateY(-4px);
}

.register-section.info-card {
    text-align: left;
    align-items: flex-start;
    background: var(--register-gradient);
    border: 0;
    box-shadow: var(--wrapper-shadow);
}

.register-section.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.register-section.info-card li {
    margin-bottom: 0.8rem;
    padding-left: 1.6rem;
    position: relative;
    line-height: 1.5;
}

.register-section.info-card li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #1f8ce0;
    font-weight: bold;
}

.register-section.info-card .info-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--dropdown-label-color);
}

.register-section.form-card {
    align-items: stretch;
    text-align: left;
    gap: 16px;
    flex: 1 1 680px;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.form-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #f4f6fb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.form-card h2 {
    margin: 0;
    font-size: 1.9rem;
}

.field-row.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
}

.field-row.two-columns div {
    display: flex;
    flex-direction: column;
}

.stack-mobile {
    gap: 18px;
}

.register-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.register-section .field-row {
    width: 100%;
}

.register-section label {
    font-size: 0.93rem;
    font-weight: 500;
    color: var(--dropdown-label-color);
    margin-bottom: 5px;
    width: 100%;
    text-align: left;
}

.register-section input,
.register-section select {
    width: 100%;
    margin-bottom: 12px;
    padding: 16px 14px;
    font-size: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--input-text-color);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
}

.register-section input:focus,
.register-section select:focus {
    background: var(--input-focus-bg);
    box-shadow: var(--input-focus-shadow);
    outline: none;
}

.register-section .button-group {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 6px;
    max-width: 500px;
}

.register-section .button-group button,
.register-section .button-group a {
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    flex: 1 1 0;
    min-width: 180px;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
}

.register-section .button-group button {
    background-color: var(--button-bg);
    color: var(--button-text-color);
    border: none;
    transition: all 0.3s ease-in-out;
}

.register-section .button-group button:hover {
    background-color: var(--button-hover-bg);
    transform: scale(1.05);
}

.register-section .button-group .primary {
    background: linear-gradient(90deg, #3283ff, #5a4bff);
    color: #fff;
}

.register-section .button-group .secondary {
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    background: transparent;
}

@media (max-width: 900px) {
    .field-row.two-columns {
        grid-template-columns: 1fr;
    }

    .register-container {
        padding: 0 10px;
    }

    .register-section .button-group {
        flex-direction: column;
    }
}

.label-form {
    position: static !important;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: bold !important;
    text-align: left;
    width: 100%;
    margin-bottom: 5px;
    background-color: transparent !important;
}

.back-button {
    display: block;
    text-align: center;
    background: var(--autobutton-bg);
    color: var(--autobutton-text-color);
    font-weight: bold;
    border-radius: 8px;
    padding: 12px;
    max-width: 300px;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.back-button:hover {
    background: var(--autobutton-hover-bg);
    transform: scale(1.05);
}

.back-button:active {
    transform: translateY(2px);
}

/* ------------------------------------------------ */
/* LOGIN PAGE */
/* ------------------------------------------------ */

body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(0, 114, 206, 0.12), transparent 45%),
        radial-gradient(circle at 88% 8%, rgba(20, 42, 88, 0.12), transparent 50%),
        var(--background-color);
}

body.login-page .login-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 96px 40px 60px;
}

.login-shell {
    width: min(900px, 94vw);
    display: flex;
    justify-content: center;
}

.login-card {
    width: min(520px, 100%);
    position: relative;
    background: var(--wrapper-bg);
    padding: 42px 44px;
    border-radius: 20px;
    box-shadow: var(--login-shadow);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.light-theme .login-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.9));
}

.dark-theme .login-card {
    background: linear-gradient(180deg, rgba(18, 22, 35, 0.92), rgba(18, 22, 35, 0.82));
    border-color: rgba(255, 255, 255, 0.08);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #0f5bb5, #3b7bd9, #7b8df0);
}

.login-header {
    display: flex;
    align-items: flex-start;
}

.login-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.login-header p {
    margin: 6px 0 0;
    color: var(--dropdown-label-color);
    line-height: 1.5;
    font-size: 1rem;
}

.login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-form-fields .field-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-form-fields input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: var(--input-text-color);
    font-size: 1rem;
}

.login-form-fields input:focus {
    background: var(--input-focus-bg);
    box-shadow: var(--input-focus-shadow);
    outline: none;
}

.login-form-fields .button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 6px;
    align-items: stretch;
}

.login-form-fields .button-group button,
.login-form-fields .button-group a {
    flex: 1 1 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 44px;
    width: 100%;
    margin: 0;
    appearance: none;
}

.login-form-fields .button-group .primary {
    background: linear-gradient(180deg, #0b66c3, #0a5ab0);
    color: #fff;
    border: none;
    box-shadow: 0 10px 18px rgba(10, 45, 90, 0.2);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.login-form-fields .button-group .primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.login-form-fields .button-group .secondary {
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    background: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-form-fields .button-group .secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.error-message {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    background: rgba(220, 53, 69, 0.08);
    color: #9e1c2c;
    font-weight: 600;
    text-align: left;
}

.login-helper {
    margin: 6px 0 0;
    font-size: 0.95rem;
    color: var(--dropdown-label-color);
    text-align: center;
}

.login-helper a {
    color: var(--link-color);
    font-weight: 700;
    text-decoration: none;
}

.login-helper a:hover {
    color: var(--card-border);
}

@media (max-width: 720px) {
    body.login-page .login-wrapper {
        padding: 90px 20px 50px;
    }

    .login-card {
        padding: 32px 28px;
    }

    .login-form-fields .button-group {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------ */
/* REGISTER PAGE (LOGIN STYLE) */
/* ------------------------------------------------ */

body.register-page .register-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 96px 40px 60px;
}

.register-shell {
    width: min(1200px, 96vw);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 28px;
}

.register-card {
    position: relative;
    background: var(--wrapper-bg);
    padding: 42px 44px;
    border-radius: 20px;
    box-shadow: var(--login-shadow);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.light-theme .register-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.9));
}

.dark-theme .register-card {
    background: linear-gradient(180deg, rgba(18, 22, 35, 0.92), rgba(18, 22, 35, 0.82));
    border-color: rgba(255, 255, 255, 0.08);
}

.register-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #0f5bb5, #3b7bd9, #7b8df0);
}

.register-info h2,
.register-form h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.register-info p {
    color: var(--dropdown-label-color);
    line-height: 1.6;
}

.register-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.register-info li {
    padding-left: 1.6rem;
    position: relative;
    line-height: 1.5;
}

.register-info li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #1f6fd8;
    font-weight: 700;
}

.register-info .info-meta {
    display: grid;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--dropdown-label-color);
}

.register-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.register-form-fields .field-row {
    width: 100%;
}

.register-form-fields .two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.register-form-fields .two-columns > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.register-form-fields input,
.register-form-fields select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: var(--input-text-color);
    font-size: 1rem;
}

.register-form-fields input:focus,
.register-form-fields select:focus {
    background: var(--input-focus-bg);
    box-shadow: var(--input-focus-shadow);
    outline: none;
}

.register-form-fields .button-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 6px;
    align-items: stretch;
}

.register-form-fields .button-group button,
.register-form-fields .button-group a {
    flex: 1 1 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 44px;
    width: 100%;
    margin: 0;
    appearance: none;
}

.register-form-fields .button-group .primary {
    background: linear-gradient(180deg, #0b66c3, #0a5ab0);
    color: #fff;
    border: none;
    box-shadow: 0 10px 18px rgba(10, 45, 90, 0.2);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.register-form-fields .button-group .primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.register-form-fields .button-group .secondary {
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    background: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.register-form-fields .button-group .secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

@media (max-width: 980px) {
    .register-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.register-page .register-wrapper {
        padding: 90px 20px 50px;
    }

    .register-card {
        padding: 32px 28px;
    }

    .register-form-fields .two-columns {
        grid-template-columns: 1fr;
    }

    .register-form-fields .button-group {
        grid-template-columns: 1fr;
    }
}


/* ------------------------------------------------ */
/* VERIFY PAGE */
/* ------------------------------------------------ */

.verify-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 96px 60px 60px 30px;
    width: 100%;
    max-width: 650px;
    text-align: center;
    margin: 3rem auto;
    animation: verifyFadeIn 0.5s ease;
}

.verify-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.verify-section p {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 550px;
}

.verify-section a {
    font-weight: bold;
    text-decoration: none;
    color: var(--link-color);
    font-size: 1.1rem;
    transition:
        color 0.3s ease,
        transform 0.2s ease;
}

.verify-section a:hover {
    color: var(--button-hover-bg);
    transform: translateX(5px);
}

.verify-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(217, 225, 255, 0.6);
    padding: 1.1rem 1.6rem;
    margin: 1rem 0 1.8rem;
    box-shadow: 0 20px 45px rgba(41, 59, 138, 0.08);
    text-align: left;
}

.verify-card p {
    margin: 0.2rem 0;
    font-size: 0.98rem;
    color: var(--text-color);
}

.verify-form {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1.8rem;
}

.verify-disclosure {
    width: 100%;
    max-width: 560px;
    margin: 0 auto 1.8rem;
    text-align: left;
}

.verify-disclosure summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.verify-disclosure summary::-webkit-details-marker {
    display: none;
}

.verify-disclosure summary::after {
    content: "▾";
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.verify-disclosure[open] summary::after {
    transform: rotate(180deg);
}

@keyframes verifyFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.verify-permissions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
    width: 100%;
}

.verify-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.verify-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5c068c;
}

.verify-form.secondary .btn-secondary {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.verify-form.danger .btn-danger {
    background: #b42318;
    color: #fff;
    border: 1px solid #8f1a12;
}

.login-blocked {
    width: 100%;
    margin: 10px 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
    font-weight: 600;
    text-align: center;
}

.login-section.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* ------------------------------------------------ */
/* MASTER'S STATUS BANNER */
/* ------------------------------------------------ */

.status-banner {
    display: none;
    position: fixed;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffdf5e;
    color: #000000;
    padding: 12px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 200px;
    min-height: 50px;
    text-align: center;
    line-height: 1.4;
}

/* ------------------------------------------------ */
/* INFO TOGGLE & ASIDE STYLES */
/* ------------------------------------------------ */

#toggle {
    display: none;
}

label.right-toggle {
    font-size: 3rem;
    position: absolute;
    top: 2px;
    right: 3px;
    z-index: 5;
    cursor: pointer;
    border-radius: 10px;
}

label[for="toggle"] {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--info-container-bg);
    border: 1px solid var(--border-color);
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 20px;
    transition: background 0.3s ease;
    z-index: 1000;
}

label[for="toggle"]:hover {
    background: var(--hover-text-color);
}

aside {
    position: fixed;
    top: 10%;
    right: -370px;
    width: 350px;
    background-color: var(--info-container-bg);
    padding: 1.5rem;
    box-shadow: -2px 0 5px var(--shadow-color);
    transition: transform 0.3s ease-out;
    border-radius: 10px 0 0 10px;
    color: var(--text-color);
}

aside p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    line-height: 1.6;
    text-align: justify;
}

aside h2 {
    text-align: center;
    margin-bottom: 1rem;
}

aside a {
    color: var(--text-color);
    font-weight: bold;
    text-decoration: none;
}

aside a:hover {
    text-decoration: underline;
}

#toggle:checked ~ aside {
    transform: translateX(-370px);
}

/* ------------------------------------------------ */
/* QR TOGGLE & ASIDE STYLES */
/* ------------------------------------------------ */

#toggleQR {
    display: none;
}

label.left-toggle {
    all: unset;
    position: fixed;
    top: 10px;
    left: 10px;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 20px;
    transition: background 0.3s ease;
    z-index: 1000;
}

label.left-toggle:hover {
    background: var(--hover-text-color);
}

aside.left {
    position: fixed;
    top: 10%;
    left: -370px;
    width: 350px;
    background-color: var(--container-bg);
    padding: 1.5rem;
    box-shadow: 2px 0 5px var(--shadow-color);
    transition: transform 0.3s ease-out;
    border-radius: 0 10px 10px 0;
    color: var(--text-color);
    z-index: 999;
}

aside.left h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

aside.left img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow-color);
}

#toggleQR:checked ~ aside.left {
    transform: translateX(370px);
}

/* ------------------------------------------------ */
/* FOOTER STYLES */
/* ------------------------------------------------ */

footer{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000000;
    color: var(--border-color);
    text-align: center;
    padding: 5px 10px;
    font-size: 0.7rem;
    z-index: 1000;
    height: 22px;
    margin-top: 0; 
}

/* ------------------------------------------------ */
/* 404 PAGE STYLES */
/* ------------------------------------------------ */

.notfound-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0px 60px 60px 30px;
    width: 100%;
    max-width: 650px;
    text-align: center;
    margin: 3rem auto;
}

.notfound-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.notfound-icon {
    font-size: 2rem;
}

.notfound-text {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 550px;
}

.notfound-link {
    font-weight: bold;
    text-decoration: none;
    color: var(--link-color);
    font-size: 1.1rem;
    transition:
        color 0.3s ease,
        transform 0.2s ease;
}

.notfound-link:hover {
    color: var(--button-hover-bg);
    transform: translateX(5px);
}

/* ------------------------------------------------ */
/* RESPONSIVE: SMARTPHONE (≤ 768px) */
/* ------------------------------------------------ */

/* Responsive styles for smartphones */
@media screen and (max-width: 769px) {
    html,
    body {
        height: auto !important;
        overflow-y: auto !important;
        margin: 0;
        padding: 0;
    }

    .wrapper,
    #mainWrapper {
        min-height: 90vh;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 1rem 0.5rem;
        width: 100%;
        margin: 0 auto;
    }

    .wrapper.moved,
    #mainWrapper.move-top {
        transform: none !important;
    }

    #logo {
        max-width: 90%;
        height: auto;
        margin-bottom: 1rem;
    }

    #toggleVisualizerButton {
        display: none !important;
    }

    #buttons {
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 10px;
        width: 100%;
        max-width: 100%;
    }

    #buttons button {
        flex: 1;
        min-width: 0;
        max-width: 45%;
        box-sizing: border-box;
        padding: 10px;
    }

    #recordButton {
        width: 50% !important;
        max-width: none !important;
        min-width: 200px;
        margin: 0 auto 1rem;
        display: block;
        font-size: 1.1rem;
    }

    canvas {
        display: none !important;
    }

    .login-section {
        padding: 1rem;
    }

    #transcriptionContainer {
        display: flex !important;
        flex-direction: column;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0.5rem 1rem;
        overflow-y: auto;
    }

    aside,
    .theme-selector,
    label[for="toggle"] {
        display: none !important;
    }
}

/* ------------------------------------------------ */
/* RESPONSIVE: HORIZONTAL LAYOUT FOR WIDE SCREENS */
/* ------------------------------------------------ */

/* Responsive styles for wide screens*/
@media screen and (min-width: 1024px) and (max-height: 400px) {
    #loginBoxListener,
    #loginBoxListener *,
    #social_a,
    #socialButton,
    .theme-selector,
    label[for="toggle"],
    footer,
    aside,
    canvas,
    .lang-selector,
    .field-row.button-group {
        display: none !important;
    }

    #mainWrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4rem;
        padding: 1rem 3rem;
        width: 100%;
    }

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

    #loginBoxMaster {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 60vw !important;
        max-width: 1150px !important;
        padding: 1.2rem 2rem !important;
        background: var(--login-bg);
        border-radius: 12px;
        box-shadow: var(--login-shadow);
        text-align: center;
        min-height: 180px !important;
    }

    #masterLogin {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
        width: 100%;
        align-items: center;
        justify-items: center;
    }

    #loginBoxMaster h2 {
        grid-column: 1 / 3;
        margin-bottom: 0.3rem;
    }

    #originLabel,
    #transcriptionLabel,
    #codeLabel {
        font-weight: bold;
        display: block !important;
        text-align: left;
        width: 100%;
        margin-bottom: 0.2rem;
        padding-left: 4px;
        opacity: 0.85;
    }

    #masterLogin .field-row:nth-child(1),
    #masterLogin .field-row:nth-child(2) {
        width: 100%;
        display: flex !important;
        flex-direction: column;
    }

    #originLanguageSelect,
    #targetLanguageSelect {
        width: 100% !important;
        margin: 0 !important;
    }

    #usernameInputContainer {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 0.25rem !important;
    }

    #usernameInput {
        width: 100% !important;
        margin: 0 !important;
    }

    #passwordInput {
        display: none !important;
    }

    #masterLogin .button-group {
        grid-column: 2 / 3;
        width: 100%;
        display: flex !important;
        justify-content: center;
    }

    #loginButton {
        width: 100% !important;
        margin: 0;
        padding: 10px 0 !important;
    }
}

/* Responsive styles for logged-in wide screens */
@media screen and (min-width: 1024px) and (max-height: 400px) {
    body.logged-in #loginContainer,
    body.logged-in #loginBoxMaster,
    body.logged-in #loginBoxListener,
    body.logged-in #register,
    body.logged-in footer,
    body.logged-in aside,
    body.logged-in canvas,
    body.logged-in .theme-selector,
    body.logged-in label[for="toggle"],
    body.logged-in .lang-selector,
    body.logged-in #infoMessage,
    body.logged-in #toggleVisualizerButton,
    body.logged-in #recordButton,
    body.logged-in #buttons {
        display: none !important;
    }

    body.logged-in #mainWrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        padding: 1rem 3rem;
        gap: 4rem;
    }

    body.logged-in #logo {
        max-height: 80px !important;
        width: auto !important;
    }

    body.logged-in #transcriptionContainer {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        width: 75vw !important;
        max-width: 1400px !important;

        padding: 0.3rem !important;
        background: var(--login-bg);
        border-radius: 14px;
        box-shadow: var(--login-shadow);
        text-align: center;
        min-height: auto !important;
        max-height: 90vh;
    }

    body.logged-in .transcription-section {
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-height: 100%;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    body.logged-in .transcription-title {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.2rem !important;
        text-align: center !important;
        padding: 0 !important;
    }

    body.logged-in .transcription-section article p {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
        padding: 0.3rem !important;
        overflow-wrap: break-word;
        white-space: pre-line;
        word-break: break-word;
        margin: 0 !important;
        text-align: center;
    }

    body.logged-in .status-banner {
        display: none !important;
    }
}
