
/* 背景缓存功能样式 */

/* 缓存状态显示 */
.settings-sidebar .bg-cache-status {
    display: inline-block !important;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

.cache-status-idle {
    background: rgba(108, 117, 125, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.cache-status-caching {
    background: rgba(0, 123, 255, 0.2);
    color: rgba(0, 123, 255, 0.9);
    border: 1px solid rgba(0, 123, 255, 0.3);
    animation: pulse 1.5s infinite;
}

.cache-status-completed {
    background: rgba(40, 167, 69, 0.2);
    color: rgba(40, 167, 69, 0.9);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.cache-status-error {
    background: rgba(220, 53, 69, 0.2);
    color: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* 缓存按钮样式 */
.settings-sidebar .bg-cache-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    margin-top: 10px;
    background: linear-gradient(135deg, #00b09b, #96c93d) !important;
    border: none;
    border-radius: 20px;
    color: white !important;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 176, 155, 0.2);
    position: relative;
    overflow: hidden;
    width: 100px;
    height: 40px;
    opacity: 1 !important;
    visibility: visible !important;
}

.bg-cache-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 176, 155, 0.3);
}

.bg-cache-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 176, 155, 0.2);
}

.bg-cache-btn:disabled {
    background: rgba(108, 117, 125, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bg-cache-btn.clear-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    margin-left: 10px;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

.bg-cache-btn.clear-btn:hover {
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.3);
}

/* 缓存进度条 */
.bg-cache-progress-container {
    margin-top: 15px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.bg-cache-progress {
    height: 100%;
    background: linear-gradient(90deg, #00b09b, #96c93d);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.bg-cache-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

.bg-cache-progress-text {
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 缓存按钮组 */
.settings-sidebar .bg-cache-buttons {
    display: flex !important;
    margin-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 确保缓存按钮在设置面板中可见 */
.settings-sidebar .bg-cache-buttons .mode-btn {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 缓存信息区域 */
.bg-cache-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(40, 40, 40, 0.2);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.bg-cache-info p {
    margin: 5px 0;
}

.bg-cache-info .tip {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}
