* {
  margin: 0;
}
:root {
  --eerie_black: #181818;
  --eerie_black_hover: #242424;
  --black_bg: #262626;
  --black_hover: #1b1b1b;
  --black: #0c0c0c;
  --yellow: #ffda22;
  --dark_yellow: #c9a70b;
  --read_yellow: #c9a60ba8;
  --purple: #0d0710;
  --purple_hover: #421352;
  --white: #ccccc0;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  text-align: center;
  background: var(--black_bg);
  place-items: center;
  font-family: 'Merriweather', serif;
  -webkit-font-smoothing: antialiased;
}

header {
  margin-top: 0.3rem;
  width: 33vw;
  height: 3vh;
}
h1 {
  font-size: 2.5rem;
  color: var(--yellow);
  margin-top: 2rem;
  margin-bottom: 1rem;
}
p {
  font-size: 1.35rem;
  color: var(--dark_yellow);
  margin-bottom: 3rem;
}
footer {
  order: 3;
}
footer > p {
  margin-bottom: 1rem;
}

.appendix {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.appendix > li {
  margin-bottom: 10px;
  list-style: none;
}
.tagContainer {
  display: block;
  color: var(--black);
  width: inherit;
  order: 1;
}
.tagContainer:hover {
  transition: all 0.3s ease-in-out;
  color: var(--read_yellow);
}

.diceTrayContainer {
  display: flex;
  margin-bottom: 3rem;
}
.screenContainer {
  display: flex;
}
.diceTray {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 20rem;
  height: 35rem;
  justify-content: space-between;
  order: 2;
}
.diceHistory {
  display: flex;
  width: 15rem;
  height: 35rem;
  background-color: var(--eerie_black);
  margin-left: 1rem;
  flex-direction: column;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
  order: 3;
}
.macroDiceRolls {
  display: flex;
  width: 15rem;
  height: 35rem;
  background-color: var(--eerie_black);
  margin-right: 1rem;
  flex-direction: column;
  overflow-y: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
  order: 1;
}
.diceHistory::-webkit-scrollbar,
.macroDiceRolls::-webkit-scrollbar {
  display: none;
}

.preview {
  height: 4.25rem;
  width: 15.75rem;
  color: var(--white);
  border: 2px solid var(--dark_yellow);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.memory {
  color: var(--white);
  display: flex;
  margin-bottom: 3rem;
  margin-right: 3px;
  z-index: 1;
  position: absolute;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}

#formulaString {
  padding: 0;
  overflow-y: hidden;
  overflow-x: auto;
  text-overflow: clip;
  font-size: 2rem;
  background-color: transparent;
  border: none;
  color: var(--white);
  text-align: end;
}

.ops,
.ops_ {
  background-color: var(--black);
  color: var(--white);
  height: 12.5%;
  width: 25%;
  border: none;
  font-size: 1.5rem;
  padding: 0;
}

#num {
  background-color: var(--eerie_black);
  color: var(--white);
  height: 12.5%;
  width: 25%;
  border: none;
  font-size: 1.5rem;
  padding: 0;
}

.dice {
  background-color: var(--purple);
  color: var(--dark_yellow);
  height: 12.5%;
  width: 25%;
  border: none;
  font-size: 1.5rem;
  padding: 0;
}
.info {
  display: none;
  margin-bottom: 2.5rem;
  background-color: var(--purple);
  padding: 0.45rem;
  color: var(--white);
  border: none;
  font-size: 1.5rem;
}
#keepDice {
  width: 12.5%;
}
.ops:hover,
.ops_:hover,
.macroRollBtn:hover,
#saveMacro:hover {
  background-color: var(--black_hover);
  cursor: pointer;
}

#num:hover {
  background-color: var(--eerie_black_hover);
  cursor: pointer;
}
.dice:hover {
  background-color: var(--purple_hover);
  cursor: pointer;
}

#historyBox {
  flex: auto;
  margin-right: 5rem;
  padding-right: 5px;
  padding: 0;
  margin: auto;
  color: var(--dark_yellow);
}

