﻿/* General styles for both PC and mobile view */



body {
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 10px auto;
}

.card {
  width: 100%;
  height: 450px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}













.card.flipped {
  transform: rotateY(180deg);
}

.front, .back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* The front and back will take the full width of the card */
  height: 450px; /* Maintain a fixed height */
  backface-visibility: hidden;
  box-sizing: border-box;
}

.front {
  background-color: #f0f0f0;
  font-size: 3em;
  font-weight: bold;
  text-align: center;
}

.back {
  background-color: #f0f0f0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  padding: 20px;
  text-align: center;
}

.headword {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
}

.headword {
  font-weight: bold;
  font-size: inherit;
}

.pinyin {
  font-size: 20px;
  margin-top: 10px;
  font-weight: bold;
}

.definition {
  font-size: 16px;
  margin-top: 5px;
  font-weight: normal;
  color: #666;
}


.button-container {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap to the next line */
  justify-content: flex-start; /* Align buttons to the start */
  width: 100%;
  max-width: 600px;
  margin: 10px auto;
}

button {
  flex: 1 1 auto; /* Allow buttons to grow and shrink */
  min-width: 120px; /* Set a minimum width for buttons */
  padding: 10px;
  margin: 5px; /* Space between buttons */
  background-color: #f0f0f0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap; /* Prevent text from wrapping */
}






button:disabled {
  opacity: 0.5;
  cursor: default;
}















textarea {
  width: 100%;
  max-width: 600px;
  height: 100px;
  padding: 10px;
  margin: 10px auto;
  font-size: 1.2em;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  border: none;
  border-radius: 5px;
  background-color: #f0f0f0;
  resize: none;
  display: block;
}





textarea:focus {
  outline: none;
}

/* Ensure buttons are displayed horizontally */
.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px; /* Add space below the buttons */
}

/* Mobile specific styles */
@media (max-width: 600px) {
  button {
    flex: 1 1 45%; /* Allow buttons to take up more space on smaller screens */
  }
}


