.modal-backdrop .modal-container:has(.language-modal-shell),
.modal-backdrop .modal-container.modal-container--language {
    box-sizing: border-box;
    width: min(94vw, 360px);
    max-width: min(94vw, 360px);
    padding: 1.35rem 1.25rem 1.35rem;
    background: radial-gradient(120% 120% at 8% 0%, #20235b 0%, #151742 42%, #10122f 100%);
    border: 1px solid rgba(135, 97, 255, 0.28);
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.52);
    overflow: hidden;
    flex-direction: column;
    align-items: stretch;
    color: #fff;
}

.language-modal-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.language-modal-brand {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.35rem;
}

.language-modal-logo {
    height: 34px;
    width: auto;
    max-width: min(100%, 200px);
    object-fit: contain;
    display: block;
}

.language-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
}

.language-modal-title {
    margin: 0;
    font-size: clamp(1.15rem, 4vw, 1.35rem);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.language-modal-subtitle {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.3;
    color: #8b86a8;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.language-option {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-width: 0;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(137, 142, 190, 0.22);
    border-radius: 14px;
    background: rgba(25, 29, 71, 0.8);
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.language-option:hover {
    background: rgba(36, 40, 82, 0.92);
}

.language-option.active {
    border-color: #7f61ff;
    background: linear-gradient(170deg, rgba(52, 48, 87, 0.95) 0%, rgba(43, 41, 74, 0.95) 100%);
    box-shadow: inset 0 0 0 1px rgba(127, 97, 255, 0.35), 0 0 0 1px rgba(127, 97, 255, 0.18);
}

.language-option-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #3f3d63;
    border: 2px solid rgba(255, 255, 255, 0.16);
    overflow: hidden;
    flex-shrink: 0;
}

.language-option-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.language-option-label {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

@media (max-width: 420px) {
    .modal-backdrop .modal-container:has(.language-modal-shell),
    .modal-backdrop .modal-container.modal-container--language {
        width: min(98vw, 360px);
        max-width: 98vw;
        padding: 1.15rem 1rem 1.2rem;
    }

    .language-option {
        padding: 0.72rem 0.85rem;
    }
}
