/* Full screen container */
.fullscreenContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Responsive envelope wrapper */
.envelopeWrapper {
  width: 90%;
  max-width: 800px;
  height: 70vh;
  max-height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Envelope base styles */
.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 500px;
  max-height: 400px;
  perspective: 1000px;
  cursor: pointer;
  transform-origin: center;
}

/* Flap - responsive triangle */
.flap {
  position: absolute;
  top: 30%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--flap);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform 1s ease;
  z-index: 3;
  border-top: 2px solid #b3a089;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Envelope body */
.body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70%;
  background: var(--envelope);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* Responsive text sizes */
.invitedText {
  margin-top: 25%;
  font-family: 'Brush Script MT', cursive;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text);
  transform: translateY(-15px);
}

/* Letter styles */
.letter {
  position: absolute;
  top: -30%;
  left: 5%;
  width: 90%;
  height: 100%;
  background: var(--letter);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(100%) scale(0.9);
  opacity: 0;
  transition: all 0.8s ease 0.2s;
  z-index: 1;
  border-radius: 3px;
}

/* Animation states */
.opened .flap {
  transform: rotateX(-180deg);
  z-index: 1;
}

.opened .letter {
  transform: translateY(-10%) scale(1);
  opacity: 1;
  z-index: 3;
}

.eventName {
  font-family: 'Brush Script MT', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text);
  margin: 0 0 1rem 0;
}

.date {
  margin-top: 0.8rem;
  font-family: serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text);
  letter-spacing: 1px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .envelopeWrapper {
    height: 80vh;
    max-height: none;
  }
  
  .envelope {
    max-width: 90%;
    max-height: 70%;
  }
  
  .flap {
    top: 25%;
    height: 35%;
  }
  
  .body {
    height: 75%;
  }
  
  .letter {
    padding: 1rem;
  }
}