/* === Reset básico y fuente === */
body, html {
  width: 100%;
  height: 100%;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* === Video de fondo mejorado === */
video.bg-video {
   position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  
  display: block;
  background: #000;
  
  min-width: 100%;
  min-height: 100%;
}

/* Solución para iOS */
@supports (-webkit-touch-callout: none) {
  video.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }
}

@media (orientation: portrait) {
  video.bg-video {
    width: 100%;
    height: auto;
  }
}

@media (orientation: landscape) {
  video.bg-video {
    width: auto;
    height: 100%;
  }
}

/* === Contenedor principal === */
.overlay {
  position: relative;
  z-index: 1;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === Imagen de texto decorativo === */
.texto-img {
  width: 80%;
  height: auto;
  margin-bottom: 1rem;
}

/* === Logo debajo del texto === */
.logo-img {
  width: 30%;
  height: auto;
  margin-bottom: 2rem;
}

/* === Contenedor de la polaroid === */
.polaroid-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin-bottom: 2rem;
}

/* === Marco de la polaroid === */
.polaroid-frame {
  position: relative;
  width: 100%;
  max-width: 675px;
  aspect-ratio: 1080 / 1350;
  background-color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  padding: 20px 20px 80px 20px;
}

/* === Cuadro negro donde va la imagen === */
.polaroid-frame::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 80px;
  background: #000;
  z-index: 1;
}

/* === Imagen cargada === */
.polaroid-frame img.preview {
  position: absolute;
  top: 20px;
  left: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 100px);
  object-fit: cover;
  z-index: 2;
  display: none;
}

/* === Área del mensaje === */
.polaroid-message {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 40px;
  z-index: 3;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-message input {
  width: 100%;
  background: transparent;
  border: none;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  color: #333;
  outline: none;
  padding: 5px 0;
  max-width: 100%;
  font-style: normal;
}

.polaroid-message input::placeholder {
  color: #999;
  font-style: normal;
  opacity: 1;
}

/* === Botones === */
.boton-generar {
  width: 70%;
  height: auto;
  margin-top: 1rem;
  transition: none !important;
}

/* === Input file oculto === */
#imageInput {
  display: none;
}

/* === Contenedor === */
.social-container {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
}


.social-link i {
  font-size: 3rem;
  color: white;
}
.social-link {
  text-decoration: none;
  padding: 0 10px;
}

/* === Layout de columnas === */
.row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.izquierdo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === Media Queries === */
@media (max-width: 992px) {
  .overlay {
    padding: 1rem;
  }
  
  .texto-img {
    width: 90%;
  }
  
  .logo-img {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .overlay {
    padding: 1rem;
  }
  
  .texto-img {
    width: 95%;
  }
  
  .logo-img {
    width: 60%;
    margin-bottom: 1.5rem;
  }
  
  .polaroid-frame {
    max-width: 500px;
  }
  
  .polaroid-message {
    bottom: 15px;
    padding: 0 30px;
    height: 45px;
  }
  
  .polaroid-message input {
    font-size: 16px;
  }
  
  .boton-generar {
    width: 80%;
  }
  
  .social-container {
    margin-top: 1.5rem;
  }
  
  .social-icon {
    width: 50px;
  }
}

@media (max-width: 576px) {
  .overlay {
    padding: 0.5rem;
  }
  
  .logo-img {
    width: 70%;
  }
  
  .polaroid-frame {
    max-width: 350px;
    padding: 15px 15px 60px 15px;
  }
  
  .polaroid-frame::before {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 60px;
  }
  
  .polaroid-frame img.preview {
    top: 15px;
    left: 15px;
    width: calc(100% - 30px);
    height: calc(100% - 75px);
  }
  
  .polaroid-message {
    bottom: 10px;
    padding: 0 20px;
    height: 30px;
  }
  
  .polaroid-message input {
    font-size: 14px;
  }
  
  .social-container {
    margin-top: 1rem;
  }
}