/* Zusätzliche Styles für die Karteikartenanwendung */

/* Karteneffekte */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Animierte Leiste – die Breite wird im Code berechnet */
.progress-bar {
  transition: width 0.5s ease;
}

/* Container für die Karteikarte */
.flashcard-container {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anzeige der Anzahl der Antworten pro Kategorie */
.difficulty-indicator {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  margin: 0.25rem;
}

/* Farbdefinitionen für Fortschrittssegmente */
.segment-excellent {
  background-color: #34d399; /* grün für ausgezeichnet */
}
.segment-good {
  background-color: #3b82f6; /* blau für gut */
}
.segment-fair {
  background-color: #fbbf24; /* gelb für okay */
}
.segment-poor {
  background-color: #f87171; /* rot für schlecht */
}
.segment-unanswered {
  background-color: #e5e7eb; /* grau für noch unbeantwortet */
}

.update-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.update-modal {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.4);
}

.corner-right {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.75rem;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.corner-right a,
.corner-right button {
  color: #1f2937;
  font-size: 1.25rem;
  transition: color 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.corner-right a:hover,
.corner-right button:hover {
  color: #2563eb;
}

.navigation-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}


.navigation-grid .nav-button {
  flex: 1 1 100%;
}

.navigation-grid .nav-button:not(.skip-button):not(.restart-button) {
  flex-basis: calc(50% - 0.5rem);
}

.navigation-grid .skip-button {
  order: -1; 
}

.navigation-grid .restart-button {
  order: 1;
}

.navigation-grid .navigation-separator {
  flex-basis: 100%;
  height: 1px;
  background-color: #e5e7eb;
  margin-top: 0.5rem;
}

.round-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.round-status-excellent {
  background-color: #d1fae5;
  color: #065f46;
}

.round-status-good {
  background-color: #dbeafe;
  color: #1e40af;
}

.round-status-fair {
  background-color: #fef3c7;
  color: #92400e;
}

.round-status-poor {
  background-color: #fee2e2;
  color: #991b1b;
}

.round-status-unknown {
  background-color: #e5e7eb;
  color: #374151;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

@media (min-width: 640px) {
  .navigation-grid {
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
  }

  .navigation-grid .nav-button:not(.restart-button),
  .navigation-grid .nav-button:not(.skip-button):not(.restart-button),
  .navigation-grid .skip-button {
    flex: 0 0 auto;
    order: initial;
  }

  .navigation-grid .restart-button {
    flex: 1 1 100%;
    align-self: stretch;
    order: initial;
  }

  .navigation-grid .navigation-separator {
    margin: 0.75rem 0 0;
  }
}

.celebration-modal {
  position: relative;
  overflow: hidden;
}

.confetti-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  opacity: 0.9;
  animation-name: confettiFall;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(220px) rotate(360deg);
    opacity: 0;
  }
}
