* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  background: #fff;
  height: 100%;
}

.main-content {
  position: fixed;
  top: 0;
  left: 0;
  background: url('tra2.png'), #fffaf0;
  display: flex;
  align-items: center;
  width: 100%;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  background-size: cover;
  z-index: 1;
}

#toggle {
  display: none;
}

.envelope-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  perspective: 1500px;
  background: #f4d0d4;
  transition: all 1s ease-in-out 1s;
}

.flap {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s;
}

.flap.top {
  top: 0;
  left: 0;
  border-width: 50vh 50vw 0 50vw;
  border-color: #e8c5c8 transparent transparent transparent;
  transform-origin: top;
  z-index: 5;
}

.flap.bottom {
  bottom: 0;
  left: 0;
  border-width: 0 50vw 50vh 50vw;
  border-color: transparent transparent #e8c5c8 transparent;
  transform-origin: bottom;
  z-index: 4;
}

.flap.left {
  top: 0;
  left: 0;
  border-width: 50vh 0 50vh 50vw;
  border-color: transparent transparent transparent #dfb6ba;
  transform-origin: left;
  z-index: 3;
}

.flap.right {
  top: 0;
  right: 0;
  border-width: 50vh 50vw 50vh 0;
  border-color: transparent #dfb6ba transparent transparent;
  transform-origin: right;
  z-index: 3;
}

.ribbon-banner {
  position: absolute;
  top: 59%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-0deg);
  z-index: 15;
  /* Por encima de todo */
  transition: all 0.6s ease;
}

.ribbon-content {
  position: relative;
  background: #ffffff;
  color: #b58d3d;
  padding: 10px 40px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px;
}

.ribbon-content::before,
.ribbon-content::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 40px;
  height: 100%;
  background: #eee;
  z-index: -1;
}

.ribbon-content::before {
  left: -25px;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 25% 50%);
}

.ribbon-content::after {
  right: -25px;
  clip-path: polygon(0% 0%, 100% 0%, 75% 50%, 100% 100%, 0% 100%);
}

.seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 115px;
  height: 115px;
  background: #fff;
  border-radius: 50%;
  z-index: 20;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.seal::after {
  content: "";
  display: inline-block;
  width: 105px;
  height: 105px;

  background-image: url("icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#toggle:checked~.envelope-wrapper .flap.top {
  transform: rotateX(110deg);
  opacity: 0;
}

#toggle:checked~.envelope-wrapper .flap.bottom {
  transform: rotateX(-110deg);
  opacity: 0;
}

#toggle:checked~.envelope-wrapper .flap.left {
  transform: rotateY(-110deg);
  opacity: 0;
}

#toggle:checked~.envelope-wrapper .flap.right {
  transform: rotateY(110deg);
  opacity: 0;
}

#toggle:checked~.envelope-wrapper .ribbon-banner {
  transform: translate(-50%, -1000%) rotate(20deg);
  opacity: 0;
}

#toggle:checked~.envelope-wrapper .seal {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

#toggle:checked~.envelope-wrapper {
  background: transparent;
  pointer-events: none;
}

.uno {
  font-family: 'Arial Black', Impact, sans-serif;
  display: flex;
  justify-content: center;
  gap: 0;
}

.letra {
  font-size: clamp(5rem, 45vw, 30rem);
  font-weight: 900;
  background-size: cover;
  background-position: center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  padding: 0;
}

.letra.u {
  background-image: url('img/A.jpg?v=1');
}

.letra.n {
  background-image: url('img/Ñ.jpg?v=2');
}

.letra.o {
  background-image: url('img/O.jpg?v=1');
}

@media (max-width: 480px) {
  .letra {
    font-size: clamp(6rem, 58vw, 20rem);
  }
}

.nombre {
  font-family: "Style Script", cursive;
  text-align: center;
  font-size: 75px;
}

.subtitulo {
  font-family: "Style Script", cursive;
  text-align: center;
}

.boton {
  background-color: #f4b8c5;
  color: white;
  border: none;
  padding: 10px 21px 12px 20px;
  font-size: 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.boton:hover {
  background-color: #f4b8c5;
}

.second-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  overflow: auto;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: start;
  align-items: start;
  z-index: 2;
}

.main-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.main-content.active {
  opacity: 1;
  pointer-events: auto;
}

