@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@700&family=Inter:wght@500&family=Inconsolata&display=swap');
:root {
  /* Theme */
  --light: #f0f0f0;
  --dark: #010713;

  --bg-main: var(--light);
  --bg-dark: var(--dark);

  --color-main: var(--dark);
  --color-dark: var(--light);

  --bg: var(--bg-main);
  --color: var(--color-main);

  /* Buttons */
  --primary-bg: var(--color);
  --primary-color: var(--bg);

  --error-bg: #bb0000;
  --error-color: var(--light);

  --btn-bg: var(--primary-bg);
  --btn-color: var(--primary-color);

  /* Animations */
  --duration: 0.25s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--color);
}

html,
body {
  height: 100%;
}

body {
  text-align: center;
  background-color: var(--bg);
  transition-duration: var(--duration);
}

h1 {
  font-size: 4rem;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

.main {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
  overflow-x: hidden;
}

.github {
  height: 1.8rem;
  margin: 0.6rem;
  position: fixed;
  bottom: 0;
  right: 0;
  fill: var(--color);
  transition: all;
  transition-duration: var(--duration);
}

.page {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: var(--duration) ease-out;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: var(--duration) ease-out;
}

.btn {
  border: none;
  top: 0;
  left: 0;
  position: relative;
  font-size: 1.5rem;
  padding: 0.3em 0.6em;
  cursor: pointer;
  color: var(--btn-color);
  background-color: var(--btn-bg);
  box-shadow: -2px -2px var(--bg), -4px -4px #aaa;
  transition: calc(var(--duration) / 2) ease-out;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus {
  outline: none;
  transition: all calc(var(--duration) / 2) ease-out;
  top: -2px;
  left: -2px;
  box-shadow: -0px -0px var(--bg), -2px -2px #aaa;
}

.flat-btn {
  color: var(--btn-bg);
  font-size: 1.5rem;
  padding: 0.3em 0.6em;
  background: none;
  border: none;
  cursor: pointer;
}
.flat-btn:hover,
.flat-btn:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: underline;
}

.error {
  --btn-bg: var(--error-bg);
  --btn-color: var(--error-color);
}

#code {
  font-size: 5rem;
  margin-bottom: 1rem;
  font-family: 'Inter';
}
#code::before,
#code::after {
  content: '\a0';
}

#msgbox-container {
  flex-grow: 1;
  width: 100%;
  max-width: 700px;
  margin: 16px;
  box-shadow: 0px 0px 50px black;
  border-top: 2px solid #aaa;
  border-left: 2px solid #aaa;
  position: relative;
}

.input {
  width: 100%;
  max-width: 700px;
  display: flex;
  align-items: flex-end;
}

#textarea {
  flex-grow: 1;
  box-sizing: content-box;
  resize: none;
  font-size: 1.125rem;
  line-height: 1.25rem;
  height: calc(1.25rem + 3px);
  padding: 4px;
  border: 2px solid #aaa;
  outline: none;
  background-color: transparent;
  font-family: 'Inconsolata', 'Courier New', Courier, monospace;
  white-space: pre;
}
#textarea::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.scrollable {
  overflow: auto;
}
.scrollable::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  padding: 0;
}
.scrollable::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 0px;
}
.scrollable::-webkit-scrollbar-corner {
  display: none;
}

.tiny {
  padding: 0.2rem 0.4rem;
  font-size: 1rem;
}

#joincode {
  max-width: 300px;
  text-align: center;
  background: none;
  outline: none;
  font-size: 5rem;
  margin-bottom: 0.5rem;
  border: none;
  border-bottom: 2px solid var(--dark);
  font-family: 'Inter';
}

#msgbox,
#droptarget {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
#msgbox {
  padding-top: 4px;
  padding-left: 4px;
}
#msgbox * {
  font-size: 1.125rem;
  line-height: 1.25rem;
  font-family: 'Inconsolata', 'Courier New', Courier, monospace;
  text-align: left;
  white-space: pre;
}
#droptarget {
  opacity: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 300ms ease-out;
  outline: 2px dashed #aaa;
  outline-offset: -10px;
  font-size: 1.6rem;
  font-family: 'Inter';
}
