@import url("https://fonts.googleapis.com/css2?family=Fira+Mono&family=Open+Sans&display=swap");

html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

* {
  box-sizing: border-box;
}

::selection {
  background-color: rgba(160, 160, 250, 0.25);
}

::-moz-selection {
  background-color: rgba(160, 160, 250, 0.25);
}

/* Body / Content */

body {
  font-family: "Open Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
}
body.dark {
  color: rgb(220, 220, 230);
  background-color: rgb(40, 40, 50);
}
body.light {
  color: rgb(40, 40, 50);
  background-color: rgb(240, 240, 250);
}

body > div.content {
  padding: 4% calc(4% * 1.618);
}
body.mobile > div.content {
  padding: 10px 20px 40px;
}

body > div.content > nav {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
}

body > div.content section {
  padding-left: 6px;
}

body > div.copyright {
  bottom: 0;
  left: 0;
  padding: 2px 5px;
  font-size: 12px;
  opacity: 0.25;
}

/* General */

div.math,
div.prog {
  display: flex;
  align-items: center;
  justify-content: center;
}

span.prog,
pre.prog {
  background-color: rgb(50, 50, 60);
  border-radius: 4px;
  font-family: "Fira Mono", "Courier New", Courier, monospace;
  font-size: 14px;
  white-space: nowrap;
}

span.prog {
  padding: 2px 4px;
}

pre.prog {
  padding: 4px 6px;
}

div.container {
  padding: 5px;
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}

div.box {
  padding: 5px;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: flex-end;
}

div.box > div.content {
  margin: auto;
}

div.box img {
  max-height: 160px;
}

a {
  color: rgb(160, 160, 250);
}

input,
button {
  border: 2px solid rgb(100, 100, 120);
  outline: none;
}
body.dark input,
body.dark button {
  color: rgb(220, 220, 230);
  background: rgb(40, 40, 50);
}
body.light input,
body.light button {
  color: rgb(40, 40, 50);
  background: rgb(220, 220, 230);
}

button {
  transition: border 100ms;
}
input {
  transition: border 200ms;
}

input:focus,
button:active,
button.active {
  border: 2px solid rgb(160, 160, 250);
}

/* simulation */

#drawing_wrapper {
  display: flex;
  flex-flow: column nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
}

#canvas {
  border: 1px dashed rgb(220, 220, 230);
}

div.settings {
  display: flex;
  flex-flow: column nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
}

div.settings > div {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

div.settings input:not([type="checkbox"]) {
  width: 80px;
}

.msg {
  max-width: 500px;
  text-align: center;
}
.msg.error {
  color: rgb(250, 160, 180);
}
