/* Easter egg styles: ofrenda. Moved verbatim out of static/app.css (egg rebuild); linked right after app.css in index.html. */
/* ================================================================
   Día de los Muertos ofrenda (justyouraverageonion CodePen RqXWqv).
   Namespaced .cofrenda-*; skull + 3 candles on stand. Transparent wrap
   (no #3E2A42 page wash). Centered ~5–6 s; flame + blink.
   ================================================================ */
.cofrenda-wrap {
  position: fixed;
  inset: 0;
  z-index: 8100;
  pointer-events: none;
  overflow: visible;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.cofrenda-wrap.is-in { opacity: 1; }

.cofrenda-wrap *,
.cofrenda-wrap *::before,
.cofrenda-wrap *::after { box-sizing: border-box; }

.cofrenda-wrap.is-in .cofrenda {
  transform: scale(var(--cofrenda-scale, 1.65));
}

.cofrenda-candle {
  background-color: transparent;
  position: absolute;
  width: 400px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cofrenda-candle-1,
.cofrenda-candle-2,
.cofrenda-candle-3 {
  position: absolute;
  width: 100px;
  height: 220px;
  background: linear-gradient(to right, #F9A21F, #F9A21F 85%, #EC8F14 85%);
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0%);
}

.cofrenda-wax {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0%);
  width: 120px;
  height: 30px;
  background-color: #ECDA96;
  border-radius: 5em;
}

.cofrenda-wax::before {
  position: absolute;
  content: '';
  width: 25px;
  height: 50px;
  border-radius: 0 5em 5em 5em;
  background-color: #ECDA96;
  right: 0;
  box-shadow: -35px 10px 0 #ECDA96;
}

.cofrenda-wax::after {
  position: absolute;
  content: '';
  width: 10px;
  height: 20px;
  background-color: #F9A21F;
  border-radius: 5em;
  right: 25px;
  top: 30px;
  box-shadow: 0 -10px 0 #ECDA96;
}

.cofrenda-flame {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translate(-50%, 0%);
  -webkit-animation: cofrenda-flame 5s infinite ease;
  animation: cofrenda-flame 5s infinite ease;
}

.cofrenda-flame::after,
.cofrenda-flame::before {
  position: absolute;
  content: '';
  transform-origin: bottom center;
  left: 50%;
  bottom: 0;
  border-radius: 0 5em 5em 5em;
}

.cofrenda-flame::before {
  background-color: #F9A21F;
  width: 70px;
  height: 70px;
  transform: translate(-60px, 0%) rotate(45deg);
}

.cofrenda-flame::after {
  background-color: #FED251;
  width: 45px;
  height: 45px;
  transform: translate(-40px, 4px) rotate(45deg);
}

.cofrenda-candle-1 {
  height: 150px;
  left: 15%;
  transform: translate(-50%, 0%);
  background: linear-gradient(to right, #EC8F14, #EC8F14 35%, #F9A21F 35%);
}

.cofrenda-candle-1::after {
  position: absolute;
  content: '';
  width: 15px;
  height: 25px;
  background-color: #FED251;
  border-radius: 5em;
  top: 80px;
  right: 10px;
}

.cofrenda-candle-1 .cofrenda-wax::before {
  border-radius: 5em 0 5em 5em;
  left: 0;
  right: auto;
  top: 10px;
  box-shadow: 35px -10px 0 #ECDA96;
}

.cofrenda-candle-1 .cofrenda-wax::after {
  left: 25px;
  right: auto;
  background-color: #EC8F14;
}

.cofrenda-candle-3 {
  height: 170px;
  left: 85%;
  transform: translate(-50%, 0%);
  background: linear-gradient(to right, #F9A21F, #F9A21F 65%, #EC8F14 65%);
}

.cofrenda-candle-3::after {
  position: absolute;
  content: '';
  width: 15px;
  height: 25px;
  background-color: #FED251;
  border-radius: 5em;
  top: 70px;
  left: 10px;
}

.cofrenda-candle-3 .cofrenda-wax::before {
  border-radius: 5em 0 5em 5em;
  left: 0;
  right: auto;
  box-shadow: 35px 10px 0 #ECDA96;
}

.cofrenda-candle-3 .cofrenda-wax::after {
  left: 25px;
  right: auto;
}

.cofrenda-stand {
  position: absolute;
  background-color: #55395B;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 110%;
  height: 50px;
  border-radius: 5em;
}

.cofrenda-skull {
  background-color: transparent;
  position: absolute;
  width: 200px;
  height: 180px;
  left: 50%;
  transform: translate(-50%, 220px);
  background-color: #F6EAD3;
  border-radius: 10em 10em 3em 3em;
}

.cofrenda-skull::before {
  position: absolute;
  content: '';
  width: 100px;
  height: 25px;
  background-color: #F6EAD3;
  left: 50%;
  transform: translate(-50%, 0px);
  bottom: -25px;
}

.cofrenda-skull::after {
  position: absolute;
  content: '';
  width: 25px;
  height: 25px;
  left: 50%;
  transform: translate(-50%, 0px);
  border-radius: 0 0 0.5em 0.5em;
  bottom: -45px;
  background-color: #F6EAD3;
  box-shadow:
    37.38317757009346px 0 0 #F6EAD3,
    -37.38317757009346px 0 0 #F6EAD3;
}

.cofrenda-holes {
  position: absolute;
  width: 20px;
  height: 30px;
  background-color: #402D43;
  bottom: 0;
  left: 50%;
  transform-origin: bottom;
  transform: translate(-50%, 0px);
  border-radius: 50% 50% 50% 50% / 60% 60% 50% 50%;
}

.cofrenda-holes::after,
.cofrenda-holes::before {
  position: absolute;
  content: '';
  width: 45px;
  height: 60px;
  background-color: #402D43;
  border-radius: 5em;
  bottom: 0;
  left: 50%;
}

.cofrenda-holes::after {
  transform: translate(-130%, -50%) rotate(20deg);
}

.cofrenda-holes::before {
  transform: translate(30%, -50%) rotate(-20deg);
}

.cofrenda-eyes {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 0%);
  bottom: 65px;
}

.cofrenda-eyes::after,
.cofrenda-eyes::before {
  position: absolute;
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #F9A21F;
  transform-origin: center;
  -webkit-animation: cofrenda-blink 1s infinite;
  animation: cofrenda-blink 1s infinite;
}

.cofrenda-eyes::after { left: 25px; }

.cofrenda-eyes::before { left: -45px; }

@-webkit-keyframes cofrenda-blink {
  0, 100% { -webkit-transform: scale(1); transform: scale(1); }
  50% { -webkit-transform: scale(1.1); transform: scale(1.1); }
}

@keyframes cofrenda-blink {
  0, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@-webkit-keyframes cofrenda-flame {
  0, 20%, 40%, 60%, 100% { -webkit-transform: translate(-50%, 0) scale(1); transform: translate(-50%, 0) scale(1); }
  10%, 30%, 50%, 70% { -webkit-transform: translate(-50%, 0) scale(1.1); transform: translate(-50%, 0) scale(1.1); }
  71% { -webkit-transform: translate(-50%, 0) scale(1.1) rotate(0deg); transform: translate(-50%, 0) scale(1.1) rotate(0deg); }
  80% { -webkit-transform: translate(-50%, 0) scale(1) rotate(-20deg); transform: translate(-50%, 0) scale(1) rotate(-20deg); }
}

@keyframes cofrenda-flame {
  0, 20%, 40%, 60%, 100% { transform: translate(-50%, 0) scale(1); }
  10%, 30%, 50%, 70% { transform: translate(-50%, 0) scale(1.1); }
  71% { transform: translate(-50%, 0) scale(1.1) rotate(0deg); }
  80% { transform: translate(-50%, 0) scale(1) rotate(-20deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cofrenda-wrap { display: none; }
}
