@import url('fonts/roboto.css');

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  color: #ffffff;
  min-height: 100vh;
}

.container-fluid.bg-gradient {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%) !important;
  background-attachment: fixed;
}

h1 {
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 2.5rem;
}

.btn-primary {
  background: linear-gradient(45deg, #007bff, #0056b3);
  border: none;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
  border-radius: 50px !important;
  padding: 12px 24px;
  margin: 0 5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
  background: linear-gradient(45deg, #0056b3, #004085);
}

.btn-success {
  background: linear-gradient(45deg, #28a745, #20c997);
  border: none;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  transition: all 0.3s ease;
  font-weight: 500;
  border-radius: 50px !important;
  padding: 12px 40px;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
  background: linear-gradient(45deg, #20c997, #198754);
}

#progress-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

#status-text, #speed-text {
  font-weight: 500;
  font-size: 1.1rem;
}

.progress {
  height: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #007bff, #28a745);
  transition: width 0.3s ease;
  border-radius: 10px;
}

#result-text {
  color: #00ff88;
  font-weight: 700;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.speed-value {
  font-size: 2rem;
  font-weight: 700;
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}



/* 响应式设计 - 移动优先 */
@media (max-width: 768px) {
  .btn-group.w-100 .btn {
    display: block;
    width: 100%;
    margin: 5px 0;
    border-radius: 50px !important;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 10px;
  }
  
  .speed-value {
    font-size: 1.5rem;
    padding: 8px;
  }
  

}

@media (min-width: 769px) {
  .btn-group.w-100 .btn {
    display: inline-block;
    width: auto;
  }
}

/* 强制按钮布局：991px以下垂直一列，992px以上水平一行 */
@media (max-width: 991px) {
  .btn-group.w-100 {
    display: grid !important;
    gap: 0.5rem;
  }
  
  .btn-group.w-100 .btn {
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 50px !important;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 10px;
  }
  
  .speed-value {
    font-size: 1.5rem;
    padding: 8px;
  }
}

@media (min-width: 992px) {
  .btn-group.w-100 {
    display: flex !important;
    flex-wrap: nowrap !important; /* 强制单行 */
    justify-content: center; /* 居中 */
    gap: 0.5rem;
    width: 100%;
  }
  
  .btn-group.w-100 .btn {
    flex: 1; /* 等宽分配 */
    max-width: 200px; /* 限制最大宽 */
    min-width: 120px; /* 最小宽，确保文字可见 */
    margin: 0;
    text-align: center;
    padding: 12px 16px; /* 调整padding节省空间 */
    font-size: 1rem; /* 字体适中 */
  }
  
  /* 大屏进一步优化 */
  @media (min-width: 1200px) {
    .btn-group.w-100 .btn {
      flex: none; /* 自然宽度 */
      min-width: auto;
      padding: 12px 24px;
      font-size: 1.1rem;
    }
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#progress-section {
  animation: fadeIn 0.5s ease;
}

.progress-bar-animated {
  animation: progressAnimation 1s linear infinite;
}

@keyframes progressAnimation {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}