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

/* Prevent layout shift by setting fallback font metrics */
body {
  font-family: 'League Spartan', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Main Container */
.exercise-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
  padding-bottom: 8rem;
  align-items: center;
  margin-bottom: 2rem;
}

/* Image Container */
.image-container {
  width: 100%;
  max-width: 30rem;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  min-height: 13rem;
  height: 13rem;
}

.image-container img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  border-radius: 0.5rem;
  display: block;
  object-fit: contain;
}

/* Table Container */
.table-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
}

/* Exercise Table */
.exercise-table {
  border-collapse: separate;
  border-spacing: .5rem;
  margin: 0 auto;
  table-layout: fixed;
  width: 100%;
  max-width: 80rem;
}

.exercise-table td {
  width: 25%;
}

/* Audio Row */
.audio-row td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: middle;
  height: 6rem;
  min-height: 6rem;
}

.audio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 5rem;
  min-height: 5rem;
}

.audio-label {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #00699F;
  text-align: center;
}

.audio-player {
  position: relative;
  left: auto !important;
  top: auto !important;
  padding-left: 1.1rem;
  width: 5rem;
  height: 5rem;
  min-width: 5rem;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Words Row */
.words-row td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: middle;
  height: 5rem;
  min-height: 5rem;
}

.words-row {
  visibility: hidden;
}

.words-row.ready {
  visibility: visible;
}

.word-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 5rem;
  min-height: 5rem;
  width: 100%;
}

/* Drop Row */
.drop-row td {
  text-align: center;
  padding: 0.5rem;
  vertical-align: middle;
  height: 5rem;
  min-height: 5rem;
}

/* Drop Element */
.drop_element {
  width: 13rem;
  min-height: 3rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: rgba(249, 176, 2, 0.05);
  border: 0.125rem dashed #F9B002;
  border-radius: 0.5rem;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.drop_element.dragover {
  border-color: #00699F;
  background-color: rgba(0, 105, 159, 0.1);
  border-style: solid;
}

.drop_element.correct {
  border: 0.125rem solid #258174;
  background-color: rgba(37, 129, 116, 0.1);
}

.drop_element.incorrect {
  border: 0.125rem solid #FF0000;
  background-color: rgba(255, 0, 0, 0.1);
}

.drop_element .drag_element {
  border: 0;
  background: none;
  width: 13rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  margin: 0;
  font-family: 'League Spartan', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #00699F;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drag Container */
.drag-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
}

/* Drag Element */
.drag_element {
  width: 13rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 0.125rem solid #00699F;
  border-radius: 0.5rem;
  position: relative;
  transition: all 0.3s ease;
  font-family: 'League Spartan', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #00699F;
  text-align: center;
}

.drag_element.dragging {
  opacity: 0.6;
  cursor: grabbing;
  z-index: 1000;
}

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

.audio-button {
  width: 5rem;
  height: 5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

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

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

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

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

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


