:root {
  --letras: rgb(8, 157, 100);
  --bkg: #fff;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background-color: var(--bkg);
  height: 100%;
  overflow-x: hidden;
}

.access-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, #f0f4ff, #dbe4ff);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Poiret One', cursive;
  color: var(--letras);
  text-align: center;
  padding: 2rem;
}

.access-screen h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#code-input {
  padding: 0.7rem 1rem;
  border: 2px solid var(--letras);
  border-radius: 15px;
  font-size: 1.2rem;
  font-family: 'Poiret One', cursive;
  width: 80%;
  max-width: 300px;
  margin-bottom: 1rem;
  outline: none;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#submit-code {
  background-color: var(--letras);
  color: white;
  font-size: 1.2rem;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Poiret One', cursive;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

#submit-code:hover {
  background-color: rgb(72, 24, 197);
}

.error-msg {
  color: red;
  font-size: 1rem;
  margin-top: 0.5rem;
  font-weight: bold;
}

.pg1,
.pg2,
.pg3,
.pg4,
.pg5,
.pg6,
.pg7,
.pg8,
.pg9,
.footer {
  display: none;
}

.pg1,
.pg2,
.pg3,
.pg4,
.pg5,
.pg6,
.pg7,
.pg8 {
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  margin: 0;
  max-width: 100%;
  max-height: 100vh;
  height: 40rem;
  position: relative;
}

.pg1 { background-image: url("1.gif"); }
.pg2 { background-image: url("2.gif"); }
.pg3 { background-image: url("3.gif"); }
.pg4 { background-image: url("4.gif"); }
.pg5 { background-image: url("5.gif"); }
.pg6 { background-image: url("6.gif"); }
.pg7 { background-image: url("7.gif"); }
.pg8 { background-image: url("8.gif"); }

.pg9 {
  background-color: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  min-height: 40vh;
  height: auto;
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#guest-info {
  background-color: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  margin: 2rem auto;
  width: 90%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Poiret One', cursive;
  color: var(--letras);
  text-align: center;
  font-size: 1.3rem;
  line-height: 2rem;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

#guest-info p {
  margin: 0.5rem 0;
  font-weight: 600;
}

.confirm-form {
  background-color: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  margin: 2rem auto;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Poiret One', cursive;
  color: var(--letras);
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.confirm-form label {
  display: block;
  margin: 0.8rem 0 0.3rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.confirm-form input[type="radio"] {
  margin-right: 0.5rem;
}

.confirm-form textarea,
.confirm-input {
  width: 100%;
  border-radius: 10px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  font-family: 'Poiret One', cursive;
  font-size: 1rem;
  margin-top: 0.3rem;
  box-sizing: border-box;
}

.confirm-form textarea {
  resize: vertical;
}

.confirm-form button {
  margin-top: 1.5rem;
  background-color: var(--letras);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Poiret One', cursive;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease;
}

.confirm-form button:hover {
  background-color: rgb(72, 24, 197);
}

.timer {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--letras);
  padding: 0.1rem;
  font-size: 1rem;
  font-family: "Poiret One", serif;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0px 0px 10px 0.5px black;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.time-value {
  font-size: 2rem;
  font-weight: bold;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0.2rem;
}

.btn-music {
  position: absolute;
  top: 3%;
  right: 7%;
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--letras);
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-family: "Schoolbell", serif;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0px 0px 10px 0.5px black;
  text-shadow: yellow 1px 1px;
}

.btn-music:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.btn-ubi {
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--letras);
  position: absolute;
  top: 37%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0px 0px 10px 0.5px black;
  border-radius: 20px;
  padding: 0.5rem;
  font-family: "Poiret One", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.btn-ubi-a {
  text-decoration: none;
  color: var(--letras);
}

.footer {
  display: block;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background-color: var(--bkg);
  color: #333;
  font-size: 16px;
  font-family: "Roboto", serif;
  bottom: 0;
  width: 100%;
  text-align: center;
  box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.1);
}

.footer p {
  margin: 0;
}

.fb-link {
  color: var(--letras);
  font-size: 24px;
  text-decoration: none;
}

.fb-link:hover {
  color: #0d6efd;
}

.popup-confirmacion {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4caf50;
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-family: 'Poiret One', cursive;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.popup-confirmacion.show {
  opacity: 1;
  pointer-events: auto;
}

@media (width > 450px) {
  .pg1,
  .pg2,
  .pg3,
  .pg4,
  .pg5,
  .pg6,
  .pg7,
  .pg8,
  .pg9 {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    margin: 0;
    max-width: 100%;
    max-height: 100vh;
  }
}
