body {
  /* background-image: var(--background-image-mobile); */
  background-color: var(--background-color-principal);
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Aplicar fondo sólido solo cuando game-screen está activa */
body.game-active {
  background-image: none;
  background-color: var(--background-color-principal);
}

.join--screen,
.waiting--screen,
.end--screen {
  padding: var(--spacing-xlarge);
  padding-top: 6rem;
}

.waiting--screen,
.end--screen {
  text-align: center;
  text-wrap: balance;

  h1 {
    font-size: var(--font-size-xlarge);
    font-weight: var(--font-weight-bold);
  }
}

.register--form {
  display: flex;
  margin-top: 1rem;
  flex-direction: column;
  gap: var(--spacing-medium);
}

.game--screen {
  position: relative;
  overflow-x: hidden;
  
  header {
    position: relative;
    width: 100%;
    z-index: 0;
  }

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

  .game-user-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xlarge);
    margin-bottom: var(--spacing-large);
    z-index: 1;
    position: relative;
    color: var(--tertiary-color);  
    
    .user-info {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: var(--spacing-small);
    }
    
    .game--nickname {
      font-weight: bold;
      text-align: left;
      margin-bottom: 0;
      font-size: 1.2rem;
      margin: 0;
    }
    
    .game--id-user {
      font-size: 0.8em;
      background-color: #f1f5f9;
      padding: 4px 8px;
      border-radius: 8px;
      min-width: max-content;
      text-align: center;
      margin-left: var(--spacing-small);
      border: 2px solid var(--primary-color);
    }
  }

  /* Agregar padding al contenido de preguntas */
  .question-container {
    padding: 0 var(--spacing-small);
    margin-top: var(--spacing-small);
  }
}

.end--screen {
  .game-user-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-medium);
    padding: 0;
    margin-bottom: var(--spacing-large);
    
    .user-info {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: var(--spacing-small);
    }
    
    .game--nickname {
      font-weight: bold;
      text-align: center;
      margin: 0;
      font-size: 1.2rem;
    }
    
    .game--id-user {
      font-size: 0.8em;
      color: #6b7280;
      background-color: #f1f5f9;
      padding: 4px 8px;
      border-radius: 8px;
      min-width: max-content;
      text-align: center;
      margin-left: var(--spacing-small);
    }
  }
}

#pressBtn {
  display: none;
}

.final--message {
  margin-top: 2rem;
}

.leaveGame--container {
  padding: var(--spacing-small);
  display: flex;
  flex-direction: column;
  margin-top: auto;

  button {
    background-color: var(--secondary-color);
    color: var(--tertiary-color);
  }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
}

input:invalid {
  border-color: #dc2626;
}

/* Estilos para el contenedor de preguntas */
.question-container {
  display: flex;
  flex-direction: column;
  background-color: transparent;
  padding: 0;
  transition: all 0.3s ease;
  border: none;
}

.question-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 1rem;
}

/* Estilos específicos para el header del game-screen */
.game--screen header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

.game--screen .header-image {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: baseline;
}

/* Estilos para los divisores blancos */
.game--screen .header-divider {
  width: 1px;
  height: 30px;
  background-color: white;
  align-self: center;
}

/* Estilos individuales para cada logo */
.game--screen .sanofi-logo {
  height: 22px;
  margin-right: 5px;
  vertical-align: baseline;
}

.game--screen .lipid-together-logo {
  height: 30px;
  margin: 0 10px;
  vertical-align: baseline;
}

.game--screen .lipid-experts-logo {
  height: 55px;
  margin-left: 5px;
  vertical-align: baseline;
}

.question-description {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #666;
  font-weight: normal;
}

.question-text {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
  text-align: center;
  line-height: 1.3;
  position: relative;
}

.question-text:after {
  content: "";
  display: block;
  width: 300px;
  height: 2px; 
  margin: 1rem auto 0;
}

.options-container {
  display: flex;
  flex-direction: column;
}

.option-button {
  background-color: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.letter-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  flex-shrink: 0;
  z-index: 3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 0;
  left: 0;
  border: 3px solid white;
}

.option-header {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  position: relative;
  width: 100%;
  padding-left: 30px;
  z-index: 2;
  margin-top: 20px;
}

.option-arrow {
  position: absolute;
  right: 10px;
  font-size: 1.2rem;
  color: white;
}

.option-content {
  flex: 1;
  background-color: #9c27b0;
  border-radius: 0;
  padding: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  z-index: 1;
}

.respuesta-label {
  background-color: #56b6be;
  color: #fff;
  padding: 6px 15px;
  padding-left: 30px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: 0;
  margin-left: 0;
  flex-grow: 1;
  justify-content: space-between;
  border-left: 3px solid white;
  margin-left: -12px;
  position: relative;
  overflow: visible;
  white-space: nowrap;
}

.respuesta-label.correct {
  background-color: #ff00ff;
  color: white;
  font-weight: bold;
  display: flex !important;
}

.respuesta-label.user-correct {
  background-color: #4CAF50; /* Verde para respuesta correcta del usuario */
  color: white;
  font-weight: bold;
}

.respuesta-label.user-incorrect {
  background-color: #F44336; /* Rojo para respuesta incorrecta del usuario */
  color: white;
  font-weight: bold;
}

.option-text {
  font-size: 14px;
  line-height: 1.3;
  color: #fff;
  font-weight: normal;
}

/* Estilos específicos para cada opción */
.option-button:nth-child(1) .letter-circle {
  background-color: var(--text-color-tertiary);
  color: var(--tertiary-color);
}

