
.flashcard-container {
  perspective: 1000px;
  width: 100%;
  max-width: 400px;
  height: 250px;
  cursor: pointer;
}

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

.flashcard-container.no-transition .flashcard-inner {
  transition: none;
}

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

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: black;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 40px;
  box-sizing: border-box;
}

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

.flashcard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  width: 100%;
}

.nav-arrow {
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: opacity 0.2s;
}

.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.flashcard-delete-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
  z-index: 10;
}

.flashcard-delete-btn:hover {
  color: var(--text);
  background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="midnight"] .flashcard-delete-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.next-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}