*, *::before, *::after {
    box-sizing: border-box;
  }

 /* Shared video styles */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  display: none; /* Hide by default */
}

/* Show desktop video only on screens wider than 768px */
@media (min-width: 769px) {
  #video-desktop {
    display: block;
  }
}

/* Show mobile video only on screens 768px or less */
@media (max-width: 768px) {
  #video-mobile {
    display: block;
  }
}

/* Layout and text */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  color: #cceeee;
  display: flex;
  justify-content: center;
  align-items: center;
}

  .container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  form.form {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px 40px;
    border-radius: 15px;
    border: 1px solid #004d4dba;
    box-shadow: 0 6px 20px rgba(0, 77, 77, 0.5);
    box-sizing: border-box;
    margin-top: 20px;
  }

  form.form div {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
  }

  form.form label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #e6faff;
    text-shadow: 0 0 8px #004d4dcc;
  }

  form.form input[type="email"],
  form.form input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    padding-right: 44px; /* space for toggle button */
    border-radius: 12px;
    border: 1.5px solid #004d4d;
    font-size: 1rem;
    background-color: #fffdfa;
    color: #002f2f;
    outline: none;
    transition: border-color 0.3s ease;
  }

  form.form input[type="email"]:focus,
  form.form input[type="password"]:focus {
    border-color: #003737;
    box-shadow: 0 0 8px #004d4dba;
  }

  .password-wrapper {
    position: relative;
    width: 100%;
  }

  .toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    color: #004d4d;
    font-family: monospace;
    padding: 0;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    max-width: 36px;
  }

  .toggle-password:hover,
  .toggle-password:focus {
    color: #001f1f;
    outline: none;
  }

  .toggle-password span {
    display: inline-block;
    width: 22px; /* fixed width */
    text-align: center;
  }

  form.form button.btn {
    width: 100%;
    background-color: #004d4d;
    color: #f9f6f0;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 0;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 0 12px #004d4dba;
    transition: background-color 0.3s ease;
  }

  form.form button.btn:hover,
  form.form button.btn:focus {
    background-color: #003737;
    outline: none;
  }

  button.go-back {
    position: fixed;
    top: 16px;
    left: 16px;
    background-color: transparent;
    border: 2px solid #cceeee;
    color: #cceeee;
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 0 8px #004d4dcc;
    z-index: 1000;
    user-select: none;
  }

  button.go-back:hover,
  button.go-back:focus {
    background-color: #cceeee;
    color: #004d4d;
    outline: none;
  }

  @media (max-width: 450px) {
    form.form {
      padding: 20px 25px;
    }

    form.form label {
      font-size: 0.95rem;
    }

    form.form button.btn {
      font-size: 1rem;
      padding: 10px 0;
    }

    button.go-back {
      padding: 6px 12px;
      font-size: 0.9rem;
      top: 12px;
      left: 12px;
    }

    .toggle-password {
      width: 32px;
      height: 32px;
      font-size: 20px;
      right: 6px;
      min-width: 32px;
      max-width: 32px;
    }

    .toggle-password span {
      width: 20px;
    }
  }

  @media (max-width: 320px) {
    button.go-back {
      padding: 4px 8px;
      font-size: 0.8rem;
      top: 8px;
      left: 8px;
    }
  }