:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: var(--dark-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 2rem;
}

.app-container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 2rem;
}

.file-input-container {
  margin-bottom: 2rem;
  text-align: center;
}

#jsonFileInput {
  display: none;
}

.file-input-label {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.file-input-label:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 400px;
  perspective: 1000px;
  margin: 2rem 0;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: var(--transition);
  cursor: pointer;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  box-shadow: var(--shadow);
}

.flashcard-front {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
}

.flashcard-back {
  background: white;
  color: var(--dark-color);
  transform: rotateY(180deg);
  border: 1px solid #e9ecef;
}

.flashcard h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
}

.flashcard-content {
  font-size: 2rem;
  line-height: 1.6;
  width: 100%;
}

.flashcard small {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.flashcard pre {
  background: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  width: 90%;
  margin: 1rem auto 0;
  font-size: 0.9rem;
}

.navigation {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.nav-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.nav-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.nav-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
}

.counter {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.empty-state {
  text-align: center;
  color: #666;
  font-style: italic;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .slideshow-container {
    height: 350px;
  }

  .flashcard-front,
  .flashcard-back {
    padding: 1.5rem;
  }

  .flashcard h3 {
    font-size: 1.3rem;
  }

  .flashcard-content {
    font-size: 1rem;
  }
}
.nav-btn {
  padding: 8px 16px;
  margin: 0 5px;
  background-color: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.nav-btn:hover {
  background-color: #45a049;
}

.nav-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}
