/* lesson.css */
.lesson-state {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-progress {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding: 0 20px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #2196f3);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

#progress-text {
  font-weight: 600;
  color: #666;
  min-width: 80px;
  text-align: center;
}

.kanji-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 40px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

.card-side {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kanji-display {
  margin-bottom: 30px;
}

.kanji-display span {
  font-size: 8rem;
  font-weight: bold;
  color: #2c3e50;
  line-height: 1;
}

.card-info {
  margin-bottom: 30px;
}

.card-type {
  font-size: 1.2rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 10px;
}

.hint {
  color: #888;
  font-style: italic;
  margin: 0;
}

.answer-content {
  text-align: left;
  margin-bottom: 30px;
}

.answer-content > div {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.answer-content h4 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.answer-content p {
  margin: 5px 0;
  line-height: 1.5;
}

.meanings p {
  font-size: 1.1rem;
  font-weight: 500;
}

.readings p {
  font-family: "Courier New", monospace;
}

.mnemonic {
  border-left: 4px solid #4caf50;
  background: #f1f8e9 !important;
}

.response-buttons {
  margin-top: 30px;
}

.response-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.response-btn {
  flex: 1;
  padding: 20px 15px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.response-btn small {
  font-size: 0.8rem;
  font-weight: normal;
  opacity: 0.7;
  margin-top: 5px;
}

.fail-btn {
  border-color: #f44336;
  color: #f44336;
}

.fail-btn:hover {
  background: #f44336;
  color: white;
}

.hard-btn {
  border-color: #ff9800;
  color: #ff9800;
}

.hard-btn:hover {
  background: #ff9800;
  color: white;
}

.good-btn {
  border-color: #4caf50;
  color: #4caf50;
}

.good-btn:hover {
  background: #4caf50;
  color: white;
}

.empty-state,
.completion-screen {
  text-align: center;
  padding: 40px;
}

.empty-state h2,
.completion-screen h2 {
  color: #2c3e50;
  margin-bottom: 15px;
}

.empty-state p {
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.completion-stats {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 30px 0 40px 0;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  min-width: 120px;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.primary-button {
  background: #4caf50;
  color: white;
}

.primary-button:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.secondary-button {
  background: transparent;
  color: #666;
  border: 2px solid #ddd;
}

.secondary-button:hover {
  border-color: #999;
  color: #333;
}

#show-answer-btn {
  font-size: 1.2rem;
  padding: 15px 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .kanji-card {
    padding: 25px;
    margin: 0 15px;
  }

  .kanji-display span {
    font-size: 6rem;
  }

  .button-group {
    flex-direction: column;
  }

  .completion-stats {
    flex-direction: column;
    gap: 15px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .primary-button,
  .action-buttons .secondary-button {
    width: 100%;
  }
}

/* Loading animation */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
