/* Combining level-buttons.css and level-lock.css */

/* Level Button Styles */
.level-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--quiz-spacing-md);
  margin-top: var(--quiz-spacing-md);
}

.level-button {
  padding: 0.6rem 1.2rem;
  background-color: var(--quiz-primary-color);
  color: white;
  border-radius: var(--quiz-border-radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--quiz-transition-fast);
}

.level-button:hover {
  background-color: #2a45d0;
  transform: translateY(-2px);
  box-shadow: var(--quiz-shadow-md);
}

.level-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.next-level-button {
  background-color: var(--quiz-success);
}

.next-level-button:hover {
  background-color: #218838;
}

.study-button {
  background-color: var(--quiz-info);
}

.study-button:hover {
  background-color: #138496;
}

/* Level Card Styles */
.level-card {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--quiz-spacing-md);
  border-radius: var(--quiz-border-radius-md);
  box-shadow: var(--quiz-shadow-sm);
  background-color: white;
  transition: all var(--quiz-transition-fast);
  overflow: hidden;
}

.level-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--quiz-shadow-md);
}

.level-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--quiz-primary-color);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  margin-right: var(--quiz-spacing-lg);
  flex-shrink: 0;
}

.level-content {
  flex-grow: 1;
}

.level-content h3 {
  margin-top: 0;
  margin-bottom: var(--quiz-spacing-xs);
}

.level-status {
  font-weight: 600;
  margin-bottom: var(--quiz-spacing-xs);
}

.level-score {
  color: #666;
  margin-bottom: var(--quiz-spacing-md);
}

/* State-specific styles */
.level-card.completed .level-number {
  background-color: var(--quiz-success);
}

.level-card.completed .level-status {
  color: var(--quiz-success);
}

.level-card.unlocked .level-number {
  background-color: var(--quiz-primary-color);
}

.level-card.unlocked .level-status {
  color: var(--quiz-primary-color);
}

.level-card.locked {
  opacity: 0.7;
}

.level-card.locked .level-number {
  background-color: #888;
}

.level-card.locked .level-status {
  color: #888;
}

.level-card.locked:before {
  content: "🔒";
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
}

.level-message {
  font-size: var(--quiz-font-size-sm);
  color: #888;
  font-style: italic;
}

/* Level progress bar */
.level-progress {
  height: 8px;
  background-color: #eee;
  border-radius: 4px;
  margin: var(--quiz-spacing-sm) 0;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background-color: var(--quiz-primary-color);
  border-radius: 4px;
  transition: width var(--quiz-transition-medium);
}

/* Quiz sequence navigation */
.quiz-sequence-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--quiz-spacing-md);
  background-color: #f5f5f5;
  border-radius: var(--quiz-border-radius-md);
  margin-bottom: var(--quiz-spacing-lg);
}

.quiz-sequence-item {
  flex: 1;
  text-align: center;
  padding: var(--quiz-spacing-sm);
  position: relative;
}

.quiz-sequence-item:not(:last-child):after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 20px;
  height: 2px;
  background-color: #ddd;
}

.quiz-sequence-item.active {
  font-weight: bold;
  color: var(--quiz-primary-color);
}

.quiz-sequence-item.completed {
  color: var(--quiz-success);
}

/* Responsive design */
@media (max-width: 768px) {
  .level-card {
    flex-direction: column;
    text-align: center;
  }

  .level-number {
    margin-right: 0;
    margin-bottom: var(--quiz-spacing-md);
  }

  .level-buttons {
    justify-content: center;
  }
}