/* ============================================================
   登录 / 注册弹层（落地页与应用内通用）
   ============================================================ */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-modal.open { display: flex; }
.auth-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 13, 26, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.auth-modal-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 18px;
    padding: 30px 28px 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    animation: authModalIn .25s ease;
}
@keyframes authModalIn {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}
.auth-modal-close:hover { color: #334155; }
.auth-modal-title {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
    padding-right: 24px;
}
.auth-modal-tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0 16px;
    border-bottom: 2px solid #eef2f7;
}
.auth-modal-tab {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}
.auth-modal-tab:hover { color: #64748b; }
.auth-modal-tab.active {
    color: #7c5cff;
    border-bottom-color: #7c5cff;
}
.auth-modal-form { display: none; }
.auth-modal-form.active { display: block; }
.auth-modal-field { margin-bottom: 14px; }
.auth-modal-field label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}
.auth-modal-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.auth-modal-field input:focus {
    border-color: #7c5cff;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}
.auth-modal-err {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin: 0 0 12px;
}
.auth-modal-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .2s, opacity .2s;
}
.auth-modal-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #7c5cff 0%, #4f8bff 100%);
    box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
}
.auth-modal-btn-primary:hover { filter: brightness(1.06); }
.auth-modal-btn-primary:disabled { opacity: .6; cursor: not-allowed; }
