/* src/css/classes.css */
.panel {
  background-color: color-mix(in srgb, var(--colorpanel) 40%, transparent);
  border: 2px solid var(--colorfg);
  border-radius: .5em;
  padding: 1em;
  margin-bottom: 1em;
  box-shadow: var(--shadow-raised);
}
.fit-content {
  width: fit-content;
}
.center {
  display: flex;
  justify-content: center;
}
.small {
  font-size: 0.8em;
}

/* src/css/shader-editor.css */
.se-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  flex-direction: column;
  background: rgba(10, 4, 18, 0.72);
  backdrop-filter: blur(4px);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  font-family:
    "Courier New",
    Courier,
    monospace;
  overflow: hidden;
  z-index: 5;
}
.se-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.se-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s;
}
.se-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}
.se-btn.se-run {
  border-color: rgba(147, 4, 86, 0.7);
  color: #FEE934;
}
.se-btn.se-run:hover {
  background: rgba(147, 4, 86, 0.4);
  border-color: #930456;
}
.se-btn.se-revert {
  color: rgba(255, 255, 255, 0.5);
}
.se-hint {
  margin-left: auto;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.se-error-bar {
  padding: 4px 10px;
  background: rgba(180, 30, 30, 0.55);
  border-bottom: 1px solid rgba(255, 80, 80, 0.3);
  font-size: 11px;
  color: #ffaaaa;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 100px;
  overflow-y: auto;
  flex-shrink: 0;
}
.se-code-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.se-line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  height: 19.375px;
  background: rgba(220, 40, 40, 0.28);
  border-top: 1px solid rgba(255, 100, 100, 0.5);
  border-bottom: 1px solid rgba(255, 100, 100, 0.5);
  pointer-events: none;
  z-index: 1;
}
.se-textarea {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  resize: none;
  background: transparent;
  color: rgba(230, 220, 255, 0.9);
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family:
    "Courier New",
    Courier,
    monospace;
  font-size: 12.5px;
  line-height: 1.55;
  tab-size: 2;
  caret-color: #FEE934;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  white-space: pre;
  overflow-x: auto;
}
.se-textarea::selection {
  background: rgba(147, 4, 86, 0.45);
}
.se-textarea::-webkit-scrollbar {
  width: 6px;
}
.se-textarea::-webkit-scrollbar-track {
  background: transparent;
}
.se-textarea::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* src/css/input-text.css */
input {
  font-family: var(--font);
  background-color: var(--colorpanel);
  color: var(--colortext);
  accent-color: var(--colortext);
  border-radius: .3em;
  margin-bottom: 1em;
}
input:hover {
  filter: brightness(1.1);
}
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=search],
textarea {
  border: 2px solid var(--colorfg);
  padding: 0.5em;
  box-shadow: var(--shadow-inset);
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus,
input[type=search]:focus,
textarea:focus {
  outline: none;
  border-color: var(--colortext);
  box-shadow: var(--shadow-inset), var(--shadow-focus);
}
input::placeholder {
  color: var(--colortext);
  opacity: 0.6;
  font-style: italic;
}
li:last-child input,
li:last-child button,
li:last-child select {
  margin-bottom: 0;
}

/* src/css/input-radiocheck.css */
input[type=checkbox],
input[type=radio] {
  appearance: none;
  width: 1.5em;
  height: 1.5em;
  cursor: pointer;
  border: 2px solid var(--colorfg);
  vertical-align: middle;
  position: relative;
  margin-top: -0.21em;
  padding-top: 1em;
  transform: translate(0%, 40%);
  box-shadow: var(--shadow-raised), var(--shadow-inset);
}
input[type=radio] {
  border-radius: 50%;
}
input[type=checkbox]:checked,
input[type=radio]:checked {
  background-color: var(--colortext);
  box-shadow: var(--shadow-raised), var(--shadow-bubble);
}
input[type=radio]:checked::before,
input[type=checkbox]:checked::before {
  position: absolute;
  filter: blur(0.05em);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
input[type=checkbox]:checked::before {
  content: "\2665";
  color: var(--colorfg);
  font-size: 1.3em;
  transform: translate(-50%, -40%);
}
input[type=radio]:checked::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  background-color: var(--colorfg);
  border-radius: 50%;
}
@media (pointer: coarse) {
  input[type=checkbox]:checked::before {
    transform: translate(-50%, -45%);
  }
}

/* src/css/input-range.css */
input[type=range] {
  appearance: none;
  height: .9em;
  background: var(--colorpanel);
  border: 2px solid var(--colorfg);
  border-radius: 0.5em;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-inset);
  vertical-align: bottom;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.5em;
  height: 1.5em;
  background: var(--colortext);
  border: 2px solid var(--colorfg);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-raised), var(--shadow-bubble);
}
input[type=range]::-moz-range-thumb {
  width: 1.5em;
  height: 1.5em;
  background: var(--colortext);
  border: 2px solid var(--colorfg);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-raised), var(--shadow-bubble);
}
input[type=range]::-webkit-slider-thumb:hover,
input[type=range]::-moz-range-thumb:hover {
  background: var(--colortext);
  box-shadow: var(--shadow-raised), var(--shadow-focus);
}
input[type=range]::-moz-range-track {
  background: var(--colorpanel);
  border: 2px solid var(--colorfg);
  border-radius: 0.5em;
  box-shadow: var(--shadow-inset);
}
input[type=range]:focus {
  box-shadow:
    var(--shadow-inset),
    var(--shadow-raised),
    var(--shadow-focus);
}
input[type=range]:focus::-webkit-slider-thumb,
input[type=range]:focus::-moz-range-thumb {
  box-shadow: var(--shadow-raised), var(--shadow-focus);
}

