/* Estilos generales */
body {
    background: #111;
    color: #fff;
    font-family: 'Arial', sans-serif;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
  }
  
  /* Contenedor de contraseña */
  .password-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
  }
  
  input, button {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
  }
  
  button {
    background: #ff2d75;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  button:hover {
    background: #ff1a5e;
    transform: scale(1.02);
  }
  
  .hidden {
    display: none;
    opacity: 0;
  }
  
  #errorMsg {
    color: #ff4d4d;
    margin-top: 10px;
  }

  /* Estilo para la foto circular */
.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid #ff2d75;
    box-shadow: 0 0 15px rgba(255, 45, 117, 0.5);
  }
  
  .profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  /* Ajuste para el título */
  .password-container h1 {
    margin-top: 0;
  }

  /* En style.css */
#passwordInput:invalid {
    border: 2px solid #ff4d4d;
  }
  
  #passwordInput:valid {
    border: 2px solid #4CAF50;
  }

  .envelope {
    width: 200px;
    height: 120px;
    background: #f9c7c8;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
    transition: all 0.5s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .heart-seal {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
  }
  
  .hint {
    margin-top: 20px;
    font-style: italic;
    opacity: 0.7;
  }
  
  /* Animación al abrir */
  .envelope.open {
    transform: translateY(-50px) rotateX(180deg);
    opacity: 0;
  }

  .success-message {
    margin-bottom: 30px;
    min-height: 60px; /* Evita saltos de layout */
  }
  
  #typewriter-header {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 45, 117, 0.3);
  }

  #typewriter-header::after {
    content: "|";
    animation: blink 0.7s infinite;
  }
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }

  /* Estilos para la carta */
#love-letter {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255, 45, 117, 0.2);
  }
  
  .letter-content h2 {
    color: #ff2d75;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
  }
  
  .intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
  }
  
  .reasons-list {
    padding-left: 20px;
    margin-bottom: 30px;
  }
  
  .reasons-list li {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 1rem;
  }
  
  .closing {
    text-align: center;
    margin-top: 40px;
    font-size: 1.2rem;
  }
  
  .signature {
    font-family: 'Courier New', monospace;
    margin-top: 30px;
    font-size: 1.3rem;
  }
  
  .heartbeat {
    animation: heartbeat 1.5s infinite;
    display: inline-block;
  }
  
  @keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }
  
  .ps {
    font-style: italic;
    margin-top: 40px;
    opacity: 0.8;
  }

  #love-letter {
    max-height: 0;
    overflow: hidden;
    transition: max-height 1.5s ease-out;
  }
  
  #love-letter.expand {
    max-height: 9999px;
  }
  

  #letter-content {
    transition: opacity 0.5s ease;
  }