/* 加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.loading-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.loading-status {
    color: #718096;
    margin-bottom: 15px;
    font-size: 14px;
}

.logs-container {
    flex: 1;
    overflow-y: auto;
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    border: 1px solid #e2e8f0;
}

.log-entry {
    padding: 4px 0;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-entry.info {
    color: #2d3748;
}

.log-entry.success {
    color: #38a169;
    font-weight: 600;
}

.log-entry.warning {
    color: #d69e2e;
}

.log-entry.error {
    color: #e53e3e;
    font-weight: 600;
}

.log-entry .timestamp {
    color: #a0aec0;
    margin-right: 8px;
}

.loading-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.loading-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

.progress-fill.indeterminate {
    width: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        #667eea, 
        transparent
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 等待锁的特殊动画 */
.waiting-lock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    border-radius: 4px;
    margin-bottom: 15px;
}

.lock-icon {
    font-size: 24px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

.waiting-text {
    flex: 1;
}

.waiting-text .title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.waiting-text .subtitle {
    font-size: 13px;
    color: #718096;
}

/* 滚动条样式 */
.logs-container::-webkit-scrollbar {
    width: 8px;
}

.logs-container::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
