/* =========================================================
   Lucketts Elementary PTA Turkey Drive 2025
   Cleaned & Optimized CSS
   Warm fall palette: Orange, Gold, and Rustic Brown
   ========================================================= */

/* ---------- Base Styles ---------- */
body {
  font-family: "Comic Sans MS", sans-serif;
  background-color: #fff8e1;
  color: #5a3d1e;
  text-align: center;
  margin: 0;
  padding: 0;
}

header,
footer {
  background: #f28c28;
  color: #fff;
  padding: 1em 0;
  border-bottom: 4px solid #d46a00;
}

footer {
  margin-top: 40px;
  border-top: 4px solid #d46a00;
}

h1 {
  margin: 0.2em 0;
}
h2 {
  margin-top: 1.5em;
}
p {
  margin: 0.5em 0;
}

/* ---------- Buttons ---------- */
button {
  background-color: #f28c28;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover {
  background-color: #d46a00;
  transform: scale(1.05);
}

/* ---------- Matching Banner ---------- */
#matching-banner {
  background: linear-gradient(90deg, #ffb347, #ffcc33);
  color: #5a3d1e;
  text-align: center;
  font-weight: bold;
  padding: 0.75em;
  font-size: 1.1em;
  border-bottom: 3px solid #d46a00;
  box-shadow: 0 0 10px rgba(255, 204, 51, 0.4);
  opacity: 0;
  transition: opacity 0.8s ease;
  animation: pulse 3s infinite;
}
#matching-banner.active {
  opacity: 1;
}
#countdown {
  font-size: 0.9em;
  margin: 0;
  font-weight: bold;
  color: #5a3d1e;
}
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 204, 51, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 204, 51, 0.9);
  }
}

/* ---------- Thermometer ---------- */
#thermo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto 10px;
}

#thermo-outline {
  position: relative;
  width: 60px;
  height: 250px;
  background: #f1ede1;
  border: 3px solid #d46a00;
  border-radius: 30px;
  overflow: hidden;
}
#thermo-outline::after {
  content: attr(data-maxgoal);
  position: absolute;
  top: -20px;
  right: -20px;
  background: #fff8e1;
  color: #5a3d1e;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

#thermo-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, #cc0000, #f28c28, #ffcc33, #76c043);
  background-size: 100% 300%;
  transition: height 1s ease-in-out, background-position 1s ease-in-out;
}
#thermo-fill.animate {
  background-position: 0% 100%;
}

#thermo-bulb {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 30% 30%, #ff9933, #d46a00);
  border-radius: 50%;
  border: 3px solid #d46a00;
}

/* ---------- Thermometer Scale ---------- */
#thermo-scale {
  position: absolute;
  top: 0;
  right: -44px;
  width: 44px;
  height: 100%;
  pointer-events: none;
}
.thermo-tick {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(50%);
  font-weight: bold;
  font-size: 0.9em;
  color: #5a3d1e;
}
.thermo-tick::before {
  content: "";
  width: 10px;
  height: 2px;
  background: #d46a00;
}

/* ---------- Progress Text ---------- */
#progress-text {
  font-size: 1.3em;
  margin-top: 10px;
  font-weight: bold;
}
#last-updated {
  font-size: 0.9em;
  color: gray;
  margin-top: 5px;
}

/* ---------- Reach Goals ---------- */
#reach-goals {
  background: #fff8e1;
  border: 2px solid #f0b429;
  border-radius: 8px;
  padding: 1em;
  margin: 1.5em auto;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
#reach-goals h3 {
  text-align: center;
  margin-bottom: 0.5em;
  color: #5a3d1e;
}
#goal-list {
  list-style: none;
  padding: 0;
}
#goal-list li {
  display: flex;
  align-items: center;
  margin: 8px 0;
  font-size: 1em;
  transition: all 0.4s ease;
}
#goal-list input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 8px;
  accent-color: #f0b429;
}
.goal-reached label {
  font-weight: bold;
  color: #2e7d32;
}

/* ---------- Stretch Effects ---------- */
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #fff, rgba(255,255,255,0));
  border-radius: 50%;
  opacity: 0.8;
  animation: sparkleAnim 2s ease-out infinite;
}
@keyframes sparkleAnim {
  0% {
    transform: scale(0) translateY(0);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.5) translateY(-10px);
    opacity: 1;
  }
  100% {
    transform: scale(0) translateY(-20px);
    opacity: 0;
  }
}

.stretch-badge {
  display: inline-block;
  background: #ffd700;
  color: #5a3d1e;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 8px;
  margin-left: 10px;
  font-size: 0.8em;
  box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* ---------- Stretch Goal Toasts ---------- */
.stretch-toast {
  position: relative;
  background: #ffeb99;
  color: #5a3d1e;
  font-weight: bold;
  border: 2px solid #f0b429;
  border-radius: 10px;
  padding: 10px 16px;
  margin: 10px auto;
  width: fit-content;
  max-width: 90%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.6s ease;
  z-index: 10;
}
.stretch-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Accessibility ---------- */
.visually-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  #thermo-outline {
    height: 200px;
    width: 50px;
  }
  #thermo-bulb {
    width: 80px;
    height: 80px;
    bottom: -35px;
  }
  button {
    padding: 10px 20px;
    font-size: 1em;
  }
  #thermo-scale {
    right: -38px;
  }
}

/* ---------- Post-Drive Mode ---------- */
body.post-drive {
  background: #fff3cd;
  color: #5a3d1e;
}

#thankyou-mode {
  padding: 3em 1em;
  text-align: center;
}

#thankyou-mode h2 {
  font-size: 2em;
  color: #d46a00;
  margin-bottom: 0.5em;
}

#thankyou-mode p {
  font-size: 1.2em;
  margin: 0.5em auto 1em;
  max-width: 500px;
}

#thankyou-mode button {
  background-color: #f28c28;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  padding: 12px 28px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

#thankyou-mode button:hover {
  background-color: #d46a00;
}

#thankyou-mode .tagline {
  font-style: italic;
  font-size: 1.1em;
  color: #7b5a2e;
  margin-top: 1em;
}

.confetti-bg {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,215,0,0.1),
    rgba(255,215,0,0.1) 10px,
    rgba(255,165,0,0.1) 10px,
    rgba(255,165,0,0.1) 20px
  );
  pointer-events: none;
  z-index: 0;
}

/* ---------- Post-Drive Photo & Message ---------- */
#thankyou-mode {
  padding: 3em 1em;
  text-align: center;
}

#thankyou-mode h2 {
  font-size: 2em;
  color: #d46a00;
  margin-bottom: 0.5em;
}

#thankyou-mode p {
  font-size: 1.2em;
  margin: 0.5em auto 1em;
  max-width: 500px;
  color: #5a3d1e;
}

.thankyou-photo {
  margin: 1.5em auto;
  display: flex;
  justify-content: center;
}

.thankyou-photo img {
  max-width: 90%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#thankyou-mode .tagline {
  font-style: italic;
  font-size: 1.1em;
  color: #7b5a2e;
  margin-top: 1em;
}