/**
 * 色卡图库专用样式
 * 基于GitHub暗黑风格
 */

/* ========================================
   色卡卡片样式（简化版）
   ======================================== */
.colorcard-gallery .minimal-image-card {
    position: relative;
    cursor: pointer;
}

/* 左下角图片名称显示 */
.colorcard-gallery .image-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(13, 17, 23, 0.95) 50%, rgba(13, 17, 23, 0.98) 100%);
    backdrop-filter: blur(8px);
    padding: 12px;
    border-top: 1px solid rgba(88, 166, 255, 0.12);
}

.colorcard-gallery .image-title-minimal {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.image-name-text {
    color: var(--text-primary, #e6edf3);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    letter-spacing: 0.2px;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.minimal-image-card:hover .image-name-text {
    color: var(--accent-hover, #79c0ff);
}

/* 悬停操作按钮组（预览按钮） */
.colorcard-gallery .image-hover-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 11;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 桌面端悬停显示按钮 */
@media (min-width: 768px) {
    .colorcard-gallery .minimal-image-card:hover .image-hover-actions {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/* 移动端始终显示预览按钮 */
@media (max-width: 767px) {
    .colorcard-gallery .image-hover-actions {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }
}

/* 预览按钮样式（参考空间图库） */
.colorcard-gallery .image-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.colorcard-gallery .image-action-btn:hover {
    background: rgba(88, 166, 255, 0.9);
    border-color: rgba(88, 166, 255, 1);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.4);
}

.colorcard-gallery .image-action-btn:active {
    transform: scale(0.95);
}

.colorcard-gallery .image-action-btn i {
    font-size: 16px;
}

/* ========================================
   响应式布局适配
   ======================================== */
@media (max-width: 768px) {
    .colorcard-download-btn .btn {
        width: 32px;
        height: 32px;
    }
    
    .colorcard-download-btn .btn i {
        font-size: 14px;
    }
    
    .image-name-text {
        font-size: 12px;
    }
}

/* ========================================
   加载状态
   ======================================== */
.colorcard-gallery .masonry-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

.colorcard-gallery .masonry-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(88, 166, 255, 0.3);
    border-top-color: var(--accent-primary, #58a6ff);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 100;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

