/* Smoke Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #fffbd0 0%, #f0c65e 100%);
  animation: fadeOut 2.5s ease-out forwards;
  animation-delay: 2.5s;
}
.smoke-layer {
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  z-index: 0;
}
.congrats-message {
  position: relative;
  z-index: 2;
  font-size: 2rem;
  text-align: center;
  font-family: 'Comic Neue', cursive;
  color: black;
  line-height: 1.4;
  padding: 0.5rem 1rem;
}
.congrats-message .spark {
  color: black;
  text-decoration: underline;
  text-shadow: none;
}
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
    display: none;
  }
}

/* Chest Video */
.chest-video {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  margin: 0 auto 0.4rem;
  display: block;
}

/* Treasure Wrapper */
.treasurebox-wrapper {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Unlock Header */
.about-heading.treasure-welcome {
  font-size: 1.3rem;
  font-weight: bold;
  color: #000;
  margin: 0.4rem auto 0.4rem;
}
#questionBlock.unlocked h1.about-heading {
  display: none;
}

/* Lock Form */
.lock-form {
  background: #fff;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 0.6rem 1rem 0.7rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  max-width: 400px;
  margin: 0.5rem auto 0;
}
.lock-form p {
  font-weight: bold;
  margin-bottom: 0.3rem;
}
.lock-form input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.lock-form button {
  background-color: #f9c65e;
  color: #000;
  font-weight: bold;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.lock-form button:hover {
  background-color: #f0b942;
}

/* Fireworks Video */
.fireworks {
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 2rem auto 1rem;
  display: block;
  border-radius: 8px;
  z-index: 1;
}
.fireworks.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

/* Reveal Panel */
.reward-panel {
  position: absolute;
  opacity: 0;
  text-align: center;
  padding: 1rem;
  background: #fff;
  /* border: 2px dashed #ccc; */
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
  transition: all 0.6s ease;
  width: fit-content;
  max-width: 90vw;
}
.reward-panel.slide-up {
  opacity: 1;
  animation: slideUp 0.6s ease-out forwards;
}
/* Slide Up Animation */
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Buttons and Note */
.reward-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.reward-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 0.5rem 0.9rem;
  font-size: 1rem;
  border-radius: 8px;
  background-color: #f9c65e;
  color: #000;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: auto;
  min-width: auto;
  text-align: center;
  white-space: nowrap;
}

.reward-buttons button:hover {
  background-color: #f0b942;
}
.download-note {
  font-size: 0.9rem;
  font-weight: bold;
  color: #d35400;
  margin-top: 0.5rem;
  text-align: center;
}

/* Instructions Box */
.prize-instructions {
  display: none;
  max-width: 600px;
  margin: 2rem auto;
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  text-align: left;
}

.prize-instructions h4 {
  margin-top: 0;
  text-align: center;
  font-size: 1.2rem;
  color: #a84c0a;
}

/* Responsive */
@media (max-width: 600px) {
  .congrats-message {
    font-size: 1.6rem;
    padding: 1rem;
  }
  .chest-video {
    max-width: 90%;
  }
  .reward-panel {
    flex-direction: column;
  }
  .reward-buttons {
    flex-wrap: wrap;
  }
}

.treasure-reveal {
  background-color: #e6ffe6;
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 10px;
  animation: fadeIn 0.8s ease-in-out;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10%;
  width: 100%;
  max-width: 440px;
  text-align: center;
  z-index: 2;
  display: none;
}

.treasure-reveal h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.treasure-reveal ul.downloads {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.treasure-reveal ul.downloads li a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #f9c65e;
  color: #000;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.treasure-reveal ul.downloads li a:hover {
  background-color: #f0b942;
}

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