body {
  overflow-y: hidden;
}

body > p {
  max-width: 70vw;
  text-align: center;
}

#main-grid {
  display: flex;
  align-items: start;
  justify-content: center;
  width: 100%;
  height: 100%;
}
#right-area,
#left-area {
  flex: 1;
  height: 100%;
}
#center-area {
  flex: 2;
  display: flex;
  position: relative;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

#center-area::before {
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  width: 1px;
  height: 100%;
  background: linear-gradient(
    0deg,
    transparent 0%,
    var(--text) 10%,
    var(--text) 90%,
    transparent 100%
  );
}
#center-area::after {
  position: absolute;
  top: 0;
  right: 0;
  content: "";
  width: 1px;
  height: 100%;
  background: linear-gradient(
    0deg,
    transparent 0%,
    var(--text) 10%,
    var(--text) 90%,
    transparent 100%
  );
}

#left-area {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
}
#right-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 1rem;
  gap: 1rem;
  max-height: 100%;
  overflow-y: scroll;
}
.log-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 80%;
  aspect-ratio: 4;
  padding: 1rem;
  border: 1px solid var(--text);
  border-radius: 0.7rem;
}
.log-entry > div {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.log-entry p {
  text-align: center;
}
.log-entry .dash {
  height: 0;
  width: 1rem;
  border-top: 1px solid var(--text);
}

.computer,
.you {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.computer h2 {
  margin: 0;
  margin-bottom: 0.5rem;
}

.computer-weapons {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.computer-weapons-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.user-weapons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.user-weapon-button {
  border: 1px solid var(--text);
  display: flex;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  background-color: transparent;
  color: var(--text);
}
.user-weapon-button p {
  margin: 0;
}

#fight,
#reset-button {
  border: 0;
  display: flex;
  margin-top: 2rem;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  background-color: var(--text);
  color: var(--bg);
}

#reset-button {
  font-size: 0.8rem;
}

#game-result {
  margin: 0;
  max-width: 100%;
  height: 3rem;
  text-align: center;
  text-wrap: wrap;
}

.arena h3 {
  margin-bottom: auto;
}

/* Hover and Disabled Effects */

.user-weapon-button:not(.selected):enabled:not(:active):hover {
  background-color: color-mix(in srgb, var(--text) 10%, transparent);
}
.user-weapon-button:enabled:active,
.user-weapon-button.selected {
  background-color: color-mix(in srgb, var(--text) 20%, transparent);
}

.number-selector:disabled,
.pile-wrapper.disabled,
.reset:disabled,
.take:disabled,
#fight:disabled,
.user-weapon-button:disabled {
  opacity: 0.3;
}

.arena {
  display: grid;
  grid-template-columns: repeat(3, 7rem);
  align-items: center;
  justify-items: center;
  gap: 0 1.3rem;
}

#computer-slot,
#user-slot {
  width: 6rem;
  height: 8rem;
  border: 1px solid var(--text);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Computer spinning animation */
#computer-slot {
  overflow: hidden;
  font-size: 3rem;
  position: relative;
}

.cube-wrap {
  --size: 4rem;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  perspective: 1;
  z-index: 10;
}
.cube {
  transform-style: preserve-3d;
  animation-duration: 3s;
}

@keyframes spin-to-paper {
  0% {
    transform: rotateX(0);
    animation-timing-function: cubic-bezier(0.49, 1.19, 0.91, 0.94);
  }
  100% {
    transform: rotateX(7200deg);
  }
}
@keyframes spin-to-rock {
  0% {
    transform: rotateX(0deg);
    animation-timing-function: cubic-bezier(0.49, 1.19, 0.91, 0.94);
  }
  100% {
    transform: rotateX(7080deg);
  }
}
@keyframes spin-to-scissors {
  0% {
    transform: rotateX(0deg);
    animation-timing-function: cubic-bezier(0.49, 1.19, 0.91, 0.94);
  }
  100% {
    transform: rotateX(7320deg);
  }
}

.spin-to-paper {
  animation-name: spin-to-paper;
}
.spin-to-rocks {
  animation-name: spin-to-rock;
}
.spin-to-scissors {
  animation-name: spin-to-scissors;
}

.side {
  position: absolute;
  top: calc(var(--size) * -0.5);
  left: calc(var(--size) * -0.5);

  width: var(--size);
  height: var(--size);
  background-color: var(--bg);

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

.top {
  transform: translateY(calc(var(--size) * -0.25))
    translateZ(calc(var(--size) * -0.14437756)) rotateX(-60deg) rotateZ(180deg);
}
.front {
  transform: translateZ(calc(var(--size) * 0.288675));
}
.bottom {
  transform: translateY(calc(var(--size) * 0.25))
    translateZ(calc(var(--size) * -0.14437756)) rotateX(60deg) rotateZ(180deg);
}

:root * {
  /* These last 2 properites clean up overshoot weirdness */
  animation-iteration-count: 1;
  animation-fill-mode: both;
}
