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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - 40px);
}

.control-panel {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  width: 320px;
  overflow-y: auto;
  flex-shrink: 0;
}

.control-panel h1 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #333;
  text-align: center;
}

.control-panel h3 {
  font-size: 16px;
  margin-top: 15px;
  margin-bottom: 12px;
  color: #555;
  border-bottom: 2px solid #667eea;
  padding-bottom: 8px;
}

.control-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-weight: 600;
  color: #444;
  font-size: 14px;
}

.control-group select,
.control-group input[type="range"],
.control-group input[type="number"] {
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.control-group select:focus,
.control-group input[type="range"]:focus,
.control-group input[type="number"]:focus {
  outline: none;
  border-color: #667eea;
}

.control-group select {
  background-color: white;
  cursor: pointer;
}

.control-group input[type="range"] {
  cursor: pointer;
  padding: 0;
  height: 6px;
  border: none;
  background: #e0e0e0;
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
  background: #764ba2;
}

.control-group input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background 0.2s;
}

.control-group input[type="range"]::-moz-range-thumb:hover {
  background: #764ba2;
}

.control-group span {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.parameter-group {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.parameter-group.hidden {
  display: none;
}

.render-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.render-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.render-btn:active {
  transform: translateY(0);
}

#canvas {
  flex: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  cursor: crosshair;
}

@media (max-width: 1024px) {
  .container {
    flex-direction: column;
    height: auto;
  }

  .control-panel {
    width: 100%;
    max-width: 500px;
  }

  #canvas {
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 70svh;
    min-height: 0;
  }
}
