/* ===== 登录弹窗样式 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.show { display: flex; }

.modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #B0ADA5;
    cursor: pointer;
    line-height: 1;
}
.close-btn:hover { color: #2B2B2B; }

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}
.modal-header h2 {
    font-family: "Songti SC", "Noto Serif SC", serif;
    font-size: 24px;
    color: #2B2B2B;
    margin-bottom: 6px;
}
.modal-header p { color: #5A6A76; font-size: 14px; }

.modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #E0DCD3;
}
.modal-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-size: 15px;
    color: #5A6A76;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.modal-tab.active {
    color: #B83B43;
    border-bottom: 2px solid #B83B43;
    margin-bottom: -2px;
}

.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    color: #5A6A76;
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E0DCD3;
    border-radius: 8px;
    font-size: 14px;
    color: #2B2B2B;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background: #F7F5F0;
}
.form-group input:focus {
    border-color: #3E5C76;
    background: white;
}

.agreement-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #5A6A76;
    margin-bottom: 16px;
    cursor: pointer;
}
.agreement-row input { margin-top: 2px; }
.agreement-link {
    color: #3E5C76;
    text-decoration: underline;
    cursor: pointer;
}
.agreement-link:hover { color: #B83B43; }

.error-message {
    color: #B83B43;
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 20px;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: #B83B43;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.modal-btn:hover { background: #9E2E36; }
.modal-btn:disabled {
    background: #D0C9C0;
    cursor: not-allowed;
}

.modal-link {
    text-align: center;
    margin-top: 14px;
}
.modal-link a {
    color: #3E5C76;
    font-size: 13px;
    text-decoration: none;
}
.modal-link a:hover { color: #B83B43; }

/* Register method tabs */
.register-method-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #E0DCD3;
}
.register-method-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    font-size: 13px;
    color: #5A6A76;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.register-method-tab.active {
    color: #3E5C76;
    border-bottom: 2px solid #3E5C76;
    margin-bottom: -1px;
}

/* Invite modal */
.invite-modal .share-link-box {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}
.invite-modal .share-link-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #E0DCD3;
    border-radius: 8px;
    background: #F7F5F0;
    font-size: 13px;
    color: #5A6A76;
}
.invite-modal .share-link-box button {
    padding: 10px 20px;
    border: none;
    background: #B83B43;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}
