  #preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #040467bf, #e17000, #ff9100dc);
    background-size: 400% 400%;
    animation: fondoMover 6s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    flex-direction: column;
    text-align: center;
  }

  @keyframes fondoMover {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  .logo-wrapper {
    position: relative;
    animation: girarLogo 6s linear infinite, rebotar 2.5s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .logo-wrapper img {
    width: 100px;
    max-width: 30vw;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    z-index: 2;
  }

  .logo-wrapper .brillo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff55, transparent 70%);
    transform: translate(-50%, -50%) scale(1);
    animation: pulso 2.5s ease-in-out infinite;
    z-index: 1;
  }

  .texto-escribiendo {
    margin-top: 25px;
    font-size: 1rem;
    max-width: 90vw;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid #fff;
    width: 34ch;
    animation: escribir 4s steps(34), blink 0.75s step-end infinite;
  }

  @keyframes girarLogo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  @keyframes rebotar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  @keyframes pulso {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.5; }
  }

  @keyframes escribir {
    from { width: 0; }
    to { width: 34ch; }
  }

  @keyframes blink {
    50% { border-color: transparent; }
  }

  @media (max-width: 600px) {
    .texto-escribiendo {
      font-size: 0.9rem;
      width: 90%;
      text-align: center;
    }
  }