/**
 * 优化流程样式
 * 包含：进度显示、结果展示
 */

/* 优化进度容器 */
.optimization-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.progress-content {
  background: white;
  border-radius: 16px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.progress-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.progress-text {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 32px;
  background: #f0f0f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  transition: width 0.3s ease;
  min-width: 32px;
}

.progress-tip {
  font-size: 14px;
  color: #666;
}

/* 优化结果容器 */
.optimization-result {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.result-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.result-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

.result-info {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.result-content {
  margin-bottom: 24px;
}

.content-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  max-height: 400px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.content-box::-webkit-scrollbar {
  width: 6px;
}

.content-box::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.content-box::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.content-box::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-btn.primary {
  background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.action-btn.primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.action-btn.secondary {
  background: linear-gradient(135deg, #2196F3 0%, #03A9F4 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.action-btn.secondary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.action-btn:not(.primary):not(.secondary) {
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
}

.action-btn:not(.primary):not(.secondary):active {
  background: #f5f5f5;
  transform: translateY(2px);
}

/* 响应式设计 */
@media (min-width: 768px) {
  .result-actions {
    flex-direction: row;
  }
  
  .action-btn {
    flex: 1;
  }
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 90%;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.notification.success {
  border-left: 4px solid #4CAF50;
}

.notification.error {
  border-left: 4px solid #f44336;
}

.notification.warning {
  border-left: 4px solid #ff9800;
}

.notification.info {
  border-left: 4px solid #2196F3;
}

.notification-icon {
  font-size: 24px;
}

.notification-message {
  flex: 1;
  font-size: 15px;
  color: #333;
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

