.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 10, 15, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.auth-modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 24px;
    padding: 40px 36px 36px;
    border-radius: 24px;
    background: rgba(22, 28, 42, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
    transform: translateY(24px);
    transition: transform 0.28s ease;
}

.auth-modal-backdrop.is-visible .auth-modal {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.16s, background 0.16s;
}

.auth-modal-close:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.18s, border-color 0.18s;
}

.auth-tab.is-active {
    color: #eef2ff;
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #eef2ff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.18s, background 0.18s;
    font-family: inherit;
}

.auth-field input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.09);
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    color: #eef2ff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(18px);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.auth-submit:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-message {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.auth-message.is-error {
    display: block;
    background: rgba(220, 80, 80, 0.18);
    color: rgba(255, 160, 160, 0.95);
    border: 1px solid rgba(220, 80, 80, 0.25);
}

.auth-message.is-success {
    display: block;
    background: rgba(80, 200, 140, 0.18);
    color: rgba(140, 230, 180, 0.95);
    border: 1px solid rgba(80, 200, 140, 0.25);
}

.auth-trigger {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    color: #eef2ff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.auth-trigger:hover {
    transform: translateY(-4px) scale(1.03);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}