/* Google Font - League Spartan */
@font-face {
  font-family: 'League Spartan';
  src: url('../assets/fonts/LeagueSpartan-VariableFont_wght.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* Main Container */
.exercise-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
  position: relative;
  margin-bottom: 3rem; /* Increased margin to ensure space above check button */
}

/* Audio Container */
.audio-container {
  position: absolute;
  top: 1rem;
  left: 8rem; /* Moved to the right, under the title */
  z-index: 10;
}

/* Audio Button */
.audio-button {
  width: 4rem;
  height: 4rem;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.audio-button:hover {
  transform: scale(1.05);
}

.audio-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.audio-button .pause-icon {
  display: none;
}

.audio-button.playing .play-icon {
  display: none;
}

.audio-button.playing .pause-icon {
  display: block;
}

/* Content Area */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Reduced gap */
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding-top: 1rem; /* Reduced padding to move content up */
}

/* Images Section */
.images-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  margin-top: 0; /* Align with audio button */
}

.image-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.image-item {
  width: 10rem;
  height: 10rem;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Options Container */
.options-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem; /* Reduced gap between options */

  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem; /* Added margin to keep away from check button */
}

/* Option Item */
.option-item {
  width: calc(50% - 1rem);
  max-width: 15rem;
  margin-bottom: 0.5rem; /* Reduced bottom margin */
}

/* Checkbox Label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.3rem;
  transition: transform 0.2s ease;
}

/* Custom Checkbox */
.custom-checkbox {
  width: 1.8rem;
  height: 1.8rem;
  border: 0.2rem solid #00699F;
  border-radius: 0.3rem;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.custom-checkbox::after {
  content: '';
  position: absolute;
  width: 1rem;
  height: 0.5rem;
  border-left: 0.2rem solid white;
  border-bottom: 0.2rem solid white;
  transform: rotate(-45deg) scale(0);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Selected state */
.option-item.selected .custom-checkbox {
  background-color: #00699F;
  border-color: #00699F;
}

.option-item.selected .custom-checkbox::after {
  transform: rotate(-45deg) scale(1);
  opacity: 1;
}

/* Correct state - only for selected items */
.option-item.correct .custom-checkbox {
  background-color: #258174;
  border-color: #258174;
}

.option-item.correct .custom-checkbox::after {
  transform: rotate(-45deg) scale(1);
  opacity: 1;
}

/* Incorrect state - only for selected items */
.option-item.incorrect .custom-checkbox {
  background-color: #FF0000;
  border-color: #FF0000;
}

.option-item.incorrect .custom-checkbox::after {
  transform: rotate(-45deg) scale(1);
  opacity: 1;
}

/* Option Text */
.option-text {
  font-size: 1.4rem;
  color: #333;
  font-family: 'League Spartan', sans-serif;
}

/* Media Query for smaller screens */
@media (max-width: 768px) {
  .options-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .image-row {
    gap: 1rem;
  }
  
  .image-item {
    width: calc(50% - 0.5rem);
    height: 8rem;
  }
  
  .audio-button {
    width: 3.5rem;
    height: 3.5rem;
  }
  
  .audio-container {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .content-area {
    padding-top: 4rem;
  }
}

/* Responsive adjustments for very small screens */
@media (max-width: 576px) {
  .options-container {
    grid-template-columns: 1fr;
  }
  
  .image-item {
    height: 7rem;
  }
  
  .custom-checkbox {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .option-text {
    font-size: 1.2rem;
  }
}