/* Card flip and animation styles */
/* Responsive title sizing */
@media (max-width: 40rem) {
  .card-front,
  .card-back {
    font-size: 1.5rem;
  }
}

@media (min-width: 75rem) {
  .card-front,
  .card-back {
    font-size: 1.75rem;
  }
}
.card {
  perspective: 1000px;
  display: block;
  height: auto;
  margin: 0 auto;
  outline: none;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-inner {
  position: relative;
  width: auto;
  min-height: 240px;
  transition: transform 2s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  background: #222;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.card-front h3,
.card-back h3 {
  margin-bottom: 1rem;
  text-align: center;
  max-width: 90%;
  word-wrap: break-word;
}

.card-back p {
  text-align: center;
  margin-top: 0.5rem;
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.card-front {
  background: rgb(65, 105, 225);
  border: 2px solid var(--blue);
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.card-back {
  background: #222;
  border: 2px solid;
  transform: rotateY(180deg);
}

.card-back.true {
  background: #154e1b;
  border-color: var(--green);
}

.card-back.false {
  background: #5c1616;
  border-color: var(--red);
}

/* Button styles */
.choice-buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.guess-btn {
  margin: 0.5rem 1rem 0.5rem 0;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 2px solid;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.2s,
    transform 0.2s;
}

.guess-over {
  background: #154e1b;
  border-color: var(--green);
  color: white;
}

.guess-over:hover,
.guess-over:focus {
  background: #1e6c28;
  transform: scale(1.05);
}

.guess-under {
  background: #5c1616;
  border-color: var(--red);
  color: white;
}

.guess-under:hover,
.guess-under:focus {
  background: #7a2323;
  transform: scale(1.05);
}

.next-btn {
  margin-top: 1rem;
  background: #0056a1;
  color: white;
  border: 2px solid var(--blue);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.next-btn:hover {
  background: #0078d7;
  transform: scale(1.05);
}

.card-front,
.card-front * {
  font-family: stately-hook !important;
}

.card-back,
.card-back * {
  font-family: stately-story !important;
}
