/* @Jael Orea para FCS */
@import url('https://fonts.googleapis.com/css2?family=Fahkwang:wght@200;300;400;500;600;700&family=Krub:wght@200;300;400;500;600;700&display=swap');

/* Estilos base mejorados */
body {
  min-height: 600px !important;
}

body,
html {
  font-family: 'Krub', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, #D2E04C, #5EDDC0);
  display: flex;
  flex-direction: column;
  height: 100%;
  /*
  font-family: 'Krub', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, #D2E04C, #5EDDC0);
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  */
}

main {
  /*width: 100%;*/

  flex-grow: 1;
  min-height: 600px;
}

/* Estructura de layout */
.introduction-align,
.pages,
.index-container03,
.inst-words-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /*width: 100%;*/
}

.introduction-align {
  justify-content: center;
  /*min-height: 100vh;*/
  height: 100%;
  padding: 20px 0;
}

.pages {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

#content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Títulos */
h1,
.title-words,
#question-title,
#question-text {
  color: #333;
  text-align: center;
  margin-bottom: 30px;
  width: 90%;
}

#question-text {
  font-size: 1.2rem;
}

.page-indicator {
  text-align: center;
  margin: 10px 0;
  font-size: 0.9rem;
  color: #555;
}

/***********/
.decision-container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Instrucciones */
.instructions {
  padding: 5px;
  padding-bottom: 5px;
  border-radius: 8px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.4);
}

.instructions p {
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
}

.instructions-words,
.instructions-words02 {
  line-height: 1.5;
}

.instructions-words {
  font-size: 1rem;
}

.instructions-words02 {
  font-size: 0.9rem;
  line-height: 1.2rem;
  margin-bottom: 0.5rem;
}

.instructions-words ul,
.instructions-words02 ul {
  margin: 1em 0;
}

.instructions-words ul {
  padding-left: 1.5rem;
  font-size: 1rem;
}

.instructions-words02 ul {
  font-size: 0.9rem;
}

/* Leyenda de colores */
.color-legend {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin: 15px 0;
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 5px 10px;
}

.circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid #333;
}

.green { background-color: #4CAF50; }
.yellow { background-color: #FFEB3B; }
.red { background-color: #F44336; }

/* Elementos arrastrables */
.draggable-circles {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.draggable {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.2s;
}

.draggable:hover {
  transform: scale(1.1);
}

/* Frases y zonas de soltar */
.phrases-container {
  width: 100%;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.phrase {
  background-color: #fff;
  padding: 12px 50px 12px 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  min-height: 50px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.phrase p {
  margin: 0;
  padding-right: 10px;
  word-break: break-word;
  hyphens: auto;
}

.phrase.correct {
  background-color: rgba(76, 175, 80, 0.1);
  border-left: 4px solid #4CAF50;
}

.drop-zone {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px dashed #999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
}

.drop-zone.active {
  border: 2px dashed #333;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Estilo para círculos colocados correctamente */
.dropped-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Feedback */
.feedback {
  display: none;
  margin-top: 5px;
  padding: 5px;
  background-color: #f8f9fa;
  border-left: 3px solid #4CAF50;
  border-radius: 4px;
  font-size: 0.9rem;
  animation: fadeIn 0.5s ease-in-out;

  margin: 0 auto;
  text-align: center;
}

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

.feedback-text,
.feedback-text02 {
  font-size: 0.9rem;
  line-height: 1.4;
}

.feedback-title {
  color: #D94BD5;
  font-weight: 600;
  margin-bottom: 5px;
}

.feedback-url {
  font-size: 0.8rem;
  color: #666;
  word-break: break-all;
}

/* Botones */
.buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-container {
  text-align: center;
  margin: 20px 0;
}

button,
.mainBtn {
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

button {
  background-color: #4CAF50;
}

button:hover {
  background-color: #45a049;
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.mainBtn {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  background-color: #D94BD5;
  border: 3px solid black;
  padding: 0.5em 1em;
  font-weight: 600;
  min-width: 120px;
}

.mainBtn:hover {
  border: 3px solid #D94BD5;
  background-color: black;
  color: white;
  transform: scale(1.03);
  box-shadow: 0 0 7px 1px #FF1493;
}

/* Resultados */
.results {
  text-align: center;
  font-size: 18px;
  margin: 20px 0;
  font-weight: bold;
  display: none;
}

.completion-message {
  text-align: center;
  font-size: 24px;
  color: #4CAF50;
  margin: 30px 0;
  display: none;
  padding: 20px;
  background-color: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
}

#answers,
.btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.btn-container {
  margin-top: 20px;
}

.answer {
  margin: 5px;
  width: 80%;
}

/* Imágenes */
.logo {
  width: auto;
  max-width: 200px;
  height: auto;
  margin-bottom: 15px;
}

.img-portada01,
.gif-feedback {
  width: 50%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.img-portada02 {
  width: 50%;
  max-width: 600px;
  height: auto;
  display: block;
  margin: 20px auto;
}

.gif-feedback {
  width: 120px;
  max-width: 300px;
}

/* Footer */
.footer {
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  margin-top: 30px;
  padding: 15px;
  color: #333;
}

#reset-btn {
  display: none;
}

.style-color-description {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 5px;
}
.flex-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.question-counter {
  text-align: center;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}
      
/* Animación para transición entre preguntas */
.phrase {
  transition: all 0.5s ease;
}
      
/* Estilo para el contenedor principal */
#phrases-container {
  position: relative;
}
      
@media (max-width: 1200px) {
  .decision-container {
    width: 95%;
  }
  
  .phrase p {
    font-size: 0.95rem;
  }
  
  .logo {
    max-width: 180px;
  }
}

@media (max-width: 900px) {
  .draggable {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }
  
  .phrase {
    padding: 10px 45px 10px 15px;
  }
  
  .instructions p {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .draggable-circles {
    padding: 8px;
    gap: 10px;
  }
  
  .draggable {
    width: 30px;
    height: 30px;
    font-size: 0.8em;
  }
  
  .phrase {
    padding: 10px 40px 10px 12px;
    min-height: 45px;
  }
  
  .drop-zone {
    width: 28px;
    height: 28px;
    right: 10px;
  }
  
  .phrase p {
    font-size: 0.85rem;
  }
  
  .instructions p {
    font-size: 0.9rem;
  }
  
  .mainBtn {
    padding: 8px 15px;
    font-size: 15px;
    min-width: 100px;
  }
  
  .logo {
    max-width: 150px;
  }
}

@media (max-width: 300px) {
  .draggable {
    width: 25px;
    height: 25px;
    font-size: 0.7em;
  }
  
  .phrase {
    padding: 8px 35px 8px 10px;
    min-height: 40px;
  }
  
  .drop-zone {
    width: 24px;
    height: 24px;
    right: 8px;
  }
  
  .phrase p {
    font-size: 0.75rem;
  }
  
  .instructions p {
    font-size: 0.8rem;
  }
  
  .mainBtn {
    padding: 6px 12px;
    font-size: 14px;
    min-width: 90px;
  }
  
  .logo {
    max-width: 120px;
  }
  
  .footer {
    font-size: 0.8rem;
  }
}