.zql-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.zql-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.zql-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.zql-modal-close:hover {
    color: #333;
}

.zql-auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.zql-auth-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.zql-auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.zql-auth-tabs button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.zql-auth-tabs button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.zql-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.zql-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zql-form-group label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.zql-form-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.zql-form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.zql-form-group input.error {
    border-color: #dc3545;
}

.zql-field-error {
    font-size: 12px;
    color: #dc3545;
}

.zql-auth-error {
    padding: 10px;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    color: #c62828;
    font-size: 14px;
    margin-bottom: 16px;
}

.zql-submit-btn {
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.zql-submit-btn:hover:not(:disabled) {
    background: #0056b3;
}

.zql-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.zql-merge-modal {
    max-width: 450px;
}

.zql-merge-header {
    text-align: center;
    margin-bottom: 20px;
}

.zql-merge-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.zql-merge-body p {
    margin: 0 0 12px;
    color: #666;
    font-size: 14px;
}

.zql-merge-posts {
    margin: 0 0 16px;
    padding-left: 20px;
    max-height: 150px;
    overflow-y: auto;
}

.zql-merge-posts li {
    padding: 6px 0;
    color: #333;
    font-size: 14px;
}

.zql-merge-hint {
    font-size: 12px;
    color: #999;
}

.zql-merge-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.zql-merge-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.zql-merge-btn.primary {
    background: #007bff;
    color: #fff;
}

.zql-merge-btn.primary:hover:not(:disabled) {
    background: #0056b3;
}

.zql-merge-btn.secondary {
    background: #f5f5f5;
    color: #666;
}

.zql-merge-btn.secondary:hover {
    background: #e0e0e0;
}

.zql-merge-btn.tertiary {
    background: none;
    color: #999;
    font-size: 12px;
}

.zql-merge-btn.tertiary:hover {
    color: #666;
}

.zql-merge-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.zql-user-display .zql-user-info {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f5f5f5;
    transition: background 0.2s;
    line-height: 1;
}

.zql-user-display .zql-user-info:hover {
    background: #e8e8e8;
}

.zql-user-display .zql-avatar {
    font-size: var(--zql-font-md, 13px);
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    line-height: 1;
}

.zql-user-display .zql-nickname {
    font-size: var(--zql-font-md, 13px);
    color: var(--douban-gray, #999);
    line-height: 1;
}

.zql-auth-buttons {
    display: flex;
    gap: 8px;
}

.zql-login-btn,
.zql-register-btn {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.zql-login-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
}

.zql-login-btn:hover {
    background: #e8e8e8;
}

.zql-register-btn {
    background: #007bff;
    border: 1px solid #007bff;
    color: #fff;
}

.zql-register-btn:hover {
    background: #0056b3;
}

.zql-user-display {
    display: flex;
    align-items: center;
    margin-left: auto;
    position: relative;
}

/**
 * ⚠️ 用户菜单弹出卡片样式（2026-04-28 新增）：
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 点击已登录用户区域弹出的下拉菜单，包含：
 * - 用户名 + 用户类型标签
 * - 红色"退出登录"按钮
 * 
 * 布局说明：
 * - .zql-user-display 设 position: relative 作为定位基准
 * - .zql-user-menu 设 position: absolute + top:100% + right:0
 *   实现右对齐下拉效果
 * - z-index: 10001 确保菜单在最上层显示
 * 
 * 交互说明：
 * - 退出登录按钮使用红色（#e74c3c）强调危险操作
 * - hover 时背景变浅红（#fff5f5）+ 文字变深红（#c0392b）
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

.zql-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    min-width: 160px;
    z-index: 10001;
    overflow: hidden;
}

.zql-user-menu-header {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.zql-user-menu-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.zql-user-menu-type {
    font-size: 12px;
    color: #999;
}

.zql-user-menu-divider {
    height: 1px;
    background: #f0f0f0;
}

.zql-user-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.zql-user-menu-item:hover {
    background: #f5f5f5;
    color: #333;
}

.zql-user-menu-logout {
    color: #e74c3c;
}

.zql-user-menu-logout:hover {
    background: #fff5f5;
    color: #c0392b;
}

.douban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
