* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  background: #222;
  color: #fff;
  padding: 20px;
}

#editor-ui {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

button {
  padding: 10px 16px;
  background: #444;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

#background-maker {
  position: relative;
  width: 512px;
  height: 432px;
  overflow: hidden;
  border: 2px solid #fff;
  margin-bottom: 20px;
}

.bg-color-layer,
.bg-layer,
.fg-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 200%;
  background-repeat: repeat-x;
}

.bg-color-layer {
  background-color: #98E0E0;
  z-index: 0;
}

.bg-layer {
  background-size: auto 100%;
  animation: scrollBg 60s linear infinite;
  z-index: 1;
}

.fg-layer {
  background-size: auto 100%;
  animation: scrollFg 30s linear infinite;
  z-index: 2;
}

@keyframes scrollBg {
  from { background-position-x: 0; }
  to { background-position-x: -100%; }
}

@keyframes scrollFg {
  from { background-position-x: 0; }
  to { background-position-x: -100%; }
}

#code-output {
  width: 100%;
  height: 200px;
  background: #111;
  color: #0f0;
  padding: 10px;
  font-family: monospace;
  border: 1px solid #444;
  resize: vertical;
}
