* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1540px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

header p{
  font-size: 16px;
  color: #666;
}

.section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f2f3;
}

/* 文件上传区域 */
.file-upload {
  border: 3px dashed #d1d8e0;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.file-upload:hover,
.file-upload.dragover {
  border-color: #3498db;
  background-color: #e3f2fd;
}

.file-upload-icon {
  font-size: 4rem;
  margin-bottom: 10px;
  color: #7e8a98;
}

.file-upload-text {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #555;
}

.file-upload-btn {
  background: linear-gradient(135deg, #3498db, #2c3e50);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.file-upload-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.file-info {
  margin-top: 20px;
  padding: 15px;
  background: #edf7ff;
  border-radius: 8px;
  display: none;
}

/* 算法选择区域 */
.algorithm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 15px;
}

.algorithm-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.algorithm-item:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.algorithm-item input {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.algorithm-item label {
  font-size: 1.1rem;
  color: #2d3748;
  cursor: pointer;
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.algorithm-icon {
  font-size: 1.5rem;
}

/* 进度条 */
.progress-container {
  margin-top: 20px;
  display: none;
}

.progress-bar {
  height: 12px;
  background-color: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  font-size: 1rem;
  color: #4a5568;
}

/* 结果区域 */
.results {
  display: none;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.results-table th {
  background: linear-gradient(135deg, #3498db, #2c3e50);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

.results-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.results-table tr:nth-child(odd) {
  background-color: white;
}

.results-table td {
  padding: 15px;
  border-bottom: 1px solid #e2e8f0;
  word-break: break-all;
  font-family: monospace;
  font-size: 14px;
}

.copy-btn {
  background: #2ecc71;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.copy-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
}

.copy-all-btn {
  display: inline-block;
  background: #3498db;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.copy-all-btn:hover {
  background: #2980b9;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

/* 算法说明 */
.algorithms-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.algorithm-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.algorithm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

.algorithm-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 1.3rem;
}

.algorithm-card p {
  color: #4a5568;
  line-height: 1.7;
}

/* 响应式调整 */
@media (max-width: 1400px) {
  body {
      min-width: 100%;
      padding: 10px;
  }

  .container {
      padding: 10px;
  }
}

.footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  background: #2ecc71;
  color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transform: translateX(150%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.warning {
  background-color: #ffecb3;
  border-left: 4px solid #ffc107;
  padding: 15px;
  margin: 20px 0;
  border-radius: 4px;
}

.btn-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.action-btn {
  padding: 12px 25px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
  font-size: 1rem;
}

.calculate-btn {
  background: linear-gradient(135deg, #3498db, #2c3e50);
  color: white;
}

.reset-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.action-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
