body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f4f8;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: center;
}

.container {
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 100%;
  text-align: center;
}

h1 {
  margin-bottom: 20px;
  color: #004a99;
}

form {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

form input {
  flex: 1;
  padding: 10px;
  border: 2px solid #004a99;
  border-radius: 6px;
  font-size: 1rem;
}

form button {
  padding: 10px 15px;
  background-color: #004a99;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

form button:hover {
  background-color: #003366;
}

#flashcards-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.flashcard {
  background: #007acc;
  color: white;
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  perspective: 1000px;
  position: relative;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  user-select: none;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 12px;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  border-radius: 12px;
}

.flashcard-front {
  background-color: #007acc;
}

.flashcard-back {
  background-color: #004a99;
  transform: rotateY(180deg);
}

#clear-btn {
  background-color: #cc0000;
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
  width: 100%;
}

#clear-btn:hover {
  background-color: #990000;
}
