.cursor-maker {
  width: 100%;
  color: #eeeeee;
  font-family: "VCR", monospace;
}

.cursor-maker__header,
.cursor-maker__panel,
.cursor-maker__output {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #8f1018;
  background: rgba(5, 5, 5, 0.94);
}

.cursor-maker__header h1,
.cursor-maker__output h2 {
  margin: 0 0 12px;
  color: #e0252f;
  font-family: "NR", serif;
  font-weight: normal;
}

.cursor-maker__header p {
  margin: 0;
  line-height: 1.6;
}

.cursor-maker__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.cursor-maker__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cursor-maker__field label {
  color: #ff4545;
  font-size: 0.9rem;
}

.cursor-maker__field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #6f1117;
  background: #090909;
  color: #ffffff;
  font: inherit;
}

.cursor-maker__field input:focus {
  outline: 1px solid #ff3030;
  outline-offset: 2px;
}

.cursor-maker__color-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
}

.cursor-maker__color-row input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 2px;
  border: 1px solid #6f1117;
  background: #090909;
  cursor: pointer;
}

.cursor-maker__preview {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #5c5c5c;
  background-color: #090909;
  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px
    );
  background-size: 12px 12px;
  cursor: crosshair;
}

.cursor-maker__preview p {
  pointer-events: none;
  color: #888888;
  text-align: center;
}

.cursor-maker__copy {
  padding: 9px 14px;
  border: 1px solid #d71920;
  background: #0b0b0b;
  color: #ff3535;
  font-family: "VCR", monospace;
  cursor: pointer;
}

.cursor-maker__copy:hover,
.cursor-maker__copy:focus-visible {
  background: #7d0c13;
  color: #ffffff;
}

.cursor-maker__output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.cursor-maker__output-header h2 {
  margin: 0;
}

#cursor-code-output {
  width: 100%;
  min-height: 560px;
  box-sizing: border-box;
  resize: vertical;
  padding: 14px;
  border: 1px solid #4c4c4c;
  background: #070707;
  color: #eeeeee;
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.cursor-maker__status {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #ff3535;
}

/* Only used inside the generator preview. */
.cursor-preview-glitter {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  font-size: 15px;
  line-height: 1;

  text-shadow:
    0 0 3px currentColor,
    0 0 7px currentColor;

  transform: translate(-50%, -50%);

  animation:
    preview-glitter-fall 700ms ease-out forwards;
}

@keyframes preview-glitter-fall {
  0% {
    opacity: 1;

    transform:
      translate(-50%, -50%)
      translate(0, 0)
      rotate(0deg)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate(-50%, -50%)
      translate(var(--glitter-x), var(--glitter-y))
      rotate(var(--glitter-rotation))
      scale(0.2);
  }
}

@media (max-width: 700px) {
  .cursor-maker__controls {
    grid-template-columns: 1fr;
  }

  .cursor-maker__output-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.cursor-maker__symbol-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}

.cursor-maker__symbol-button {
  min-width: 0;
  min-height: 34px;
  padding: 4px;
  border: 1px solid #551015;
  background: #090909;
  color: #dddddd;
  font-family: serif;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.cursor-maker__symbol-button:hover,
.cursor-maker__symbol-button:focus-visible {
  border-color: #ff3030;
  background: #240608;
  color: #ffffff;
  outline: none;
}

.cursor-maker__symbol-button.is-selected {
  border-color: #ff3030;
  background: #6f0c12;
  color: #ffffff;
}

.cursor-maker__field-note {
  margin: 0;
  color: #777777;
  font-size: 0.75rem;
  line-height: 1.3;
}