#historyId {
  border-bottom: 2px var(--white) dotted;
  word-break: break-all;
  height: auto;
  width: 15rem;
  font-size: 1.15rem;
  margin-top: 5px;
  margin-bottom: 10px;
}
#historyId1 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  margin-right: 5px;
  word-break: break-all;
  margin-top: 5px;
}

#eraseHistory,
#eraseMacro {
  background-color: var(--purple);
  color: var(--white);
  height: 2rem;
  width: 100%;
  border: none;
  font-size: 1.5rem;
  padding: 0;
}
#eraseHistory:hover,
#eraseMacro:hover,
.macroRollBtn:hover {
  background-color: var(--purple_hover);
  cursor: pointer;
}

#macroList {
  flex: auto;
  margin: 0;
  padding: 0;
}

#saveMacro {
  background-color: var(--black);
  color: var(--white);
  width: 4rem;
  border: none;
  font-size: 1.5rem;
  padding: 0;
}
.macroRollBtn {
  display: flex;
  text-align: center;
  width: 14.3rem;
  margin: 5px;
  word-break: break-all;
  background-color: var(--purple);
  color: var(--dark_yellow);
  border: none;
  padding: 1rem;
  font-size: 20px;
  align-items: center;
  justify-content: space-around;
}
.macroRollBtnDelete {
  background-color: var(--purple);
  color: var(--dark_yellow);
  left: 0.7rem;
  border: none;
  padding: 1rem;
  position: absolute;
}
.macroRollBtnDelete:hover {
  background-color: var(--eerie_black);
  cursor: pointer;
}

.attribution {
  margin-top: 1rem;
  font-size: 1rem;
}

a {
  text-decoration: none;
  color: var(--dark_yellow);
}
a:hover {
  transition: all 0.3s ease-in-out;
  color: var(--purple_hover);
}

/* Toast Notification */
.toast {
  visibility: hidden;
  min-width: 250px;
  background: linear-gradient(90deg, #ffda22 0%, #c9a70b 100%);
  color: #181818;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 40px;
  font-size: 1.1rem;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.4s, bottom 0.4s;
  box-shadow: 0 4px 24px 0 #00000055;
}
.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 60px;
}

@media screen and (max-width: 600px) {
  h1 {
    font-size: 1.9rem;
    margin-top: 1.5rem;
  }
  p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .diceTrayContainer {
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    order: 2;
  }
  .diceTray,
  .diceHistory {
    width: 20rem;
    height: 35rem;
  }
  .diceHistory {
    margin-top: 16px;
    margin-left: 0;
    margin-bottom: 8px;
  }
  #historyId {
    align-items: center;
    justify-content: center;
    word-break: break-all;
    height: auto;
    width: 20rem;
    vertical-align: middle;
    font-size: 1.15rem;
    margin-top: 5px;
    margin-bottom: 10px;
  }
  #historyId1 {
    align-items: center;
    justify-content: center;
    word-break: break-all;
    margin-top: 5px;
  }
  .macroDiceRolls {
    display: flex;
    width: 20rem;
    height: auto;
    margin-top: 1rem;
    margin-right: 0;
    flex-direction: column;
    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    order: 2;
  }
  .macroRollBtnDelete {
    left: 2rem;
  }
  .macroRollBtn {
    width: 19.3rem;
    padding: 1rem 2rem 1rem 3.2rem;
  }
  #macroList {
    flex: auto;
    margin: 0;
  }
  .attribution {
    margin-top: 1.5rem;
    font-size: 1rem;
  }
  .tagContainer {
    display: none;
    margin-bottom: 1rem;
    width: 320px;
    color: var(--read_yellow);
  }

  .info {
    display: block;
    margin-bottom: 1rem;
    flex-flow: row;
  }
}
@media screen and (min-height: 900px) {
  .diceTrayContainer {
    transform: scale(1.1);
  }
}
