body {
    color: white;
    background: radial-gradient(109.32% 109.32% at 46.97% 88.98%, #1A1A1E 0%, #100c1a 100%);
}

h1, h2, h3 {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    text-align: center;
}

h2 {
    font-size: 34px;
}

span, p, input, button {
    font-size: 16px !important;
}

* {
    transition: all 0.3s;
}

*:not(input, p) {
    user-select: none;
    -webkit-user-select: none;
}

button, div {
    transition: all 0.3s;
}

main {
    position: relative;
    width: 100%;
    max-width: 370px;
    height: 600px;
    overflow: hidden;
}

.page {
    position: absolute;
    top: 30px;
    left: 30px;
    width: calc(100% - 60px);
    height: calc(100% - 60px);
    transition: width 0.3s ease, height 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    gap: 22px;
}

.page > * {
    width: 100%;
}

.page > .column {
    gap: 12px;
}

.page > .column span {
    text-align: center;
    color: #81818D;
}

.email.page {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

.qr.page {
    transform: translateX(120%);
    opacity: 0;
    z-index: 1;
}

main.show-qr {
    max-width: 350px;
    height: 490px;
}

main.show-email {
    max-width: 370px;
    height: 600px;
}

main.show-qr .email.page {
    transform: translateX(-120%);
    opacity: 0;
}

main.show-qr .qr.page {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

main.show-email .qr.page {
    transform: translateX(120%);
    opacity: 0;
}

main.show-email .email.page {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

.icon {
    background-image: url(../../../../static/img/icon.svg);
    background-size: 100px;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.4);
    width: 105px;
    height: 105px;
    padding: 15px;
    border-radius: 36px;
}

.field {
    position: relative;
    border: 1px solid #252529;
    border-radius: 12px;
    outline: 2px solid #16151c;
}

.field:focus-within {
    outline-color: #252529;
}

.field label {
    position: absolute;
    top: 12px;
    left: 20px;
    color: #6a7575;
    background-color: #17161d;
    width: calc(100% - 28px);
}

.field:focus-within label,
.field.has-value label {
    top: -6px;
    font-size: 13px;
    background-color: #17161d;
    width: auto;
    padding: 0 4px;
    box-sizing: border-box;
}

.field input {
    color: white;
    background-color: transparent;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    box-sizing: border-box;
}

.field p {
    position: absolute;
    top: 11px;
    right: 20px;
    background-color: #17161d;
}

.field.error {
    border-color: #da3e44;
}

.field.error label {
    color: #da3e44;
}

.error {
    color: #da3e44;
    padding-left: 5px;
}

.email.field input {
    width: calc(100% - 95px);
}

.page button, .submit-code-btn {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    height: 46px;
    border-radius: 10px;
}

.stay-in {
    justify-content: space-between;
    width: 100%;
}

.login-qr-btn {
    color: #2d00f3;
    background-color: #211736;
}

.login-qr-btn:hover {
    background-color: #281b41;
}

.code {
    background-color: white;
    padding: 18px;
    border-radius: 34px;
}

.suggestions div {
    gap: 12px;
}

.popup form {
    align-items: center;
    padding: 0 10px;
    gap: 26px;
}

.mail-icon {
    background-image: url(../img/mail.svg);
    background-size: 150px;
    width: 155px;
    height: 155px;
}

.title {
    gap: 8px;
}

.change-mail-btn {
    background-image: url(../img/change-mail.svg);
    background-size: 30px;
    background-color: transparent;
    width: 40px;
    height: 40px;
    border-radius: 40px;
}

.change-mail-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.codes {
    gap: 8px;
}

.codes input {
    font-size: 18px !important;
    text-align: center;
    color: white;
    background-color: transparent;
    width: 45px;
    padding: 12px;
    border: 1px solid #252529;
    border-radius: 12px;
    outline: 2px solid #16151c;
}

.codes input:focus::placeholder {
    color: transparent;
}

.codes input:focus {
    outline-color: #252529;
}

.codes input.error {
    border-color: #da3e44;
    outline-color: #da3e44;
}

.codes input.correct {
    border-color: #43a25a;
    outline-color: #43a25a;
}
.codes input.wrong { border-color: #e5484d; animation: code-shake .3s; }
@keyframes code-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ===== выбор домена почты ===== */
.email.field input[name="email"] { width: 100%; }

.email.field .domain-btn {
    position: absolute;
    top: 5px;
    right: 6px;
    height: 34px;
    padding: 0 10px 0 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    border: none;
    border-radius: 9px;
    background-color: #201f28;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.email.field .domain-btn:hover { background-color: #27262f; }

.email.field .domain-btn::after {
    content: "";
    width: 5px;
    height: 5px;
    margin: -3px 0 0 8px;
    border-right: 2px solid #6a7575;
    border-bottom: 2px solid #6a7575;
    transform: rotate(45deg);
    transition: transform .15s, margin .15s;
}

.email.field .domain-btn[aria-expanded="true"]::after {
    margin-top: 3px;
    transform: rotate(-135deg);
}

.email.field .domain-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    min-width: 230px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: #17161d;
    border: 1px solid #252529;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}

.email.field .domain-menu[hidden],
.email.field .domain-custom[hidden] { display: none; }

.email.field .domain-opt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.email.field .domain-opt:hover,
.email.field .domain-opt.active { background-color: #201f28; }
.email.field .domain-opt.active::after { content: "✓"; color: #6a7575; }
.email.field .domain-other { color: #9aa5a5; }

.email.field .domain-custom { padding: 6px 6px 4px; }

.email.field .domain-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px 0 12px;
    border: 1px solid #252529;
    border-radius: 9px;
}

.email.field .domain-row span { color: #6a7575; }

.email.field .domain-menu input.domain-input {
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 9px 4px;
    border-radius: 0;
}

.email.field .domain-apply {
    padding: 6px 10px;
    border: none;
    border-radius: 7px;
    background-color: #2d2c36;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.email.field .domain-hint {
    min-height: 18px;
    padding: 6px 4px 0;
    font-size: 13px;
    color: #6a7575;
}

.email.field .domain-hint.ok { color: #3fb950; }
.email.field .domain-hint.bad { color: #da3e44; }
