:root {
  --green-dark: #14532d;
  --green: #22c55e;
  --green-light: #bbf7d0;
  --green-accent: #4ade80;
  --green-hover: #16a34a;
  --text-light: #fff;
  --bg-light: #f0fdf4;
  --bg-gradient: linear-gradient(120deg, #f0fdf4 0%, #bbf7d0 100%);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  text-align: center;
  background: linear-gradient(0deg, #fff 40%, #bbf7d0 60%);
  padding: 20px;
}

#lixos-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px auto;
  gap: 20px;
  max-width: 800px;
  min-height: 150px;
}

.lixo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 12px;
  display: inline-block;
  cursor: grab;
  transition: transform 0.2s ease;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
  background: #e9ffe9;
  border: 2px solid var(--green-accent);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  max-width: 110px;
}

.lixo:active {
  transform: scale(0.95);
}

.lixeiras {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
}

.lixeira {
  align-items: center;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100px;
  min-height: unset;
  position: relative;
  overflow: visible;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.lixeira-label {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--green-dark);
  background: linear-gradient(90deg, #bbf7d0 0%, #4ade80 100%);
  border-radius: 10px;
  padding: 2px 6px;
  margin-top: 4px;
  font-weight: bold;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(34,197,94,0.10);
  display: inline-block;
  border: 2px solid var(--green-accent);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lixeira img {
  width: 100%;
  height: auto;
}

.feedback-zone {
  position: relative;
  margin-top: 10px;
  min-height: 30px;
}

.feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  z-index: 10;
  pointer-events: none;
}

#reset-button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.error-shake {
  animation: shake 0.4s ease;
}

.pontuacao-box {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 12px rgba(34,197,94,0.15);
  letter-spacing: 2px;
  border: 2px solid var(--green-accent);
  transition: background 0.3s, color 0.3s;
  position: fixed;
  right: 30px;
  top: 30px;
  z-index: 100;
  margin: 0;
}

.pontuacao-box span {
  color: var(--green-hover);
  font-size: 1.2rem;
  margin-left: 4px;
}

.vidas-box {
  display: inline-block;
  background: #fff0f0;
  color: #d90429;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 1rem;
  font-weight: bold;
  box-shadow: 0 2px 12px rgba(217,4,41,0.10);
  letter-spacing: 2px;
  border: 2px solid #d90429;
  position: fixed;
  left: 30px;
  top: 30px; /* alinhado com a pontuação */
  z-index: 100;
  margin: 0;
}

.vidas-box span {
  font-size: 1.2rem;
  margin-left: 4px;
  letter-spacing: 2px;
  margin-top: 50px;
}

#botao-fase {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 2.2rem;
  font-weight: bold;
  padding: 40px 80px;
  box-shadow: 0 8px 32px rgba(34,197,94,0.25);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#botao-fase:hover {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  transform: translate(-50%, -50%) scale(1.05);
}

@keyframes golden-flash {
  0% { box-shadow: 0 0 0 0 gold, 0 0 0 0 #fff; }
  30% { box-shadow: 0 0 80px 40px gold, 0 0 120px 60px #fff; }
  60% { box-shadow: 0 0 80px 40px gold, 0 0 120px 60px #fff; }
  100% { box-shadow: 0 0 0 0 gold, 0 0 0 0 #fff; }
}

.golden-flash {
  animation: golden-flash 1.2s ease-in;
}

.golden-bg {
  background: linear-gradient(0deg, #fffbe6 0%, #ffe066 100%) !important;
  transition: background 0.2s;
}

.golden-message {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 224, 102, 0.92);
  z-index: 10000;
  font-size: 2.5rem;
  font-weight: bold;
  color: #bfa100;
  text-shadow: 0 2px 16px #fffbe6, 0 0 8px #ffe066;
  letter-spacing: 2px;
  animation: golden-msg-fade 0.95s;
}

@keyframes golden-msg-fade {
  0% { opacity: 0; transform: scale(0.95); }
  20% { opacity: 0; transform: scale(1.05); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  .header-status {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    margin-top: 12px;
  }

  .pontuacao-box,
  .vidas-box {
    position: static;
    display: inline-block;
    margin: 0 8px 0 8px;
    font-size: 1.2rem;
    padding: 8px 18px;
    border-radius: 18px;
    top: unset;
    left: unset;
    right: unset;
  }

  .header-content {
    align-items: center;
    text-align: center;
  }

  .menu-navacao {
    flex-direction: column;
    gap: 0.7rem;
  }

  .lixeira {
    width: 70px;
  }

  .lixeira-label {
    font-size: 0.82rem;
    padding: 3px 6px;
    max-width: 80px;
    white-space: normal;
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
  }

  .pontuacao-box {
    top: 20px;
    right: 20px;
    font-size: 1.7rem;
    padding: 10px 20px;
  }

  .vidas-box {
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    padding: 8px 18px;
  }

  h1, .titulo {
    margin-top: 120px !important;
    margin-bottom: 40px !important;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .lixo {
    width: 60px;
    height: 60px;
    font-size: 0.6rem;
  }

  .lixeira {
    width: 70px;
  }

  .lixeira-label {
    font-size: 0.7rem;
    padding: 2px 4px;
    max-width: 80px;
    white-space: normal;
    line-height: 1.1;
    text-align: center;
    word-break: break-word;
  }

  .pontuacao-box {
    font-size: 1.3rem;
    padding: 8px 16px;
    top: 5px;
    right: 5px;
    margin-bottom: 40px;
  }

  .vidas-box {
    font-size: 1.1rem;
    padding: 8px 16px;
    top: 50px;
    left: 10px;
    margin-bottom: 60px;
  }

  h1, .titulo {
    margin-top: 100px !important;
    margin-bottom: 30px !important;
    font-size: 1.3rem;
  }

  #botao-fase {
    padding: 20px 40px;
    font-size: 1.2rem;
    pointer-events: auto;
  }

  .golden-message {
    pointer-events: none;
  }
}

@media (max-width: 700px) {
  .lixo {
    touch-action: pan-x pan-y;
  }

  .lixo::after {
    content: "Segure e arraste para a lixeira";
    display: block;
    font-size: 0.65rem;
    color: var(--green-dark);
    margin-top: 2px;
    opacity: 0.7;
    text-align: center;
    white-space: normal;
  }
}
