* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  display: flex;
  height: 100vh;
  overflow: auto;
}
#sidebar {
  width: 160px;
  background: #f0f0f0;
  padding: 16px;
  flex-shrink: 0;
}
#sidebar-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
#sidebar-image-desc {
  font-size: 13px;
  margin-bottom: 16px;
}
#sidebar button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
#sidebar button.active {
  background: #2c3e50;
  color: white;
  border-color: #2c3e50;
}
#sidebar-github {
  display: block;
  margin-top: 32px;
}
#main {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#controls {
  margin-bottom: 16px;
  flex-shrink: 0;
}
#controls > div {
  margin-bottom: 8px;
  font-size: 16px;
}
#controls .label {
  display: inline-block;
  width: 60px;
}
#button-group {
  padding-bottom: 8px;
}
#start-btn,
#reset-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 4px;
}
#start-btn {
  background: #27ae60;
}
#reset-btn {
  background: #95a5a6;
}
.time-fast {
  color: #3498db;
  font-weight: 600;
}
.time-slow {
  color: #e74c3c;
  font-weight: 600;
}
#canvas-container {
  display: flex;
  gap: 20px;
  overflow: auto;
  padding: 0 8px 0 0;
}
.canvas-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.canvas-wrapper > div {
  margin-bottom: 4px;
}
canvas {
  border: 1px solid #ccc;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 1024px) {
  #canvas-container {
    flex-direction: column;
  }
}
