/* 算法选择拟态框样式 - 带粒子效果和科技感 */
:root {
  --primary-color: #00a8ff;
  --secondary-color: #0f1e3d;
  --accent-color: #2ecc71;
  --border-color: rgba(0, 168, 255, 0.3);
  --text-color: #e2e2e2;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --gradient-start: #121e30;
  --gradient-end: #1f3f60;
}

/* 基础模态框样式 */
.algorithm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 25, 47, 0.85);
  z-index: 1500;
  backdrop-filter: blur(8px);
}

.algorithm-modal-content {
  position: relative;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  margin: 10% auto;
  padding: 30px;
  width: 500px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 168, 255, 0.2), 
              0 0 60px rgba(0, 168, 255, 0.1), 
              inset 0 0 15px rgba(0, 168, 255, 0.1);
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: modalFadeIn 0.4s ease-out;
  transform-origin: center;
}

/* 高科技边框效果 */
.algorithm-modal-content::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: linear-gradient(45deg, 
    transparent 20%, 
    rgba(0, 168, 255, 0.3) 40%, 
    rgba(0, 168, 255, 0.8) 50%, 
    rgba(0, 168, 255, 0.3) 60%, 
    transparent 80%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderRotate 10s linear infinite;
  z-index: -1;
}

@keyframes borderRotate {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 标题样式 */
.algorithm-modal-title {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 24px;
  text-align: center;
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  width: 100%;
  text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

.algorithm-modal-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* 算法选项样式 */
.algorithm-selection {
  margin: 25px 0;
}

.algorithm-option {
  background-color: rgba(15, 30, 61, 0.6);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.algorithm-option:hover {
  background-color: rgba(15, 40, 80, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 168, 255, 0.2);
}

.algorithm-option.selected {
  background-color: rgba(15, 40, 80, 0.9);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.4);
  border: 1px solid rgba(0, 168, 255, 0.6);
}

.algorithm-option.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.algorithm-option-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.algorithm-icon {
  margin-right: 12px;
  width: 24px;
  height: 24px;
  color: var(--primary-color);
}

.algorithm-option label {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 500;
}

.algorithm-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  margin-right: 10px;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.algorithm-option input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  background-color: var(--primary-color);
  box-shadow: 0 0 8px var(--primary-color);
}

.algorithm-option input[type="radio"]:checked::before {
  transform: scale(1);
}

.algorithm-desc {
  margin: 5px 0 0 30px;
  font-size: 14px;
  color: rgba(226, 226, 226, 0.7);
  position: relative;
}

/* 算法指标展示 */
.algorithm-metrics {
  display: flex;
  margin-top: 8px;
  margin-left: 30px;
}

.metric {
  margin-right: 15px;
  font-size: 12px;
  display: flex;
  align-items: center;
  color: rgba(226, 226, 226, 0.8);
}

.metric-icon {
  margin-right: 4px;
  color: var(--primary-color);
}

.metric-value {
  font-weight: 500;
}

/* 按钮样式 */
.algorithm-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.algorithm-modal-button {
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: none;
  outline: none;
}

.algorithm-modal-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.algorithm-modal-button:hover::before {
  left: 100%;
}

.start-algorithm-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.start-algorithm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.cancel-algorithm-btn {
  background: rgba(15, 30, 61, 0.6);
  color: #e2e2e2;
  border: 1px solid var(--border-color);
}

.cancel-algorithm-btn:hover {
  background: rgba(15, 40, 80, 0.8);
  transform: translateY(-2px);
}

/* 粒子背景 */
.algorithm-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 动画效果 */
@keyframes algorithmPulse {
  0% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.7; transform: scale(1); }
}

/* 执行中状态效果 */
.processing {
  animation: algorithmPulse 2s infinite;
}

/* 数字掐表效果 */
.countdown {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: var(--text-color);
  background: rgba(15, 30, 61, 0.5);
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.countdown-value {
  color: var(--primary-color);
  font-weight: bold;
  font-family: 'Courier New', monospace;
} 