:root {
  --primary: #5865f2;
  /* Discord "Blurple" */
  --primary-hover: #4752c4;
  --warn: #f23f43;
  /* Discord Red */
  --warn-hover: #d83639;
  --green: #23a559;
  /* Discord Green */
  --yellow: #f0b232;
  /* Discord Yellow/Gold */
  --bg: #111;
  --bg-2: #1e1e1e;
  --bg-2-hover: #222222;
  --bg-3: #292929;
  --bg-3-hover: #303030;
  --bg-3-active: #3b3b3b;
  --border: #333333;
  --text: #ffffff;
  --text-2: #888;
  --text-2-focus: #acacac;
  --btn-text: #ffffff;
  --br-radius: 0.375rem;
}

body {
  font-family: Urbanist, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  caret-color: var(--primary);
  margin: 0;
  accent-color: var(--primary);
  line-height: inherit;
  padding: 0;
  overflow-y: scroll;
}

.main-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 2rem;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
}

html {
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

*::selection {
  background-color: var(--primary);
}

input,
select,
textarea,
button {
  font-family: inherit;
  background-color: var(--bg-2);
  color: inherit;
  border: unset;
  padding: 0.5rem;
  border-radius: var(--br-radius);
  font-size: inherit;
  width: auto;
}

input,
select {
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

input[type="text"],
input:not([type]),
select,
textarea {
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-2);
}

button:hover,
select:hover {
  background-color: var(--bg-2-hover);
}

button:has(.icon) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data: image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='0.88em' height='.8em' viewBox='0 0 448 512' %3E%3Cpath fill='white' d='M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position-x: calc(100% - 0.5rem);
  background-position-y: 50%;
  padding-right: 3rem;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: none;
  border-color: var(--primary);
}

textarea {
  padding: 0.25rem 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

h2:is(:first-child) {
  margin-top: -0.4rem;
}

.rounded-group > * {
  border-radius: 0;
  width: 100%;
}

.rounded-group > *:not(:last-child) {
  border-bottom: none;
}

.rounded-group > :first-child {
  border-top-right-radius: var(--br-radius);
  border-top-left-radius: var(--br-radius);
}

.rounded-group > :last-child {
  border-bottom-right-radius: var(--br-radius);
  border-bottom-left-radius: var(--br-radius);
}

.rounded-group input:focus-visible + input {
  border-top-color: var(--primary);
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

label {
  font-weight: 600;
}

label:has(+ input)::after {
  content: " : ";
}

.sub {
  color: var(--text-2);
}

.warn {
  color: var(--warn);
}

button .sub::before {
  content: "(";
}

button .sub::after {
  content: ")";
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

button:disabled {
  color: var(--text-2);
  background-color: var(--bg-2);
}

button.accent-button {
  border: none;
  background-color: var(--primary);
}

button.warn-button {
  border: none;
  background-color: var(--warn);
}

button.warn-button:hover {
  background-color: var(--warn-hover);
}

button.warn-button:disabled,
.accent-button:disabled {
  background-color: var(--bg-3);
}

button.accent-button:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

ul.selector li {
  list-style-type: none;
  padding: 0.5rem 0;
  padding-inline: 0.75rem;
  border: 1px solid var(--border);
  border-bottom: none;
  width: 100%;
  cursor: pointer;
}

ul.selector li:first-child {
  border-radius: var(--br-radius) var(--br-radius) 0 0;
}

ul.selector li:last-child {
  border-bottom: solid 1px var(--border);
  border-radius: 0 0 var(--br-radius) var(--br-radius);
}

ul.selector li:hover {
  background-color: var(--bg-2-hover);
}

ul.selector label {
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

ul.selector label input:has(+ span) {
  margin-right: 0.4rem;
}

a {
  font-weight: 600;
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

.icon {
  height: 1em;
  position: relative;
}

.plus-icon {
  font-size: 1.6rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0;
}
