* {
  font-family: monospace;
}

body {
  --fill: #dd4477;
  --dark: #220033;
  --light: #ddbbff;
  font: 14px / 150% monospace;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  fill: var(--fill);
  stroke: var(--fg);
}

body[data-theme="light"] {
  --fg: var(--dark);
  --bg: var(--light);
}

body[data-theme="dark"] {
  --fg: var(--light);
  --bg: var(--dark);
}

canvas {
  position: fixed;
  left: 0;
  top: 0;
}

#dragTarget {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  user-select: none;
  touch-action: none;
  box-shadow: inset 0 0 0 10px rgba(50, 150, 255, 0.75);
}

#theme-toggle {
  display: block;
  cursor: pointer;
  padding: 1em;
  z-index: 1;
  position: fixed;
  right: 0;
  top: 0;
  transition: all 0.5s ease;

  & g {
    transition: all 0.5s ease;
    fill: #cc66cc;
    stroke: #bb44aa;
    filter: opacity(0.8) blur(1px);
    box-shadow: 0 0 4px 9px red;
    text-shadow: 0 0 4px 9px red;

    &:hover {
      filter: opacity(1) blur(0);
    }
  }

  &:hover {
    transform: rotate(180deg);
  }
}

.spacer {
  flex: 1;
}

label {
  white-space: nowrap;
  padding-right: 20px;
}

#fileListParent {
  max-width: 500px;
  width: 80%;
}

select {
  width: 100%;
}

h1 {
  font-size: 40px;
  line-height: 120%;
  text-align: center;
  margin-bottom: 50px;
}

h1,
h2,
h3,
h4 {
  text-shadow: 0 0 4px var(--light);
  background-color: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05), 0 0 10px 10px rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 10px;
}

h2 {
  font-size: 22px;
  margin: 0;
  display: inline-block;
  color: var(--fill);
  text-shadow: none;
  filter: brightness(0.6);
}

hr {
  background: rgba(0, 0, 0, 0.1);
  filter: blur(1px);
  height: 8px;
  outline: none;
  border: none;
  border-radius: 10px;
}

#promptText {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 2em 1em;
  color: var(--light);
  background: linear-gradient(70deg, #aa44bb, #cc4488, #ff5577, #ff7799);
  background-size: 400% 400%;
  animation: gradient-animation 10s linear infinite;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

#promptText section {
  max-width: 640px;
  margin: auto;
}

#errorText {
  display: none;
}

noscript {
  display: block;
}

#errorText,
noscript {
  margin-top: 50px;
  color: #f33;
  background: rgba(255, 0, 0, 0.1);
  padding: 15px 15px 15px 50px;
  border: 1px solid #f33;
  border-radius: 10px;
}

#errorText:before,
noscript:before {
  content: "🚫";
  display: block;
  width: 50px;
  line-height: 22px;
  text-align: center;
  font-size: 28px;
  float: left;
  margin-left: -50px;
}

#progressBar {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -3px -100px;
  width: 200px;
  height: 6px;
  background: rgba(127, 127, 127, 0.3);
  z-index: 2;
}

#progressBar .progress {
  width: 100%;
  height: 100%;
  transform-origin: left;
  will-change: transform;
  background: var(--bg);
}

blockquote {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  text-shadow: 0 0 1px var(--light);
  padding-left: 26px;

  &::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 6px;
    background-color: var(--light);
    border-radius: 3px;
    filter: saturate(4) hue-rotate(45deg) opacity(0.8);
  }
}

input,
button {
  color: var(--fg);
  background: var(--fill);
  outline: solid 7px transparent;
  border: none;
  border-radius: 8px;
  padding: 6px;
  margin: 10px;
  font-size: 18px;
  font-weight: bold;
  transition: all .3s ease;
  box-sizing: border-box;
  box-shadow: 0 0 10px var(--fill), 0 0 20px rgba(0, 0, 0, 0.2);

  &:hover,
  &:active,
  &:focus-visible,
  &:focus-within {
    border: none;
    filter: saturate(1.4);
    outline: solid 6px rgba(0, 0, 0, 0.1);
    color: white;
  }

  &:hover {
    outline: solid 6px #ff88aa88;
  }

  &::placeholder {
    color: var(--bg);
    filter: opacity(0.6);
    font-style: italic;
    font-size: medium;
  }
}

input#remoteUrl {
  width: 96%;
  filter: saturate(1.2);
}

a {
  text-decoration: none;
  font-style: italic;
}

pre {
  word-break: break-all;
  text-wrap: auto;
  color: #ee8844;
  width: 30%;
}
