﻿.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.48);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.auth-modal-overlay.active {
    display: flex;
}
.auth-modal {
    background: #fffdf9;
    border: 3px solid #2c2c2c;
    border-radius: 24px;
    padding: 28px 26px 22px;
    max-width: 420px;
    width: 100%;
    box-shadow: 8px 8px 0 #2c2c2c;
    animation: authPop 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
@keyframes authPop {
    0% { transform: scale(0.92) translateY(8px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.auth-modal .close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f5f0e8;
    border: 2px solid #2c2c2c;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 16px;
    cursor: pointer;
    color: #2c2c2c;
    line-height: 1;
    transition: transform 0.2s, background 0.15s;
}
.auth-modal .close-btn:hover {
    transform: rotate(90deg);
    background: #fff;
}
.auth-modal h2 {
    font-size: 24px;
    margin: 0 40px 4px 0;
    letter-spacing: 0.5px;
    font-weight: 900;
}
.auth-modal .tabs {
    display: none;
}
.auth-modal .auth-sub {
    margin: 0 40px 14px 0;
    font-size: 13px;
    color: #718096;
    font-weight: 600;
}
.auth-modal .switch-link .sep {
    margin: 0 6px;
    color: #cbd5e0;
}
.auth-modal .form-group {
    margin-bottom: 13px;
}
.auth-modal .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}
.auth-modal .form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #2c2c2c;
    border-radius: 11px;
    background: #fffdf9;
    font-size: 14px;
    font-family: inherit;
    box-shadow: 3px 3px 0 #2c2c2c;
    outline: none;
    transition: all 0.15s;
}
.auth-modal .form-group input:focus {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #2c2c2c;
}
.auth-modal .email-code-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.auth-modal .email-code-row input {
    flex: 1;
    min-width: 0;
}
.auth-modal .email-code-row .btn-send-code {
    padding: 0 12px;
    border: 2px solid #2c2c2c;
    border-radius: 11px;
    background: #f7fafc;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #2c2c2c;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.auth-modal .email-code-row .btn-send-code:hover {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #2c2c2c;
}
.auth-modal .email-code-row .btn-send-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.auth-modal .btn-submit {
    width: 100%;
    margin-top: 4px;
    padding: 13px;
    background: #2c2c2c;
    color: #fff;
    border: 2px solid #2c2c2c;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    box-shadow: 4px 4px 0 rgba(44,44,44,.35);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.auth-modal .btn-submit:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 rgba(44,44,44,.35);
}
.auth-modal .btn-submit:active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 rgba(44,44,44,.35);
}
.auth-modal .message {
    padding: 9px 12px;
    border-radius: 10px;
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 13px;
    display: none;
}
.auth-modal .message.error {
    display: block;
    background: #fed7d7;
    color: #9b2c2c;
    border: 2px solid #fc8181;
}
.auth-modal .message.success {
    display: block;
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #68d391;
}
.auth-modal .switch-link {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}
.auth-modal .switch-link a {
    color: #2c2c2c;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.auth-modal .hint-text {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 4px;
}
@media (max-width: 480px) {
    .auth-modal {
        padding: 22px 16px 18px;
        border-radius: 18px;
    }
    .auth-modal .email-code-row {
        flex-direction: column;
    }
    .auth-modal .email-code-row .btn-send-code {
        padding: 10px;
    }
}
