@import url('https://fonts.googleapis.com/css2?family=Braah+One&display=swap');


:root {
  --background-secundario:#5b7910;
  --background-principal:#f0fff4;
  --background-footer-option1:#e0f2f1;

  /* Progress bar */
  --background-progress-bar:#c8e6c9;
  --progress-color-fill:#5b7910;

  /* Cards */
  --card-complete-background:#dcedc8;
  --description-card-color:#666;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #dddddd;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  background-color: #5b7910;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

h1 {
  font-family: 'Braah One', 'sans-serif';
  font-style: normal;
}

strong {
  font-family: 'Arial','sans-serif';
  font-weight: bold;
  font-size: 1.25rem;
  color: white;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 3.125rem;
  margin-right: 0.625rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-intro {
  text-align: center;
  margin: 2rem auto;
  max-width: 43.75rem;
  padding: 0 1.5rem;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  font-family: 'Arial','sans-serif';
}

.progress-bar-container {
  background-color: #dddddd;
  padding: 0.625rem 1.875rem;
}

.progress-bar {
  width: 100%;
  height: 1.25rem;
  background-color: var(--background-progress-bar);
  border-radius: 0.625rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--progress-color-fill);
  width: 0%;
  transition: width 0.3s ease-in-out;
}

.steps-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  padding: 1.875rem;
}

.step-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  padding: 1.25rem;
  transition: transform 0.2s, background-color 0.2s;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-card:hover {
  transform: scale(1.03);
}

.step-card:not(.completed) {
  background-color: var(--background-secundario);
  color: #e5e5e5;
}


.step-title {
  font-family: 'Braah One', 'sans-serif';
  font-weight: 600;
  font-size: 1.8rem;
  margin-bottom: 0.94rem;
  text-align: center;
  margin-top: 1.25rem;
}

.step-description {
  font-size: 0.95rem;
  color: var(--description-card-color);
  font-family: 'Arial','sans-serif';
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
}
    
.modal-content {
  background: white;
  padding: 1.875rem;
  border-radius: 15px;
  max-width: 31.25rem;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 0.94rem;
  font-family: 'Braah One', 'sans-serif';
}
    
.modal-content p {
  font-family: 'Arial','sans-serif';
  margin-bottom: 1.25rem;
}

.modal-content input {
  padding: 0.625rem;
  width: 80%;
  margin-bottom: 1.25rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}
    
.modal-content button {
  font-family: 'Arial','sans-serif';
  background-color: #81c784;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  margin: 5px;
}

.modal-content button.cancel {
  background-color: #e57373;
}

.reset-button-container {
  text-align: center;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.reset-button-container button {
  background-color: red;
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Arial','sans-serif';
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 1.25rem;
  background-color: #9ea9835a; /*#b8c52843*/
  font-size: 0.85rem;
  font-family: 'Arial','sans-serif';
}

.footer-link {
  color: #5b7910;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: blue;
  text-decoration: underline;
}

/* === STYLES FOR THE GAME MODAL === */
#game-container {
    position: relative;
    padding: 1.25rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 52.5rem; /* Slightly wider than the canvas */
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background-color: #f0f8ff; /* Light sky-blue background */
    border-radius: 8px;
}

#close-game-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 2.5rem;
    height: 2.5rem;
    background: #c62828; /* Red */
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 2.5rem;
    text-align: center;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

#close-game-btn:hover {
    transform: scale(1.1);
    background: #e53935; /* Lighter red on hover */
}

/* Modal de finalização */
.final-mascot {
  width: 15rem;
  margin-bottom: 1.25rem;
}

#finalModal .modal-content {
  padding: 2.5rem;
}

#finalModal h2 {
  font-family: 'Braah One', 'sans-serif';
  font-size: 2.19rem;
  color: #388e3c;
}

#finalModal button {
  width: 100%;
  margin-top: 1.25rem;
}

/* === STYLES FOR STEP 1 DRAG-AND-DROP GAME === */
.plate-game-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0;
}

.food-options, .drop-zone {
  width: 48%;
  padding: 10px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  min-height: 200px;
}

.food-options h3, .drop-zone h3 {
  text-align: center;
  margin-top: 0;
  color: #555;
  font-family: 'Arial','sans-serif';
}

.food-item {
  background-color: #e0f2f1;
  color: #333;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: grab;
  border: 1px solid #b2dfdb;
  text-align: center;
  font-family: 'Arial','sans-serif';
}

.food-item:active {
  cursor: grabbing;
}

.drop-zone.hovered, .food-options.hovered {
  background-color: #dcedc8;
  border-color: var(--background-secundario);
}

.feedback-message {
  margin-top: 15px;
  font-weight: bold;
  font-family: 'Arial','sans-serif';
  min-height: 20px;
}

.feedback-message.correct {
  color: #388e3c;
}

.feedback-message.incorrect {
  color: #e53935;
}

.food-item.dragging {
  position: fixed; /* Use fixed positioning to drag over other elements */
  z-index: 1000; /* Ensure it appears on top */
  pointer-events: none; /* Prevent the element from interfering with drop detection */
}

/* --- Estilos para telas menores que 768px (mobile) --- */
@media (max-width: 768px) {

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
  }

  .logo {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .logo img.image-avokiddo {
    width: 60px;
    height: auto;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  nav strong {
    font-size: 1rem;
    padding: 5px 10px;
    display: block;
  }

  .steps-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .step-card {
    width: 90%;
    font-size: 0.95rem;
    padding: 10px;
  }

  .step-title {
    font-size: 1.1rem;
  }

  .step-description {
    font-size: 0.9rem;
  }

  .modal-content {
    width: 90%;
    max-width: 95vw;
    padding: 20px;
    font-size: 1rem;
  }

  .progress-bar {
    height: 14px;
    margin: 10px;
  }

  .reset-button-container button {
    font-size: 0.9rem;
    padding: 8px 16px;
  }

  footer {
    font-size: 0.8rem;
    text-align: center;
    padding: 20px 10px;
  }

  .footer-link {
    display: block;
    margin-bottom: 5px;
  }
}
