/* ==================== */
/* Sentence Builder CSS */
/* ==================== */

/* Container - Matches index.html */
.container {
  max-width: 800px;
  width: 90%;
  margin: 20px auto;
  padding: 20px 15px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  text-align: center;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Page Title */
.title {
  font-size: 2.4em;
  margin-bottom: 15px;
  color: #6a9cff;
  font-weight: 700;
  line-height: 1.2;
}

/* Back Button - Consistent with games.html */
.back-button {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: #6a9cff;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 10;
}

.back-button:hover {
  background-color: #5c8ae6;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.back-button:active {
  transform: translateY(0);
}

/* Game Box - Sentence Container */
#sentence-container {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 15px;
  margin: 15px auto;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#instruction {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

/* Word Options Grid */
.word-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 15px 0;
  padding: 0 10px;
}

/* Word Button - Interactive & Kid-Friendly */
.word-button {
  padding: 12px 16px;
  font-size: 1.2em;
  background-color: #f0f4ff;
  color: #333;
  border: 2px solid #6a9cff;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  flex: 1 1 auto;
  max-width: 140px;
}

.word-button:hover {
  background-color: #e0e8ff;
  transform: translateY(-2px);
}

/* Correct word selected */
.correct-word {
  background-color: #d4edda !important;
  color: #155724;
  border-color: #c3e6cb;
  opacity: 0.95;
  transform: scale(1.05) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Wrong word selected */
.incorrect-word {
  background-color: #f8d7da !important;
  color: #721c24;
  border-color: #f5c6cb;
  transform: scale(0.95) !important;
  animation: shake 0.6s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0) scale(0.95); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Selected Sentence Display */
#selected-sentence {
  margin: 15px 0;
  font-size: 1.4em;
  font-weight: bold;
  color: #333;
  min-height: 30px;
  text-align: center;
}

/* Feedback */
#feedback {
  margin: 15px 0;
  font-size: 1.2em;
  min-height: 30px;
  font-weight: 500;
  color: #d9534f;
  text-align: center;
}

/* Submit Button (Hidden in new logic, but kept for safety) */
#submit-btn {
  display: none; /* Hidden because we use real-time feedback */
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0 10px;
  flex-wrap: wrap;
}

.navigation-buttons button {
  background-color: #6a9cff;
  color: white;
  font-size: 1.1em;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 100px;
}

.navigation-buttons button:hover {
  background-color: #5c8ae6;
  transform: translateY(-2px);
}

.navigation-buttons button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Music Toggle - Matches index.html */
.music-toggle-absolute {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background-color: #ffb86c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.6em;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 100;
}

.music-toggle-absolute:hover {
  background-color: #e6a760;
  transform: scale(1.1);
}

.music-toggle-absolute:active {
  transform: scale(0.95);
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .container {
    padding: 25px 15px;
    width: 95%;
  }

  .title {
    font-size: 2.0em;
  }

  .word-button {
    font-size: 1.1em;
    padding: 10px 14px;
  }

  .navigation-buttons button {
    font-size: 1em;
    padding: 8px 16px;
  }

  .back-button {
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.9em;
  }

  .music-toggle-absolute {
    width: 44px;
    height: 44px;
    font-size: 1.4em;
    bottom: 12px;
    right: 12px;
  }
}

@media (max-width: 400px) {
  .title {
    font-size: 1.8em;
  }

  .word-options {
    gap: 12px;
  }

  .word-button {
    font-size: 1em;
    padding: 8px 12px;
    min-width: 70px;
  }

  .navigation-buttons {
    gap: 10px;
  }

  .navigation-buttons button {
    font-size: 0.95em;
    padding: 8px 14px;
  }
}
/* Parenting Tip Section */
.parenting-tip {
  margin: 20px auto;
  padding: 18px;
  max-width: 600px;
  background-color: #e6f7ff;
  border-left: 5px solid #6a9cff;
  border-radius: 10px;
  text-align: left;
  font-size: 1em;
  color: #333;
  line-height: 1.5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.parenting-tip h3 {
  margin: 0 0 10px 0;
  font-size: 1.3em;
  color: #1B2A5B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.parenting-tip h3::before {
  content: "💡";
}