/* Overlay */
.lixi-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 20000;
}

.lixi-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Envelope */
.lixi-envelope {
  position: relative;
  width: 220px;
  height: 300px;
  background: #d80000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0,0,0,0.35);

  transform: translateY(40px) scale(0.9);
  opacity: 0;
  animation: envelopeIn 0.45s cubic-bezier(.22,1.2,.36,1) forwards;
}

@keyframes envelopeIn {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Flap */
.lixi-flap {
  position: absolute;
  top: 0;
  width: 100%;
  height: 52%;
  background: #c40000;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform 0.75s cubic-bezier(.2,.9,.3,1.1);
  z-index: 3;
}

/* Paper */
.lixi-paper {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 40px;
  bottom: 14px;
  background: #fff2c2;
  border-radius: 10px;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.55s ease, opacity 0.4s ease;
  z-index: 1;
}

/* Body */
.lixi-body {
  position: absolute;
  inset: 0;
  padding: 110px 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Text */
.lixi-text {
  color: #c40000;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s ease,
    transform 0.5s cubic-bezier(.22,1,.36,1);
}

/* Open state */
.lixi-envelope.open .lixi-flap {
  transform: rotateX(-118deg);
}

.lixi-envelope.open .lixi-paper {
  transform: translateY(0);
  opacity: 1;
}

.lixi-envelope.open .lixi-text {
  opacity: 1;
  transform: translateY(0);
}

.simple-coin {
  position: fixed;
  bottom: 76px; /* trên fb */
  right: calc((100vw - 1200px) / 2 + 18px);

  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d80000; /* đỏ thuần */

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 8px 20px rgba(216,0,0,0.35);
  z-index: 10000;
  transition: transform 0.2s ease;
}

.simple-coin svg {
  width: 26px;
  height: 26px;
}

.simple-coin circle {
  fill: none;
  stroke: #ffd700; /* vàng sáng */
  stroke-width: 7;
}

.simple-coin rect {
  fill: none;
  stroke: #ffd700;
  stroke-width: 5;
}

.simple-coin:hover {
  transform: scale(1.1);
}

@media (max-width: 1240px) {
  .simple-coin {
    right: 16px;
  }
}
