.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #28a745;
    color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(200%);
    transition: transform 0.3s ease-in-out;
    z-index: 9999; /* 提高z-index确保在最上层 */
    min-width: 200px;
    text-align: center;
    font-weight: 500;
}

.notification.show {
    transform: translateX(0);
}

/* 自定义确认对话框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    position: relative; /* 确保相对定位 */
    margin: auto; /* 居中对齐 */
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 30px;
    text-align: center;
    font-size: 1.1rem;
    color: #333;
}

.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 100px; /* 确保按钮有最小宽度 */
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-cancel {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e1e5e9;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* 退出登录对话框特殊样式 */
.modal-logout .modal-header {
    background: linear-gradient(135deg, #b02a37 0%, #a01e2a 100%);
}

.modal-logout .modal-body {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    border: 1px solid #f5c6cb;
    position: relative;
}


.modal-logout .modal-body p {
    color: #721c24;
    font-weight: 500;
    margin-left: 35px; /* 为警告图标留出空间 */
    margin-top: 0;
    margin-bottom: 0;
}

.btn-logout {
    background: linear-gradient(135deg, #b02a37 0%, #a01e2a 100%) !important;
    color: white !important;
    font-weight: 600;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #a01e2a 0%, #951b26 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(176, 42, 55, 0.3);
}

.modal-logout .btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
}

.modal-logout .btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* 复选框样式 */
.record-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.record-item.batch-mode .record-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/* 图片模态框样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.image-modal-content img {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    display: block;
}

.image-modal-actions {
    padding: 15px;
    display: flex;
    justify-content: center;
    background: #f8f9fa;
}

.download-single-btn {
    background: transparent;
    border: 2px solid #705DBC;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #705DBC;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-single-btn:hover {
    background: #705DBC;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(112, 93, 188, 0.3);
}

/* 下载原图按钮（与 .download-single-btn 保持一致风格） */
.download-origin-btn_7ree {
    background: transparent;
    border: 2px solid #705DBC;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #705DBC;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-origin-btn_7ree:hover {
    background: #705DBC;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(112, 93, 188, 0.3);
}

/* 图片加载状态样式优化：确保完全居中与更好的可读性 _7ree */
.image-modal .image-loading {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    min-height: 220px;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    gap: 12px;
}

.image-modal .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #705DBC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 6px;
}

.image-modal .loading-text {
    color: #333; /* 加深颜色，提升对比度 */
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* 移动端优化 */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .image-modal-content img {
        max-height: calc(95vh - 70px);
    }
}
