.grid-gallery {
    padding-bottom: 24px;
}

.gallery-item.failed-card {
    border: 2px solid #ff4d4f;
}

/* 错误信息覆盖层 */
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
    text-align: center;
    padding: 15px;
    box-sizing: border-box;
}

.error-icon {
    font-size: 40px;
    color: #ff4d4f;
    margin-bottom: 8px;
}

.error-message {
    font-size: 14px;
    margin-bottom: 12px;
    word-break: break-word;
}

/* 加载动画 */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3; /* 浅色背景 */
    border-top: 4px solid #3498db; /* 蓝色旋转部分 */
    border-radius: 50%;
    animation: spin 1s linear infinite; /* 旋转动画 */
}

@keyframes spin {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg); 
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* 禁用点击事件 */
.gallery-item[style*="pointer-events: none"] {
    cursor: not-allowed;
}