html, body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  background-color: #e7e8f0;
  color: #333;
}

body {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100vw;
}

canvas {
  display: block;
  position: relative;
  top: 0;
  left: 0;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border: 2px solid #000;
  border-radius: 10px; /* Rounded corners for the canvas */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Control panels styling */
.control-panel {
  position: relative;
  width: 220px;
  height: 100%; /* Match the canvas height */
  max-height: 90vh;
  overflow-y: auto;
  padding: 10px;
  flex-shrink: 0;
  background-color: white;
  border-radius: 8px; /* Rounded edges */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
}

.control-panel > * {
  margin: 0;
  padding: 0;
}

/* Canvas container */
.canvas-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%; /* Ensure the container takes full height */
}

/* Left control panel */
.control-panel-left {
  order: 1;

    /* Even the spacing between children */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  
    /* gap: 10px; */
    /* align-items: stretch; */
    /* overflow-y: auto; Prevent overflow by enabling scrolling */
}

/* Canvas container */
.canvas-container {
  order: 2;
}

/* Right control panel */
.control-panel-right {
  order: 3;

  /* background-color: #000; */
  
  /* Even the spacing between children */
  display: flex;
  flex-direction: column;
  /* justify-content: space-between; */
  gap: 1%;

  /* gap: 10px; */
  /* align-items: stretch; */
  /* overflow-y: auto; Prevent overflow by enabling scrolling */
}

.control-panel-right > *:last-child {
  margin-top: auto;
}

/* Slider and label styling */
.slider-container {
  margin: 5px 0;
  padding: 10px;
  /* margin: 5px 0 !important;
  padding: 5px !important; */
  background-color: #ffffff;
  border-radius: 8px; /* Rounded edges */
}

.slider-container .label {
  margin: 0 0 8px 0;
  /* font-weight: bold; */
  color: #000000;
}

input[type="range"] {
  width: calc(100%);
}

/* Styling for disabled sliders */
input[type="range"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #e9e9e9;
}

/* Button styling */
button {
  background-color: #ffffff;
  color: #fff;
  border: 1px solid #2d2d2d;
  border-radius: 8px; /* Rounded edges */
  padding: 8px 16px;
  margin: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  font-family: 'Major Mono Display', monospace;
  font-weight: bold;
  font-size: 0.7rem;
  
  width: calc(95%);
}

button:hover {
  background-color: #e0e0e0;
  transform: scale(1.02);
}

button.active {
  background-color: #000000;
  color: #fff;
}

button.random {
  background-color: #535574;
}

button.random.active {
  background-color: #131651;
}

button.outline, button.no-outline, button.rand-outline {
  background-color: #535574;
}

button.outline.active, button.no-outline.active, button.rand-outline.active {
  background-color: #131651;
}

button.new-art {
  background-color: #222224;
}

button.save-jpg {
  background-color: #222224;
}

button.animate {
  background-color: #535574;
  width: calc(95%);
  /* display: flex;
  justify-content: center;
  align-items: center;
  text-align: center; */
}

button.animate.active {
  background-color: #131651;
}

/* Animation controls wrapper */
.animation-controls-wrapper {
  margin-top: 15px;
  height: 320px; /* Fixed height to reserve space */
  position: relative;
  overflow: hidden;
}

/* Animation controls styling */
.animation-controls {
  background-color: #ffffff;
  border-radius: 8px; /* Rounded edges */
  padding: 10px;
  padding-top: 20px;
  padding-bottom: 0px;
  /* margin-top: 10px; */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: calc(90%);

  /* Spaces between animation controls */
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.animation-control input[type="range"] {
  width: 95%;
  margin-top: 2px;
}

.animation-controls.visible {
  opacity: 1;
  visibility: visible;
}

.animation-control {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* padding: 10px; */
}

.animation-control input[type="checkbox"] {
  vertical-align: middle;
  margin-bottom: 5px;
  margin-right: 10px; /* Add spacing between the checkbox and its label */
}

.animation-control label {
  /* Add padding to the label */
  /* padding-left: 35px;  */
}

.slider-wrapper {
  width: calc(95%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.slider-mini-label {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 2px;
}



/* Curve style dropdown styling */
select {
  background-color: #cacbd9;
  color: #131651;
  border: 1px solid #000000;
  border-radius: 8px; /* Rounded edges */
  padding: 8px;
  margin: 4px;
  font-size: 14px;
  cursor: pointer;
  width: calc(95%);
}

/* Main buttons container styling */
.main-buttons-container {
  margin-top: 10px;
  padding-top: 15px;
  /* border-top: 1px solid #eee; */
  display: flex;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.main-buttons-container button {
  padding: 8px 15px;
  /* font-weight: bold; */
  min-width: 80px;
}

/* Adapt to smaller screens */
/* Not yet implemented */