* {
  box-sizing: border-box;
  --pad: 5px;
  -webkit-font-smoothing: subpixel-antialiased;
}

@font-face {
  font-family: "Bubble";
  src:  url('../fonts/Spin-Bubble.woff2') format('woff2'),
    url('../fonts/Spin-Bubble.woff') format('woff');
}


@font-face {
  font-family: "Moderat";
  font-weight: normal;
  src: url("../fonts/Moderat-Regular.otf") format("opentype");
}

@font-face {
  font-family: "Moderat";
  font-weight: 500;
  src: url("../fonts/Moderat-Medium.otf") format("opentype");
}

/* @font-face {
  font-family: "Moderat";
  font-weight: normal;
  src: url("/fonts/Moderat-Regular.otf") format("opentype");
} */

body {
  margin: 0;
  font-family: "Moderat", sans-serif;
  font-size: 16px;
  line-height: 1;
  /* background-color: #E0E7F6; */
  background-color: black;
}

main {
  padding: var(--pad);
  gap: var(--pad);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.control-panel {
  padding: var(--pad);
  gap: var(--pad);
  display: grid;
  width: 100%;
  max-width: 400px;
  /* background-color: white; */
  color: white;
  font-size: 28px;
  font-size: var(--font-resize);
}

button {
  font-size: inherit;
  font-family: inherit;
  border: none;
  text-transform: uppercase;
  padding: var(--pad);
  height: 150px;
  /* background-color: #E6E6E6; */
  /* color: black; */
  background-color: rgba(255,255,255, 0.3);
  color: white;
  position: relative;
  touch-action: manipulation;
}

button:hover {
  /* background-color: #D9D9D9; */
  background-color: rgba(255,255,255, 0.4);
}

button:active {
  background-color: black;
  background-color: rgba(255,255,255, 0.2);
  color: white;
}

button:active .rotate {
  transform: rotateZ(45deg);
}

.rotate {
  display: block;
  transform: rotateZ(-45deg);
}

#input {
  height: auto;
  font-family: inherit;
  font-size: inherit;
  border-radius: 0px;
  resize: none;
  padding: var(--pad);
  border: none;
  background-color: #E6E6E6;
  background-color: rgba(255,255,255, 0.3);
  color: white;
  touch-action: manipulation;
}

#input::placeholder {
  color: inherit;
  opacity: 0.3;
}

#input:hover {
  background-color: #D9D9D9;
  background-color: rgba(255,255,255, 0.4);
}

#input:focus {
  background-color: black;
  background-color: rgba(255,255,255, 0.2);
  color: white;
  outline: none;
}

#canvas {
  flex: 1 1 100%;
  width: 100%;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.widget {
  display: flex;
  font-weight: 500;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  font-family: "Moderat";
  position: absolute;
  z-index: 1;
  padding: 0.15em;
  padding-left: 0.2em;
  padding-bottom: 0.3em;
  padding-right: 1em;
  font-size: 42px;
  /* transition: opacity 0.2s; */
}

.title {
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

.widget.background {
  z-index: 0;
}

.button-group {
  display: flex;
  gap: var(--pad);
}

.button-group button {
  flex: 1 1;
}

.line {
  /* background-color: yellow; */
  display: flex;
  flex-wrap: wrap;
  /* gap: 20px; */
}

.word {
  padding: 0.5em;
  margin: -0.5em -0.4em;
  position: relative;
  transition: all 1s ease;
}

/* .word:hover {
  transform: translateY(-10%);
  transition: all 0.5s ease;
} */

.word-text {
  position: relative;
}

.word-bubble {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Bubble";
}

.refresh {
  opacity: 0;
}