/* Reference for luxurious card flipping: https://www.w3schools.com/howto/howto_css_flip_card.asp */
#deck-title {
  text-align: center;
  color: var(--text-color-primary);
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.page-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.flashcard-body {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  position: relative;
  min-height: 26rem;
}

#flashcard-container {
  position: relative;
  width: 32rem;
  height: 22rem;
  perspective: 1000px;
}

.flashcard {
  background: var(--background-color-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  width: 32rem;
  height: 22rem;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.flashcard.flipped {
  transform: rotateX(180deg);
}

.flashcard:hover {
  border-color: var(--primary-color);
}

.flashcard span {
  font-size: 2.5rem;
  text-align: center;
  color: var(--text-color-primary);
}

.flashcard .front,
.flashcard .back {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flashcard .back {
  transform: rotateX(180deg);
}

.invisible {
  display: none;
}

.chevron {
  background-color: var(--background-color-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.chevron:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.chevron img {
  width: 1.5rem;
  height: 1.5rem;
  filter: invert(1);
}

.chevron-right img {
  transform: rotate(180deg);
}

.card-slide-left-in {
  animation: slide-in-left 0.3s ease-out;
}

.card-slide-right-in {
  animation: slide-in-right 0.3s ease-out;
}

.card-slide-left-out {
  animation: slide-out-left 0.3s ease-out;
}

.card-slide-right-out {
  animation: slide-out-right 0.3s ease-out;
}

@keyframes slide-in-left {
  from {
    transform: translateX(-600px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(600px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out-left {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-600px);
    opacity: 0;
  }
}

@keyframes slide-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(600px);
    opacity: 0;
  }
}
