/* Input wrapper & buttons */
  .input-wrapper {
    position: relative;
    margin-bottom: 0;
  }

  input[type="password"],
  input[type="text"] {
    width: 100%;
    padding: 14px 46px 14px 14px;
    font-size: 1.1rem;
    border-width: 2px 2px 0 2px;
    border-style: solid;
    border-color: #dddddd;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
  }

  input[type="password"]:focus,
  input[type="text"]:focus {
    border-color: #007bff;
  }

  /* Buttons on the input */
  button.clear-btn,
  button.copy-btn,
  button.toggle-visibility-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: #555;
    padding: 6px 10px;
    border-radius: 8px;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.1);
  }
  button.clear-btn:hover,
  button.copy-btn:hover,
  button.toggle-visibility-btn:hover {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 8px rgb(0 123 255 / 0.4);
  }

  button.clear-btn {
    right: 84px;
  }
  button.toggle-visibility-btn {
    right: 48px;
  }
  button.copy-btn {
    right: 12px;
  }

  /* Strength bar */
  #strengthBar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 0 0 5px 5px !important;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.1);
  }

  #strengthLevel {
    height: 100%;
    width: 0;
    background-color: #dc3545;
    border-radius: 12px 0 0 12px;
    transition: width 0.4s ease, background-color 0.4s ease;
    box-shadow: inset 0 -1px 5px rgb(255 255 255 / 0.3);
  }

  /* Strength message */
  .strength-message {
    font-weight: 600;
    font-size: 1em;
    text-align: center;
    margin-bottom: 16px;
    min-height: 1.3em;
    user-select: none;
  }
  .weak {
    color: #dc3545;
  }
  .medium {
    color: #ffb600;
  }
  .strong {
    color: #28a745;
  }

  /* Criteria list */
  .criteria {
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: center;
    margin-bottom: 20px;
  }
  .criteria div {
    flex: 1 1 30%;
    padding: 7px 15px;
    border-radius: 5px;
    background: #fafafa;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    box-shadow: inset 0 0 0 2px #ddd;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  .criteria div.valid {
    background: #d4edda;
    color: #155724;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #28a745;
  }

  /* Generate length control */
  .generate-length {
    margin-bottom: 18px;
    text-align: center;
  }
  .generate-length label {
    font-weight: 600;
    font-size: 1rem;
    margin-right: 10px;
    user-select: none;
  }
  .generate-length input[type=number] {
    width: 70px;
    padding: 7px 10px;
    font-size: 1.05rem;
    border-radius: 8px;
    border: 2px solid #ccc;
    transition: border-color 0.3s ease;
  }
  .generate-length input[type=number]:focus {
    border-color: #007bff;
    outline: none;
  }

  /* Generate button */
  button#generateBtn {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 12px rgb(0 123 255 / 0.4);
  }
  button#generateBtn:hover,
  button#generateBtn:focus {
    background-color: #0056b3;
    box-shadow: 0 6px 16px rgb(0 86 179 / 0.6);
    outline: none;
  }

  /* Responsive tweaks */
  @media (max-width: 350px) {
    .criteria div {
      flex-basis: 100%;
    }
    .strength-message {
    font-size: 0.85em !important;
    }
    button.clear-btn, button.copy-btn, button.toggle-visibility-btn {
      font-size: 1.2rem;
      padding: 4px 8px;
    }
  }