body {
  margin: 0;
  background-color: #1a1a1a;
  color: #f1f1f1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;

  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%231a1a1a' stroke='%23f1f1f1' stroke-width='2' /%3E%3C/svg%3E") 12 12, auto;
}

.grid-container {
  display: grid;
  grid-template-columns: clamp(320px, 30vw, 500px) 50px 1fr;
  gap: 0;
  width: 90vw;
  height: 100vh;
  max-width: 1400px;
}

.ui-column {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  height: 100%;
}


.canvas-column {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

canvas {
  background-color: #eaeaea;
  border-radius: 12px;
  display: block;
}

.top-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
}

.top-button-row button {
  flex: 1 1 45%;
  min-width: 70px;
  padding: clamp(8px, 1.5vh, 12px) clamp(16px, 2vw, 24px);
  border-radius: 999px;
  height: clamp(36px, 6vh, 48px);
  border: 1px solid #f1f1f1;
  background: transparent;
  color: #f1f1f1;
  font-size: 14px;
  box-sizing: border-box;
  text-align: center;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%231a1a1a' stroke='%23f1f1f1' stroke-width='2' /%3E%3C/svg%3E") 12 12, auto;
}

/* Hover nur für NICHT-aktive Buttons */
.top-button-row button:hover:not(.active):not(:disabled),
.full-width:hover:not(:disabled) {
  background-color: rgba(241, 241, 241, 0.2); /* leicht heller, transparent */
  color: #f1f1f1;
  border-color: #f1f1f1;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f1f1f1' stroke='%231a1a1a' stroke-width='2' /%3E%3C/svg%3E") 12 12, pointer;
}

/* Aktiver Button bleibt mit festem Stil */
.top-button-row button.active {
  background-color: #f1f1f1;
  color: #1a1a1a;
  border: 1px solid #f1f1f1;
}


.top-button-row button.active {
  background-color: #f1f1f1;
  color: #1a1a1a;
}

#variantButtons button:disabled,
#variantButtons button:disabled:hover {
  background-color: transparent !important;
  color: #f1f1f1 !important;
  border-color: #f1f1f1;
  opacity: 0.3;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='%23f1f1f1' stroke-width='2'/%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='%23f1f1f1' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto;
}

/* Randomize + Save buttons */
.button-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.full-width {
  width: 100%;
  height: clamp(36px, 6vh, 48px);
  border-radius: 999px;
  background: transparent;
  border: 1px solid #f1f1f1;
  color: #f1f1f1;
  font-size: 14px;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%231a1a1a' stroke='%23f1f1f1' stroke-width='2' /%3E%3C/svg%3E") 12 12, auto;
}

.full-width:hover {
  background-color: #f1f1f1;
  color: #1a1a1a;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f1f1f1' stroke='%231a1a1a' stroke-width='2' /%3E%3C/svg%3E") 12 12, pointer;
}

/* Sliders */
input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #1a1a1a;
  border: 1px solid #f1f1f1;
  border-radius: 999px;
  outline: none;
  box-sizing: border-box;
  margin-top: 10px;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: #1a1a1a;
  border: 1px solid #f1f1f1;
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  background: #1a1a1a;
  border: 2px solid #f1f1f1;
  border-radius: 50%;
  margin-top: -5px;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f1f1f1' stroke='%231a1a1a' stroke-width='2' /%3E%3C/svg%3E") 12 12, pointer;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: #1a1a1a;
  border: 1px solid #f1f1f1;
  border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  background: #1a1a1a;
  border: 2px solid #f1f1f1;
  border-radius: 50%;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f1f1f1' stroke='%231a1a1a' stroke-width='2' /%3E%3C/svg%3E") 12 12, pointer;
}

input[type="range"]:focus {
  outline: none;
}

/* Mobile & Tablet Layout */
@media (max-width: 1024px) {
  .grid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
    height: auto;
  }

  .canvas-column,
  .ui-column {
    order: 0;
    width: 100%;
    max-width: 600px;
    margin-top: 0 !important;
  }

  .canvas-column {
    order: -1;
  }

  .top-button-row {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .top-button-row button {
    flex: 1 1 48%;
    font-size: 16px;
    height: 48px;
  }

  .button-pair {
    width: 100%;
  }

  canvas {
    width: 100% !important;
    height: auto !important;
  }
}
/* Force cursor style on click across all elements */
.cursor-click,
.cursor-click * {
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='8' fill='%231a1a1a' stroke='%23f1f1f1' stroke-width='2' /%3E%3C/svg%3E") 12 12, auto !important;
}

.tooltip-container {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tooltip-icon {
  background-color: #f1f1f1;
  color: #1a1a1a;
  font-weight: bold;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  text-align: center;
  line-height: 28px;
  cursor: default;
  font-size: 16px;
  border: 1px solid #1a1a1a;
}

.tooltip-text {
  display: none;
  position: absolute;
  top: 36px;
  right: 0;
  background-color: #1a1a1a;
  color: #f1f1f1;
  border: 1px solid #f1f1f1;
  border-radius: 8px;
  padding: 12px 16px;
  width: 260px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
}

.tooltip-container:hover .tooltip-text {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ── Light theme (html[data-theme] is set by gallery-params from the gallery toggle).
      The artwork is already dark-on-light; only the page chrome flips. ── */
html[data-theme="light"] body {
  background-color: #f4f2ed;
  color: #1a1a1a;
}

html[data-theme="light"] .top-button-row button,
html[data-theme="light"] .full-width {
  border-color: #1a1a1a;
  color: #1a1a1a;
}
html[data-theme="light"] .top-button-row button:hover:not(.active):not(:disabled),
html[data-theme="light"] .full-width:hover:not(:disabled) {
  background-color: rgba(26, 26, 26, 0.1);
  color: #1a1a1a;
  border-color: #1a1a1a;
}
html[data-theme="light"] .full-width:hover {
  background-color: #1a1a1a;
  color: #f1f1f1;
}
html[data-theme="light"] .top-button-row button.active {
  background-color: #1a1a1a;
  color: #f1f1f1;
  border-color: #1a1a1a;
}
html[data-theme="light"] #variantButtons button:disabled,
html[data-theme="light"] #variantButtons button:disabled:hover {
  color: #1a1a1a !important;
  border-color: #1a1a1a;
}

/* vendor pseudo-elements get separate rules — one unknown selector drops the whole rule */
html[data-theme="light"] input[type="range"] { background: #fff; border-color: #1a1a1a; }
html[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track { background: #fff; border-color: #1a1a1a; }
html[data-theme="light"] input[type="range"]::-moz-range-track { background: #fff; border-color: #1a1a1a; }
html[data-theme="light"] input[type="range"]::-webkit-slider-thumb { background: #fff; border-color: #1a1a1a; }
html[data-theme="light"] input[type="range"]::-moz-range-thumb { background: #fff; border-color: #1a1a1a; }

html[data-theme="light"] .tooltip-icon {
  background-color: #1a1a1a;
  color: #f1f1f1;
}
html[data-theme="light"] .tooltip-text {
  background-color: #fff;
  color: #1a1a1a;
  border-color: #1a1a1a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