.option-button:nth-child(1) .respuesta-label {
  background-color: #56b6be;
}

.option-button:nth-child(1) .option-content {
  background-color: var(--tertiary-color);
}

.option-button:nth-child(2) .letter-circle {
  background-color: var(--text-color-tertiary);
  color: var(--tertiary-color);
}

.option-button:nth-child(2) .respuesta-label {
  background-color: #56b6be;
}

.option-button:nth-child(2) .option-content {
  background-color: var(--tertiary-color);
}

.option-button:nth-child(3) .letter-circle {
  background-color: var(--text-color-tertiary);
  color: var(--tertiary-color);
}

.option-button:nth-child(3) .respuesta-label {
  background-color: #56b6be;
}

.option-button:nth-child(3) .option-content {
  background-color: var(--tertiary-color);
}

.option-button:nth-child(4) .letter-circle {
  background-color: var(--text-color-tertiary);
  color: var(--tertiary-color);
}

.option-button:nth-child(4) .respuesta-label {
  background-color: #56b6be;
}

.option-button:nth-child(4) .option-content {
  background-color: var(--tertiary-color);
}

.option-button:nth-child(5) .letter-circle {
  background-color: var(--text-color-tertiary);
  color: var(--tertiary-color);
}

.option-button:nth-child(5) .respuesta-label {
  background-color: #56b6be;
}

.option-button:nth-child(5) .option-content {
  background-color: var(--tertiary-color);
}

/* Estilos para la respuesta correcta */
.option-button.correct-answer .letter-circle {
  background-color: var(--secondary-color);
}

.option-button.correct-answer .letter-circle:after {
  background-color: white;
}

.option-button.correct-answer .option-content {
  background-color: var(--accent-primary-color);
  color: #fff;
}

.option-button.correct-answer .option-text {
  color: #fff;
}

.option-button.correct-answer .respuesta-label {
  background-color: var(--accent-primary-color);
  color: white;
  font-weight: bold;
  display: flex !important;
}

.option-button.correct-answer .respuesta-label:after {
  background-color: white;
}

/* Estilos para la respuesta seleccionada correcta */
.option-button.user-correct-answer .letter-circle {
  background-color: #4CAF50;
}

.option-button.user-correct-answer .letter-circle:after {
  background-color: white;
}

.option-button.user-correct-answer .option-content {
  background-color: #4CAF50;
  color: #fff;
}

.option-button.user-correct-answer .respuesta-label {
  background-color: #4CAF50;
}

.option-button.user-correct-answer .respuesta-label:after {
  background-color: white;
}

/* Estilos para la respuesta seleccionada incorrecta */
.option-button.user-incorrect-answer .letter-circle {
  background-color: #F44336;
  border-color: white;
}

.option-button.user-incorrect-answer .letter-circle:after {
  background-color: white;
}

.option-button.user-incorrect-answer .option-content {
  background-color: #9c27b0; /* Mantener el color original */
  border: 2px solid #F44336;
}

.option-button.user-incorrect-answer .respuesta-label {
  background-color: #F44336;
  color: white;
  font-weight: bold;
  display: flex !important;
}

.option-button.user-incorrect-answer .respuesta-label:after {
  background-color: white;
}

/* Mejorar estilos para botones deshabilitados */
.option-button:disabled {
  opacity: 0.9; /* Menos transparencia */
  cursor: not-allowed;
}

.option-button.disabled:not(.correct-answer):not(.user-incorrect-answer) {
  background-color: transparent;
  opacity: 0.7;
}

.option-button.disabled:not(.correct-answer):not(.user-incorrect-answer) .option-content {
  background-color: var(--tertiary-color);
  opacity: 0.7;
}

.option-button.disabled:not(.correct-answer):not(.user-incorrect-answer) .letter-circle {
  opacity: 0.7;
}

/* Mantener la opacidad completa para las respuestas correctas e incorrectas */
.option-button.correct-answer:disabled,
.option-button.user-incorrect-answer:disabled {
  background-color: transparent;
  opacity: 1;
}

.option-button.selected-option .option-content {
  border: 2px solid var(--secondary-color);
}

.option-button.selected-option .letter-circle {
  border-color: #fff;
}

.option-button.selected-option .letter-circle:after {
  background-color: #ff00ff;
}

.option-button.selected-option .respuesta-label {
  border-left-color: #ff00ff;
}

.option-button.selected-option .respuesta-label:after {
  background-color: #ff00ff;
}

.result-correct, 
.result-incorrect {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-correct {
  background-color: rgba(86, 182, 190, 0.1);
  color: var(--primary-color);
  border-left: 5px solid var(--primary-color);
}

.result-incorrect {
  background-color: rgba(125, 1, 186, 0.1);
  color: var(--accent-color);
  border-left: 5px solid var(--accent-color);
}

/* Mejorar estilos del contenedor de juego */
.game-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.game--score {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tertiary-color);
  margin: 0;
}

.game--score-label {
  font-size: 0.8rem;
  color: var(--secondary-color);
  margin-left: var(--spacing-small);
}

/* Animación para el cambio de puntaje */
.game--score.score-updated {
  animation: scoreUpdate 1s ease;
  color: var(--accent-color);
}

@keyframes scoreUpdate {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.waiting-question {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  padding: 2rem;
  text-align: center;
  width: 100%;
  height: 200px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.waiting-question p {
  font-size: 1.2rem;
  color: var(--background-color);
  font-weight: 500;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}
