.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 0 5px;
    padding-top: var(--top-inset);
    height: 40px;
    width: calc(100% - 10px);
    max-width: 1100px;
    background-color: var(--bg-primary);
    transition: transform 0.4s ease;
    z-index: 1100;
    user-select: none;
}

#module-version,
#title {
    padding-left: 5px;
    font-size: 16.5px;
    font-weight: bold;
}

.no-connection {
    padding: 0;
    display: none;
    margin-right: 0px;
    background: none;
    border: none;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-button {
    padding-top: 5px;
    background: none;
    border: none;
}

.language-icon {
    fill: var(--text-primary);
}

.language-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 5px;
    background-color: var(--bg-secondary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1800;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    opacity: 0;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
    transform: translateY(-30px) scale(0);
    transform-origin: top right;
    transition: all 0.2s ease;
}

.language-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.language-option {
    flex-shrink: 0;
    padding: 8px 10px;
    text-align: center;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: none;
    font-size: 16px;
    width: 100%;
    white-space: nowrap;
    position: relative;
    user-select: none;
}

.language-option::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10px;
    width: calc(100% - 20px);
    height: 1px;
    background-color: var(--border-color);
}

.language-option:last-child::after {
    content: none;
}

.language-option:first-child {
    padding-top: 10px;
}

.language-option:last-child {
    padding-bottom: 10px;
}

.language-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: none;
    z-index: 1100;
    display: none;
}

.help-button {
    padding-left: 5px;
    margin-right: auto;
    background: none;
    border: none;
}

.help-overlay {
    z-index: 2000;
    align-items: center;
}

.help-menu {
    position: relative;
    width: calc(95vw - 60px);
    max-width: 800px;
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 15px;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
}

.help-content-header {
    font-size: 26px;
    user-select: none;
}

.instruction strong {
    font-size: 18px;
}

.instruction p {
    margin: 0;
}