* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: white;
  color: black;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding: 20px;
}

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

header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 20px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

h2 {
  font-size: 1.8rem;
  margin: 20px 0 15px;
}

h3 {
  font-size: 1.3rem;
  margin: 15px 0;
}

p {
  margin-bottom: 15px;
  color: #333;
}

.subtitle {
  color: #666;
}

.back-button {
  display: inline-block;
  margin-bottom: 20px;
  padding: 10px 15px;
  background: #f0f0f0;
  color: black;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.back-button:hover,
.action-button:hover {
  background: #e0e0e0;
}

.info-box {
  background: #f9f9f9;
  border-left: 4px solid #333;
  padding: 15px;
  margin: 20px 0;
}

.canvas-container {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin: 30px 0;
}

.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.canvas-toolbar p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-group label {
  color: #555;
  font-size: 0.95rem;
}

.control-group input {
  width: 90px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  background: white;
  color: black;
}

.action-button {
  padding: 8px 12px;
  background: #f0f0f0;
  color: black;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}

.canvas-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
  overflow: auto;
  background: white;
  border: 1px solid #ddd;
}

#tsp-canvas {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 560px;
  max-width: 100%;
  background: black;
  outline: none;
  image-rendering: crisp-edges;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.status {
  min-height: 24px;
  color: #666;
  margin: 0;
}

.canvas-note {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ccc;
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  .canvas-container {
    padding: 15px;
  }

  .canvas-shell {
    min-height: 360px;
  }

  #tsp-canvas {
    height: 400px;
  }
}
