@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --fontSize: 0.9em;
  --headerFontSize: 1.5vmin;
  --lineHeight: 3vmin;
  --hairlineThickness: 1px;

  --backgroundColor: #fff;
  --secondaryBackgroundColor: #F9FAFB;
  --hoverColor: #F4F4F5;
  --darkBackgroundColor: #171717;
  
  --primaryTextColor: #171717;
  --secondaryTextColor: #71717A;
  --tertiaryTextColor: #D1D1D1;

  --primaryFont: "Geist", serif, ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --secondaryFont: "Golos Text", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

  --accentColor: #ddd;
  --borderColor: #E6E6E6;
  --dividerColor: #EBEBEB;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--secondaryFont);
  font-size: var(--fontSize);
}

body {
  position: relative;
  margin: 8px;
}

#controls {
  position: absolute;
  top: 0;
  left: 0;
  width: fit-content;
  max-height: 100vh;
  overflow-y: auto;
  background: var(--secondaryBackgroundColor);
  padding: 8px;
  z-index: 10;
  border-radius: 2px;
}
h2 {
    font-size: var(--headerFontSize);
    font-weight: 500;
    margin-bottom: 8px;
  }
  h3 {
    margin-bottom: 4px;
    font-family: var(--secondaryFont);
    font-size: var(--fontSize);
    font-weight: 400;
    width: fit-content;
  }

.section-controls {
  margin: 0 0 16px 0;
  padding: 4px;
  height: auto;
  width: 100%;
  border-bottom: 1px solid var(--dividerColor);
}
.checkbox-group {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-wrap: wrap;
}
label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-family: var(--secondaryFont);
  font-size: var(--fontSize);
  font-weight: 400;
}

label input,
label select {
  flex: 1;
  max-width: 120px;
}

label input[type="checkbox"] {
  margin-right: 0;
}

.color-swatches {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.color-swatches div {
  width: 20px;
  height: 20px;
  border-radius: 40px;
  border: 1px solid var(--borderColor);
  cursor: pointer;
}

.color-swatches div.selected {
  outline: 2px solid var(--primaryTextColor);
}

.color-swatches div.transparent {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    var(--borderColor) 2px,
    var(--borderColor) 4px
  );
  position: relative;
}

.toggle {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle input {
  display: none;
}

.toggle .slider {
  width: 36px;
  height: 18px;
  background-color: #ccc;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.toggle .slider::before {
  content: "";
  position: absolute;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
}

.toggle input:checked + .slider {
  background-color: #171717;
}

.toggle input:checked + .slider::before {
  transform: translateX(18px);
}
#canvas-container {
  width: 100vw;
  height: 100vh;
  position: relative;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.shape-connections {
  margin-bottom: 16px;
  padding: 8px;
  background: var(--backgroundColor);
  border-radius: 4px;
}

.shape-connections:last-child {
  margin-bottom: 0;
}

.shape-connections h3 {
  margin-bottom: 8px;
  color: var(--secondaryTextColor);
}

.duplication-controls {
  margin: 8px 0;
  padding: 8px;
  background: var(--backgroundColor);
  border-radius: 4px;
  border: 1px solid var(--borderColor);
}

.duplication-controls h3 {
  margin-bottom: 8px;
  color: var(--secondaryTextColor);
}

.duplication-controls label {
  margin-bottom: 4px;
}