#cloze-container {
  max-width: 800px;
  margin: 0 auto 2rem auto;
  padding: 20px;
  border-radius: 10px;
}

.cloze-question-container {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 18px;
  align-items: center;
}

.cloze-question-number {
  font-size: 30px;
  font-weight: bold;
  color: #fff;                /* Texto blanco */
  background: #4a90e2;        /* Fondo azul */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;         /* Círculo */
  top: 0px;
  right: 0px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2;
}

.cloze-sentence {
    background-color: #eef2f7;
    border-inline-start: 4px solid #4a90e2;
    padding: 15px;
    border-radius: 6px;
    font-size: 20px;
    line-height: 1.6;
    color: #333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 1.8rem;
    line-height: 1.6;
    flex: 1;
}

.cloze-blank {
  display: inline-block;
  min-width: 4rem;
  padding: 0.2rem 0.5rem;
  border-bottom: 2px solid #007bff;
  font-weight: bold;
  color: #007bff;
  margin-bottom: -5px;
}

.cloze-blank.filled-correct {
  background-color: #d4edda;
  color: #155724;
  border-bottom-color: #28a745;
  border-radius: 4px;
}

.cloze-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 700px;
  margin: 1.5rem auto 0 auto;
  padding: 15px 20px;
  background-color: #eef2f7;
  border-radius: 8px;
  justify-content: center;
}

.cloze-choice {
  background-color: #4a90e2;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease;
  border: none;
  font-size: 1.2rem;
  font-weight: normal;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: none;
}

.cloze-choice:hover {
  background-color: #357abd;
}

.cloze-choice.correct {
  background-color: #28a745;
  color: white;
}

.cloze-choice.incorrect {
  background-color: #dc3545;
  color: white;
}

.cloze-choice.incorrect::after,
.cloze-choice.correct::after {
  position: absolute;
  top: -10px;
  right: -10px;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.cloze-choice.incorrect::after {
  content: '✗';
  background: #dc3545;
}

.cloze-choice.correct::after {
  content: '✓';
  background: #28a745;
}

.cloze-choice.used {
  background-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

.cloze-choice.used:hover {
  background-color: #6c757d;
}

.cloze-choice.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cloze-choice.disabled:hover {
  transform: none;
}

.cloze-choice.used-correct {
  background-color: #28a745;
  color: white;
}

.cloze-choice.used-correct:hover {
  background-color: #28a745;
}

.cloze-final-container {
  padding: 3rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cloze-final-score {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: black;
}

#final-score-with-percentage-sign {
  font-weight: bold;
}

.cloze-final-images img {
  max-width: 300px;
  height: auto;
  margin-bottom: 2rem;
}

#replay-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

#replay-button:hover {
  background-color: #0056b3;
}

#sentences-summary {
  width: 100%;
  max-width: 700px;
  margin: 2rem auto;
  text-align: right;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  margin-bottom: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-inline-start: 4px solid;
  transition: transform 0.2s ease;
}

.summary-item.correct {
  border-color: #28a745;
  background-color: #d4edda;
}

.summary-item.incorrect {
  border-color: #dc3545;
  background-color: #f8d7da;
}

.summary-icon {
  font-size: 20px;
  font-weight: bold;
  min-width: 25px;
  text-align: center;
}

.summary-item.correct .summary-icon {
  color: #28a745;
}

.summary-item.incorrect .summary-icon {
  color: #dc3545;
}

.summary-number {
  font-weight: bold;
  color: #495057;
  min-width: 30px;
}

.summary-sentence {
  flex: 1;
  font-size: 1.2rem;
  color: #333;
  text-align: right;
}

@media (max-width: 768px) {

  #cloze-container {
    padding: 0;
  }

  .cloze-sentence {
    font-size: 1.4rem;
  }

  .cloze-choices {
    gap: 5px;
    padding: 10px;
    margin: 1rem auto 0 auto;
  }

  .cloze-question-container {
    padding: 0rem;
  }

  .cloze-choice {
    padding: 6px 10px;
    font-size: 16px;
    margin-bottom: 5px;
  }

  .cloze-choice.incorrect::after {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  #sentences-summary {
    margin: 1rem auto;
  }

  .summary-item {
    padding: 10px;
    gap: 8px;
  }

  .summary-sentence {
    font-size: 1.1rem;
  }

  .summary-icon {
    font-size: 18px;
  }
}