body {
  background: #fff;
  color: #111;
  font-family: 'Roboto Mono', monospace;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2rem 0 1.5rem 0;
  letter-spacing: -1px;
  text-align: left;
}

.main-layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  position: relative;
}

#controls {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 220px;
  max-width: 220px;
  margin: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 15px;
  position: fixed;
  right: 2vw;
  top: 2rem;
  align-self: flex-start;
  z-index: 10;
  height: auto;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.control-group {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0 0 0rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

label {
  font-size: 0.85rem;
  font-weight: 400;
  margin-bottom: 2px;
  color: #444;
  letter-spacing: -0.5px;
}

input[type="range"], select, input[type="color"] {
  width: 100%;
  margin-top: 2px;
  background: none;
  border: none;
  border-radius: 0;
  height: 28px;
  font-family: inherit;
  font-size: 1rem;
  color: #222;
  outline: none;
  transition: border-color 0.2s;
}
input[type="range"] {
  height: 2px;
  background: #e5e5e5;
  border: none;
}
input[type="range"]:focus, select:focus, input[type="color"]:focus {
  outline: 1.5px solid #2563eb;
}

#buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem;
  width: 100%;
  justify-content: flex-start;
}

button {
  background: none;
  color: #111;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
button:hover, button:focus {
  color: #2563eb;
  background: #f5f5f5;
}

#colorPreview {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

#canvas-container {
  flex: 1 1 auto;
  width: calc(100% - 260px);
  max-width: none;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  border-radius: 0;
  margin: 0 0 2rem 0;
  position: relative;
  overflow: hidden;
}

canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: #fff;
  border-radius: 0;
}

@media (max-width: 900px) {
  .main-layout {
    flex-direction: column;
    gap: 1rem;
  }
  #canvas-container {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 4/3;
    min-height: 220px;
  }
  #controls {
    position: static;
    right: auto;
    top: auto;
    align-self: stretch;
    max-width: 100%;
    min-width: 0;
    z-index: auto;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
  h1 {
    font-size: 1.2rem;
    margin: 1.2rem 0 1rem 0;
  }
}

.radio-controls {
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.radio-label input {
  margin: 0;
}

.note {
  font-size: 0.75rem;
  color: #888;
  margin: 8px 0;
  font-style: italic;
}

.info-tip {
  cursor: help;
  font-size: 0.8rem;
}

button {
  background: none;
  color: #111;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 6px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}