/* NAT64 网络测速工具 - 样式文件 */

body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  line-height: 1.6; 
  margin: 2em; 
  background-color: #f8f9fa; 
  color: #343a40; 
}

.container { 
  max-width: 1024px; 
  margin: auto; 
}

h1 { 
  color: #007bff; 
  text-align: center;
  margin-bottom: 1em;
}

p {
  text-align: center;
  margin-bottom: 2em;
  font-size: 1.1em;
}

button { 
  font-size: 1rem; 
  padding: 12px 24px; 
  border-radius: 6px; 
  border: none; 
  cursor: pointer; 
  background-color: #007bff; 
  color: white; 
  transition: all 0.2s ease;
  display: block;
  margin: 0 auto 2em auto;
  min-width: 120px;
}

button:disabled { 
  background-color: #6c757d; 
  cursor: not-allowed; 
}

button:hover:not(:disabled) { 
  background-color: #0056b3; 
  transform: translateY(-1px);
}

#status { 
  margin: 20px 0; 
  font-style: italic; 
  color: #6c757d; 
  text-align: center;
  font-size: 1.1em;
}

table { 
  width: 100%; 
  border-collapse: collapse; 
  margin-top: 20px; 
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

th, td { 
  padding: 12px 15px; 
  text-align: left; 
  border-bottom: 1px solid #dee2e6; 
  font-size: 0.9rem; 
}

thead { 
  background-color: #343a40; 
  color: white; 
}

tbody tr:nth-child(even) { 
  background-color: #f8f9fa; 
}

tbody tr:hover {
  background-color: #e9ecef;
}

code { 
  background-color: #e9ecef; 
  padding: 3px 6px; 
  border-radius: 4px; 
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85em;
}

/* 状态样式 */
.status-success { 
  color: #28a745; 
  font-weight: bold; 
}

.status-failed { 
  color: #dc3545; 
  font-weight: bold; 
}

.status-testing { 
  color: #6c757d; 
}

/* 延迟样式 */
.latency-good { 
  color: #28a745; 
}

.latency-medium { 
  color: #ffc107; 
}

.latency-poor { 
  color: #dc3545; 
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    margin: 1em;
  }
  
  .container {
    max-width: 100%;
  }
  
  table {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 8px 10px;
  }
  
  button {
    width: 100%;
    max-width: 200px;
  }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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