/* src/css/select.css */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: var(--font);
  font-size: 1em;
  background-color: var(--colorpanel);
  color: var(--colortext);
  border: 2px solid var(--colorfg);
  border-radius: .3em;
  cursor: pointer;
  box-shadow: var(--shadow-raised), var(--shadow-bubble);
  padding: 0.2em;
  padding-right: 2em;
  padding-left: 0.5em;
  margin-bottom: 1em;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EBBA3A' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5em center;
  background-size: 1.2em;
}
select:hover {
  filter: brightness(1.1);
}
select:focus {
  outline: none;
  border-color: var(--colortext);
  box-shadow:
    var(--shadow-raised),
    var(--shadow-inset),
    var(--shadow-focus);
}
select option {
  background-color: var(--colorpanel);
  color: var(--colortext);
  font-family: var(--font);
  padding: 0.5em;
}
select option:hover,
select option:focus,
select option:checked {
  background-color: var(--colorfg);
  color: var(--colortext);
}
select option::highlighted {
  background-color: var(--colorlink);
  color: var(--colortext);
}

/* src/css/default.css */
:root {
  --colorbg: #44002c;
  --colorfg: #930456;
  --colortext: #ebd6a1;
  --colortext-bold: #EBBA3A;
  --colorlink: #D47148;
  --colorpanel: #77014D;
  --shadow-inset: inset 2px 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-raised: 2px 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-bubble: inset -1px -1px 2px rgba(0, 0, 0, 0.5);
  --shadow-focus: 0 0 0 2px var(--colorlink);
  --font:
    "Courier New",
    Courier,
    monospace;
  --color0: #FEE934;
  --color1: #930456;
  --color2: #D47148;
}
html {
  height: 100%;
}
body {
  margin: 0;
  height: 100%;
  background-color: var(--colorbg);
  color: var(--colortext);
  font-family: var(--font);
}
footer {
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background-color: var(--colorbg);
  color: var(--colortext);
  font-size: 0.8em;
  padding: .25em;
  padding-left: .5em;
  padding-right: .5em;
  box-shadow: 0 -2px 4px var(--colorbg);
}
div {
  padding: .1em;
}
a {
  color: var(--colorlink);
}
a:visited {
  opacity: .9;
}
a.unvisited:visited {
  opacity: 1;
}
a.unstyled {
  text-decoration: none;
  color: inherit;
}
i {
  opacity: 0.6;
}
h1 {
  font-size: 2em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  color: var(--colortext-bold);
}
h2 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 0.5em;
  color: var(--colortext-bold);
}
h3 {
  font-size: 1.17em;
  margin-top: 0;
  margin-bottom: 0.25em;
  color: var(--colortext-bold);
}
h4 {
  font-size: 1em;
  margin-top: 0;
  margin-bottom: 0.5em;
  font-style: italic;
  color: var(--colortext-bold);
}
p {
  margin-bottom: 1em;
}
ul,
ol {
  margin-bottom: 1em;
  padding-left: 2em;
}
li:last-child ul,
li:last-child ol,
li:last-child list {
  margin-bottom: 1em;
  padding: 1em;
}
.hide-bullets ul,
.hide-bullets ol,
.hide-bullets list {
  list-style: none;
  padding-left: 0;
}
button {
  font-family: var(--font);
  font-size: 1em;
  background-color: var(--colorpanel);
  color: var(--colortext);
  border: 2px solid var(--colorfg);
  border-radius: .3em;
  padding: 0.25em;
  padding-left: .5em;
  padding-right: .5em;
  cursor: pointer;
  box-shadow: var(--shadow-raised), var(--shadow-bubble);
  margin-bottom: 0px;
}
button:hover {
  filter: brightness(1.1);
}
button:active {
  box-shadow: var(--shadow-inset);
}
code {
  font-family: var(--font);
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--colortext);
}
pre {
  margin: 1em 0;
  border-radius: 6px;
  border-left: 3px solid var(--color1);
  background: rgba(0, 0, 0, 0.45);
  overflow-x: auto;
  background-image: linear-gradient(transparent 50%, rgba(255, 255, 255, 0.03) 50%);
  background-size: 100% 3.2em;
}
pre > code {
  display: block;
  padding: 0.6em 0;
  background: none;
  border-radius: 0;
  font-size: 0.82em;
  line-height: 1.6em;
  counter-reset: line;
}
pre > code .line {
  display: block;
  padding: 0 1em 0 3.8em;
  position: relative;
  counter-increment: line;
  min-height: 1.6em;
}
pre > code .line::before {
  content: counter(line);
  position: absolute;
  left: 0;
  width: 3.2em;
  text-align: right;
  padding-right: 0.6em;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  font-size: 0.88em;
  line-height: inherit;
}
