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

body {
  background: #1a1018;
  color: #f0e8e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 20px;
  min-height: 100vh;
}

h1 {
  color: #ff6b35;
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
}

.main {
  display: flex;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
}

.canvas-wrap {
  flex: 1;
  min-width: 0;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 2px solid #3d2a33;
  background: #0e0a0d;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: #2a1c24;
  border: 1px solid #3d2a33;
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  color: #ccc0b8;
}

.controls {
  width: 270px;
  flex-shrink: 0;
  background: #2a1c24;
  border: 1px solid #3d2a33;
  border-radius: 8px;
  padding: 20px;
}

.controls h2 {
  color: #ff6b35;
  font-size: 1.2rem;
  margin-bottom: 16px;
  text-align: center;
}

.controls label {
  display: block;
  font-size: 0.85rem;
  color: #c0b0a4;
  margin-bottom: 4px;
  margin-top: 14px;
}

.controls label:first-of-type {
  margin-top: 0;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-value {
  font-size: 0.9rem;
  font-weight: bold;
  color: #ff6b35;
  min-width: 32px;
  text-align: right;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #3d2a33;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff6b35;
  cursor: pointer;
  border: 2px solid #1a1018;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff6b35;
  cursor: pointer;
  border: 2px solid #1a1018;
}

input[type="range"]:disabled {
  opacity: 0.4;
}

input[type="range"]:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.button-row button {
  flex: 1;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#btn-go {
  background: #ff6b35;
  color: #1a1018;
}

#btn-go:hover {
  background: #ff8855;
}

#btn-go:active {
  transform: scale(0.97);
}

#btn-go:disabled {
  background: #5a3a28;
  color: #887060;
  cursor: not-allowed;
  transform: none;
}

#btn-reset {
  background: #3d2a33;
  color: #f0e8e0;
}

#btn-reset:hover {
  background: #4d3a43;
}

#btn-reset:active {
  transform: scale(0.97);
}

@media (max-width: 700px) {
  .main {
    flex-direction: column;
  }

  .controls {
    width: 100%;
  }

  h1 {
    font-size: 1.5rem;
  }
}