.second-container {
  opacity: 0;
  flex-direction: column;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.second-container.active {
  opacity: 1;
  pointer-events: auto;
}

.invitacion-carmen {
  text-align: center;
  border-radius: 12px;
  max-width: 100%;
  margin: 0 auto;
  font-family: "Style Script", cursive;
}

.invitacion-foto {
  width: 100%;
  margin-bottom: 20px;
  height: 220px;
  object-fit: cover;
}

.invitacion-nombre {
  font-size: 60px;
  color: #000;
  margin-bottom: 0px;
  margin-top: 30px;
  font-family: 'Style Script', cursive;
}

.invitacion-texto {
  font-size: 17px;
  color: #000;
  padding-left: 25px;
  padding-right: 25px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 20px;
  font-family: 'Poppins', sans-serif;
}

.galeria-texto {
  font-size: 17px;
  color: #000;
  padding-left: 25px;
  padding-right: 25px;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 25px;
  font-family: 'Poppins', sans-serif;
}

.fecha-invitacion {
  text-align: center;
  font-family: 'Georgia', serif;
  color: #2c4a7a;
  margin: 40px auto;
}

.fecha-mes {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.fecha-dia {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 1px;
}

.fecha-dia-texto,
.fecha-dia-numero,
.fecha-dia-ano {
  display: inline-block;
}

.bb-fecha {
  margin-top: 50px;
  text-align: center;
  width: 100%;
  background:
    radial-gradient(circle, white 20%, transparent 20%),
    radial-gradient(circle, white 20%, transparent 20%),
    #f4b8c5;
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  padding: 75px 25px;
}

.minnie-container {
  background: white;
  border-radius: 47% 47% 5% 5%;
  width: 100%;
  height: 100%;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 20px;
}

.minnie-text {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: #999;
  text-transform: lowercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.minnie-img {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
  padding-top: 25px;
}

.minnie-title {
  font-family: "Style Script", cursive;
  font-size: 32px;
  color: #f4b8c5;
  margin: 0;
  line-height: 1;
}

.bb-fecha-linea {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  color: #888;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
}

.bb-fecha-linea::before,
.bb-fecha-linea::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background-color: #000;
}

.bb-dia,
.bb-mes {
  letter-spacing: 0.18em;
  font-size: 14px;
  color: #000;
}

.bb-numero {
  font-size: 62px;
  font-weight: 700;
  color: #f4b8c5;
  line-height: 1;
  margin: 10px 0;
}

.bb-anio {
  font-family: "Poppins", sans-serif;
  font-size: 28px;
  font-weight: bold;
  color: #000;
  margin-top: -8px;
  padding-bottom: 30px;
}

.play {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 15px;
}

/* Reproductor de Audio */
.audio-player {
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  align-items: center;
  gap: 15px;
  z-index: 1000;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-btn {
  background: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.control-btn:hover {
  transform: scale(1.1);
}

.control-btn.play-pause {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #f4b8c5 0%, #f4b8c5 100%);
}

.control-btn svg {
  width: 18px;
  height: 18px;
  fill: #666;
}

.control-btn.play-pause svg {
  fill: white;
  width: 20px;
  height: 20px;
}

.progress-container {
  width: 150px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: white;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .audio-player {
    top: 10px;
    right: 10px;
    padding: 12px 15px;
    gap: 10px;
  }

  .progress-container {
    width: 100px;
  }

  .control-btn {
    width: 30px;
    height: 30px;
  }

  .control-btn.play-pause {
    width: 40px;
    height: 40px;
  }
}

/* Galería de Fotos */
.galeria-section {
  width: 100%;
  padding: 40px 0px;
  background: #fff;
}

.galeria-titulo {
  font-family: "Style Script", cursive;
  font-size: 48px;
  color: #f4b8c5;
  margin-top: 35px;
  text-align: center;
  margin-bottom: 10px;
}

.galeria-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.galeria-item {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.galeria-item.horizontal {
  aspect-ratio: 16/7;
}

.galeria-item.vertical {
  aspect-ratio: 1/1;
}

.galeria-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.galeria-item:hover img {
  transform: scale(1.05);
}

.galeria-footer {
  text-align: center;
  margin-top: 30px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

@media (max-width: 480px) {
  .galeria-titulo {
    font-size: 36px;
  }

  .galeria-grid {
    gap: 3px;
  }

  .galeria-row {
    gap: 3px;
  }
}

.mickey-containers {
  width: 100%;
  margin-top: 0px;
  aspect-ratio: 1 / 1;
}

.svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mickey-imgx {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  clip-path: url(#mickeyClip);
}

.itx-itinerario {
  padding-top: 20px;
  margin: 0 auto;
  font-family: "Poppins", serif;
}

.itx-item {
  text-align: center;
  margin-bottom: 32px;
  color: #000;
}

.itx-item:last-child {
  margin-bottom: 0;
}

.itx-icon {
  font-size: 26px;
  opacity: 0.85;
}

.itx-time {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 2px;
}

.itx-text {
  font-size: 15px;
  letter-spacing: 0.3px;
}


.final-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding-left: 50px;
  padding-right: 50px;
  margin-top: 60px;
}

@media (min-width: 769px) {
  body {
    background-color: #2c2c2c !important;
    /* Dark background to highlight phone view */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
    height: auto !important;
    /* Override height: 100% to allow flex scaling */
  }

  .container {
    position: relative !important;
    width: 450px !important;
    /* Typical phone width */
    height: 95vh !important;
    max-height: 900px !important;
    background-color: white !important;
    overflow: hidden !important;
    border-radius: 30px !important;
    /* Phone-like rounded corners */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5) !important;
    border: 8px solid #1a1a1a !important;
    /* Phone frame simulation */
  }

  /* Change fixed positioning to absolute relative to .container */
  .main-content,
  .second-container,
  .envelope-wrapper {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
  }

  .envelope-wrapper {
    width: 100% !important;
    height: 100% !important;
  }

  /* Recalculate envelope flaps using fixed pixels for the 400px container width */
  /* Width is 400px, so half-width is 200px */

  .flap.top {
    border-width: 500px 200px 0 200px !important;
  }

  .flap.bottom {
    border-width: 0 200px 500px 200px !important;
  }

  .flap.left {
    border-width: 500px 0 500px 200px !important;
  }

  .flap.right {
    border-width: 500px 200px 500px 0 !important;
  }

  /* Fix font sizes that used vw */
  .letra {
    font-size: 7rem !important;
    /* Adjusted to fit 3 letters "UNO" within 400px width */
  }
}