* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #f6c1cc, #a83b5c);
  font-family: 'Georgia', serif;
}

.scene {
  perspective: 1000px;
}

/* PLIC */
.envelope {
  position: relative;
  width: 380px;
  height: 240px;
  background: #f2dfc7;
  border-radius: 6px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
  overflow: hidden;
}

/* FLAP (CAPAC) */
.flap {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: #e8cfae;
  clip-path: polygon(0 0, 50% 55%, 100% 0);
  transform-origin: top;
  transition: transform 1s ease;
  z-index: 4;
}

/* SIGILIU */
.seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #b22234;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: white;
  font-size: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* SCRISOARE */
.letter {
  position: absolute;
  bottom: -100%;
  left: 5%;
  width: 90%;
  height: 260px;
  background: #fffaf2;
  padding: 35px;
  border-radius: 4px;
  line-height: 1.7;
  transition: bottom 1.2s ease;
  z-index: 2;
}

.letter h1 {
  font-style: italic;
  margin-bottom: 20px;
}

.letter p {
  color: #5a2a2a;
  font-size: 17px;
}

.signature {
  margin-top: 35px;
  text-align: right;
  font-style: italic;
}

/* STARE DESCHIS */
.envelope.open .flap {
  transform: rotateX(180deg);
}

.envelope.open .letter {
  bottom: 10px;
}

.envelope.open .seal {
  opacity: 0;
  pointer-events: none;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  background-image: url("download.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}



