:root {
  --block-width: 140px;
  --block-height: 45px;
  --block-base: #f8e287;
  --block-correct: #68c690;
  --block-wrong: #d3746b;
}

#exercise {
  max-width: 900px;
  touch-action: manipulation;
}

#finalBoard .title {
  display: flex;
  align-items: center;
  justify-content: center;
}

#finalBoard .title img {
  height: 1.7em;
  margin-right: 5px;
}

.arrow {
  font-size: 30px;
  width: 60px;
  height: 60px;
  justify-content: center;
}

.control-panel {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#restart {
  margin-top: 30px;
}

@media screen and (pointer: coarse) {
  #restart {
    margin-top: 60px;
  }
}

#finalBoard .illustration {
  max-width: 100%;
  margin-bottom: 25px;
}

/********************** PLAN *****************************/
#plan-wrapper {
  display: inline-flex;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
  justify-content: center;
  align-items: flex-end;

  gap: 5px;
  margin: 30px 0;
  max-width: 100%;
}

.plan-side {
  width: 150px;
}

#plan {
  background-color: white;
  padding: 2px;
  border: 1px solid var(--lightGrayHover);
  border-radius: 6px;

  display: flex;
  flex-direction: column;
  max-width: 100%;
}

#plan.victory {
  border: 1px solid var(--greenHover);
  animation: var(--animation-blink);
}
#plan.loss {
  border: 1px solid var(--redHover);
  animation: var(--animation-shake);
}

.content {
  border-radius: 6px;
  padding: 2px;
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

#categories {
  display: flex;

  border-radius: 6px;

  background-color: var(--black);
  margin: 1px 0;
}

.category {
  min-height: var(--block-height);
  width: var(--block-width);

  backdrop-filter: brightness(1.5);

  padding: 0 1px;
}

/* override preview.css */
#content .category {
  background-color: unset;
  font-weight: unset;
}

.category .content {
  background-color: var(--black);
  color: white;
  font-weight: 500;
}

#terms {
  position: relative;
  overflow: hidden;
  height: calc(var(--plan-height) * var(--block-height));
}

.term {
  position: absolute;
  transition: top 150ms ease-in-out, left 150ms ease-in-out;
  height: var(--block-height);
  width: calc(100% / var(--plan-width));

  padding: 1px;
}

.term .content {
  background-color: var(--block-base);
}

.term.correct .content {
  background-color: var(--block-correct);
}
.term.wrong .content {
  background-color: var(--block-wrong);
}

.term.blink {
  animation: var(--animation-blink);
}

/********************** STATS *****************************/
.stats-box {
  display: flex;
  flex-direction: column;
  gap: 5px;

  background-color: white;
  border-radius: 6px;
  padding: 15px;
  border: 1px solid var(--lightGrayHover);
}

.stats-label {
  font-size: 14px;
}

.stats-value {
  font-size: 24px;
}

/********************** BOX SHADOWS *****************************/
#plan-wrapper {
  position: relative;
  z-index: 0;
}
#plan, .stats-box {
  position: relative;
}

#plan::after, .stats-box::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 6px;
  z-index: -1;

  box-shadow: 0 0 32px 0 rgba(0,0,0,0.1);
}

/********************** HELPERS *****************************/
@media screen and (hover: hover) {
  .mobile {
    display: none;
  }
}
