body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 20px;
  background-color: #f0f0f0;
}

.shadow {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

/* Controls styles (dropdowns and buttons) */
.controls {
  z-index: 2;
  display: flex;
  gap: 6px;
}

/* Select styles (dropdowns) */
select {
  margin-top: 100px;
  width: 172px;
  height: 75px;
  font-size: 20px;
  color: #f7f7f7;
  background: #392f2f;
  border: 0;
  border-radius: 5px;
  text-align-last: center;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.level-select {
  text-align: center;
  text-align-last: center;
  border-radius: 60px 5px 5px 5px;
}

.type-select {
  text-align: center;
  text-align-last: center;
  border-radius: 5px 60px 5px 5px;
}

select:focus {
  outline: none;
}

/* Flashcard styles */
.flashcard {
  width: 350px;
  height: 275px;
  perspective: 5000px;
  margin: 8px 0;
  position: relative;
}

.card {
  position: absolute;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card.flipped {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

.back {
  transform: rotateY(180deg);
}

.kanji-front-text,
.kanji-back-text,
.vocab-front-text,
.vocab-back-text,
.grammar-front-text,
.grammar-back-text {
  margin-bottom: 10px;
}

.reading-text {
  margin-bottom: 3px;
}

/* Text size for each flashcard type */
.kanji-front-text {
  font-size: 64px;
}

.kanji-back-text {
  font-size: 32px;
}

.vocab-front-text {
  font-size: 48px;
}

.vocab-back-text {
  font-size: 32px;
}

.grammar-front-text {
  font-size: 32px;
}

.grammar-back-text {
  font-size: 28px;
}

.reading-text {
  font-size: 18px;
  color: #888;
}

/* Make flashcard text unselectable, prevents accidental selection while tapping */
.kanji-front-text,
.kanji-back-text,
.vocab-front-text,
.vocab-back-text,
.grammar-front-text,
.grammar-back-text,
.reading-text {
  user-select: none;
  -webkit-user-select: none;
}

/* Button styles (next, previous, shuffle) */
.card-controls {
  display: flex;
  align-items: center;
  justify-content: center;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  height: 75px;
  padding: 0;
  border: none;
  color: #f7f7f7;
  cursor: pointer;
  transition:
    transform 0.3s,
    background-color 0.3s;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#nextBtn,
#prevBtn {
  width: 130px;
  font-size: 56px;
  background-color: #59a985;
}

#shuffleBtn {
  width: 80px;
  font-size: 42px;
  background-color: #392f2f;
  border-radius: 3px;
}

#nextBtn {
  border-radius: 3px 3px 60px 3px;
}

#prevBtn {
  border-radius: 3px 3px 3px 60px;
}

/* Button press effect */
#nextBtn:active,
#prevBtn:active,
#shuffleBtn:active {
  transition:
    transform 0.1s,
    background-color 0.1s;
  transform: scale(0.9);
  -webkit-transition:
    transform 0.1s,
    background-color 0.1s;
  -webkit-transform: scale(0.9);
}
